-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de6f235
commit 68d9b52
Showing
364 changed files
with
16,745 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.vs/ | ||
.x64/ | ||
.idea/ | ||
|
||
debug/ | ||
Debug/ | ||
release/ | ||
Release/ | ||
target/ | ||
build/ | ||
build-*/ | ||
cmake-build-debug/ | ||
cmake-build-release/ | ||
CMakeFiles/ | ||
|
||
*.bak | ||
*.ilk | ||
*.pdb | ||
*.obj | ||
*.vcxproj | ||
*.filters | ||
*.cmake | ||
*.sln | ||
*.exe | ||
*.lib | ||
*.dll | ||
*.user | ||
|
||
CMakeCache.txt | ||
Makefile | ||
Testing | ||
|
||
/env | ||
/cmake-build-qt-gui-debug | ||
/cmake-build-qt-gui-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-vscode.cmake-tools", | ||
"twxs.cmake", | ||
"ms-vscode.cpptools", | ||
"matepek.vscode-catch2-test-adapter", | ||
"esbenp.prettier-vscode", | ||
"ms-vscode.cpptools-extension-pack" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{ | ||
"testMate.cpp.test.advancedExecutables": [ | ||
{ "pattern": "${workspaceFolder}/bin/Debug/test_ciftl_core.exe" } | ||
], | ||
"files.associations": { | ||
"algorithm": "cpp", | ||
"any": "cpp", | ||
"array": "cpp", | ||
"atomic": "cpp", | ||
"bit": "cpp", | ||
"bitset": "cpp", | ||
"cctype": "cpp", | ||
"charconv": "cpp", | ||
"chrono": "cpp", | ||
"clocale": "cpp", | ||
"cmath": "cpp", | ||
"compare": "cpp", | ||
"complex": "cpp", | ||
"concepts": "cpp", | ||
"condition_variable": "cpp", | ||
"coroutine": "cpp", | ||
"cstddef": "cpp", | ||
"cstdint": "cpp", | ||
"cstdio": "cpp", | ||
"cstdlib": "cpp", | ||
"cstring": "cpp", | ||
"ctime": "cpp", | ||
"cwchar": "cpp", | ||
"deque": "cpp", | ||
"exception": "cpp", | ||
"expected": "cpp", | ||
"filesystem": "cpp", | ||
"format": "cpp", | ||
"forward_list": "cpp", | ||
"fstream": "cpp", | ||
"functional": "cpp", | ||
"future": "cpp", | ||
"initializer_list": "cpp", | ||
"iomanip": "cpp", | ||
"ios": "cpp", | ||
"iosfwd": "cpp", | ||
"iostream": "cpp", | ||
"istream": "cpp", | ||
"iterator": "cpp", | ||
"limits": "cpp", | ||
"list": "cpp", | ||
"locale": "cpp", | ||
"map": "cpp", | ||
"memory": "cpp", | ||
"mutex": "cpp", | ||
"new": "cpp", | ||
"numeric": "cpp", | ||
"optional": "cpp", | ||
"ostream": "cpp", | ||
"ranges": "cpp", | ||
"ratio": "cpp", | ||
"set": "cpp", | ||
"source_location": "cpp", | ||
"span": "cpp", | ||
"sstream": "cpp", | ||
"stack": "cpp", | ||
"stdexcept": "cpp", | ||
"stdfloat": "cpp", | ||
"stop_token": "cpp", | ||
"streambuf": "cpp", | ||
"string": "cpp", | ||
"system_error": "cpp", | ||
"thread": "cpp", | ||
"tuple": "cpp", | ||
"type_traits": "cpp", | ||
"typeinfo": "cpp", | ||
"unordered_map": "cpp", | ||
"utility": "cpp", | ||
"variant": "cpp", | ||
"vector": "cpp", | ||
"xfacet": "cpp", | ||
"xhash": "cpp", | ||
"xiosbase": "cpp", | ||
"xlocale": "cpp", | ||
"xlocbuf": "cpp", | ||
"xlocinfo": "cpp", | ||
"xlocmes": "cpp", | ||
"xlocmon": "cpp", | ||
"xlocnum": "cpp", | ||
"xloctime": "cpp", | ||
"xmemory": "cpp", | ||
"xstring": "cpp", | ||
"xtr1common": "cpp", | ||
"xtree": "cpp", | ||
"xutility": "cpp", | ||
"unordered_set": "cpp", | ||
"*.tcc": "cpp", | ||
"random": "cpp", | ||
"cstdarg": "cpp", | ||
"cwctype": "cpp", | ||
"numbers": "cpp", | ||
"queue": "cpp", | ||
"codecvt": "cpp" | ||
}, | ||
"prettier.endOfLine": "crlf", | ||
"prettier.printWidth": 80, | ||
"prettier.proseWrap": "always", | ||
"prettier.tabWidth": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
cmake_minimum_required(VERSION 3.14) | ||
|
||
project(ciftl VERSION 1.0.0.1 LANGUAGES CXX) | ||
|
||
# 设置 C++ 标准 | ||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED True) | ||
|
||
# 选择编译器 | ||
set(GCC_OR_CLANG ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR CMAKE_COMPILER_IS_GNUCXX)) | ||
|
||
# 设置编译输出目录 | ||
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/lib) | ||
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin) | ||
|
||
# 设置构建类型 | ||
if(NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build, options are: Debug Release." FORCE) | ||
endif() | ||
|
||
# 根据构建类型设置编译器选项 | ||
if(CMAKE_BUILD_TYPE STREQUAL "Debug") | ||
message(STATUS "Build type: Debug") | ||
if(MSVC) | ||
# Visual Studio 编译器的 Debug 选项 | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Od /Zi /D_DEBUG") | ||
else() | ||
# GCC 编译器的 Debug 选项 | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0") | ||
endif() | ||
else() | ||
message(STATUS "Build type: Release") | ||
if(MSVC) | ||
# Visual Studio 编译器的 Release 选项 | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2 /Oi /Gy /DNDEBUG") | ||
else() | ||
# GCC 编译器的 Release 选项 | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DNDEBUG") | ||
endif() | ||
endif() | ||
|
||
# 对MSVC的特殊支持 | ||
if(MSVC) | ||
# 对于MSVC需要支持utf-8 | ||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") | ||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /utf-8") | ||
# 编译选项 | ||
set (CMAKE_CONFIGURATION_TYPES "Debug;Release") | ||
# Debug生成的后缀 | ||
set (CMAKE_DEBUG_POSTFIX D) | ||
# windows系统动态库生成lib文件的命令 | ||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) | ||
add_definitions(-D_CRT_SECURE_NO_WARNINGS) | ||
endif(MSVC) | ||
|
||
# 对于MSVC而言,不需要指定目录为Debug或是Release | ||
if (NOT MSVC) | ||
if (CMAKE_BUILD_TYPE STREQUAL "Debug") | ||
set(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/Debug") | ||
set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/Debug") | ||
else () | ||
set(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/Release") | ||
set(EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/Release") | ||
endif () | ||
endif () | ||
|
||
include_directories(${CMAKE_SOURCE_DIR}/ciftl_core/include/) | ||
include_directories(${CMAKE_SOURCE_DIR}/ciftl_gui/include/) | ||
|
||
add_subdirectory(ciftl_core) | ||
|
||
option(COMPILE_CIFTL_GUI "Compile ciftl_gui" ON) | ||
if(COMPILE_CIFTL_GUI) | ||
add_subdirectory(ciftl_gui) | ||
endif(COMPILE_CIFTL_GUI) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"version" : 2, | ||
"configurePresets" : [ | ||
{ | ||
"name" : "debug", | ||
"binaryDir" : "${sourceDir}/cmake-build-debug", | ||
"generator": "Visual Studio 17 2022", | ||
"cacheVariables" : { | ||
"CMAKE_TOOLCHAIN_FILE" : "${sourceDir}/env/vcpkg/scripts/buildsystems/vcpkg.cmake", | ||
"COMPILE_CIFTL_GUI" : "OFF", | ||
"CMAKE_BUILD_TYPE" : "Debug" | ||
} | ||
}, | ||
{ | ||
"name" : "release", | ||
"binaryDir" : "${sourceDir}/cmake-build-release", | ||
"generator": "Visual Studio 17 2022", | ||
"cacheVariables" : { | ||
"CMAKE_TOOLCHAIN_FILE" : "${sourceDir}/env/vcpkg/scripts/buildsystems/vcpkg.cmake", | ||
"COMPILE_CIFTL_GUI" : "OFF", | ||
"CMAKE_BUILD_TYPE" : "Release" | ||
} | ||
}, | ||
{ | ||
"name" : "qt-gui-debug", | ||
"binaryDir" : "${sourceDir}/cmake-build-qt-gui-debug", | ||
"generator": "Visual Studio 17 2022", | ||
"cacheVariables" : { | ||
"CMAKE_TOOLCHAIN_FILE" : "${sourceDir}/env/vcpkg/scripts/buildsystems/vcpkg.cmake", | ||
"COMPILE_CIFTL_GUI" : "ON", | ||
"CMAKE_BUILD_TYPE" : "Debug" | ||
} | ||
}, | ||
{ | ||
"name" : "qt-gui-release", | ||
"binaryDir" : "${sourceDir}/cmake-build-qt-gui-release", | ||
"generator": "Visual Studio 17 2022", | ||
"cacheVariables" : { | ||
"CMAKE_TOOLCHAIN_FILE" : "${sourceDir}/env/vcpkg/scripts/buildsystems/vcpkg.cmake", | ||
"COMPILE_CIFTL_GUI" : "ON", | ||
"CMAKE_BUILD_TYPE" : "Release" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.