-
-
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
0 parents
commit 6fabc95
Showing
8 changed files
with
872 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,2 @@ | ||
.vs/ | ||
out/ |
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,33 @@ | ||
cmake_minimum_required(VERSION 3.23 FATAL_ERROR) | ||
|
||
# Enable Hot Reload for MSVC compilers if supported. | ||
if(POLICY CMP0141) | ||
cmake_policy(SET CMP0141 NEW) | ||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>") | ||
endif() | ||
|
||
project(nfs-save-rehash C CXX) | ||
|
||
file(GLOB_RECURSE SRC_FILES CONFIGURE_DEPENDS "src/*.cpp" "src/*.c") | ||
file(GLOB_RECURSE HEADERS CONFIGURE_DEPENDS "src/*.h") | ||
add_executable(${PROJECT_NAME} ${SRC_FILES}) | ||
target_sources(${PROJECT_NAME} PRIVATE FILE_SET HEADERS | ||
BASE_DIRS "src" | ||
FILES "${HEADERS}") | ||
if(WIN32) | ||
target_sources(${PROJECT_NAME} PRIVATE "src/version.rc") | ||
endif() | ||
|
||
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD_REQUIRED ON) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden) | ||
|
||
if(MSVC) | ||
target_compile_options(${PROJECT_NAME} PRIVATE "/W3" "/Zc:throwingNew" "/EHsc") | ||
endif() | ||
|
||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) | ||
if(CMAKE_CXX_LINKER_SUPPORTS_PDB) | ||
install(FILES $<TARGET_PDB_FILE:${PROJECT_NAME}> DESTINATION bin OPTIONAL) | ||
endif() |
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,115 @@ | ||
{ | ||
"version": 3, | ||
"configurePresets": [ | ||
{ | ||
"name": "base", | ||
"hidden": true, | ||
"binaryDir": "${sourceDir}/out/build/${presetName}", | ||
"installDir": "${sourceDir}/out/install/${presetName}" | ||
}, | ||
{ | ||
"name": "windows-base", | ||
"hidden": true, | ||
"inherits": "base", | ||
"generator": "Ninja", | ||
"cacheVariables": { | ||
"CMAKE_C_COMPILER": "cl.exe", | ||
"CMAKE_CXX_COMPILER": "cl.exe" | ||
}, | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
{ | ||
"name": "unix-base", | ||
"hidden": true, | ||
"inherits": "base", | ||
"generator": "Unix Makefiles", | ||
"condition": { | ||
"type": "notEquals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
{ | ||
"name": "x64-debug", | ||
"hidden": true, | ||
"architecture": { | ||
"value": "x64", | ||
"strategy": "external" | ||
}, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
} | ||
}, | ||
{ | ||
"name": "x64-debug-windows", | ||
"displayName": "x64 Debug", | ||
"inherits": [ "x64-debug", "windows-base" ] | ||
}, | ||
{ | ||
"name": "x64-debug-unix", | ||
"displayName": "x64 Debug", | ||
"inherits": [ "x64-debug", "unix-base" ] | ||
}, | ||
{ | ||
"name": "x64-release", | ||
"hidden": true, | ||
"inherits": "x64-debug", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Release" | ||
} | ||
}, | ||
{ | ||
"name": "x64-release-windows", | ||
"displayName": "x64 Release", | ||
"inherits": [ "x64-release", "windows-base" ] | ||
}, | ||
{ | ||
"name": "x64-release-unix", | ||
"displayName": "x64 Debug", | ||
"inherits": [ "x64-release", "unix-base" ] | ||
}, | ||
{ | ||
"name": "x86-debug", | ||
"hidden": true, | ||
"architecture": { | ||
"value": "x86", | ||
"strategy": "external" | ||
}, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
} | ||
}, | ||
{ | ||
"name": "x86-debug-windows", | ||
"displayName": "x86 Debug", | ||
"inherits": [ "x86-debug", "windows-base" ] | ||
}, | ||
{ | ||
"name": "x86-debug-unix", | ||
"displayName": "x86 Debug", | ||
"inherits": [ "x86-debug", "unix-base" ] | ||
}, | ||
{ | ||
"name": "x86-release", | ||
"hidden": true, | ||
"inherits": "x86-debug", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Release" | ||
} | ||
}, | ||
{ | ||
"name": "x86-release-windows", | ||
"displayName": "x86 Release", | ||
"inherits": [ "x86-release", "windows-base" ] | ||
}, | ||
{ | ||
"name": "x86-release-unix", | ||
"displayName": "x86 Debug", | ||
"inherits": [ "x86-release", "unix-base" ] | ||
} | ||
] | ||
} |
Oops, something went wrong.