Skip to content

Commit

Permalink
Refactor command-line tools to use shared header (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn authored Sep 17, 2024
1 parent f8f55ea commit 83edbed
Show file tree
Hide file tree
Showing 8 changed files with 399 additions and 283 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ if(BUILD_TOOLS AND WIN32)
UVAtlasTool/UVAtlas.cpp
UVAtlasTool/uvatlas.rc
UVAtlasTool/settings.manifest
UVAtlasTool/CmdLineHelpers.h
UVAtlasTool/Mesh.cpp
UVAtlasTool/Mesh.h
UVAtlasTool/MeshOBJ.cpp
Expand All @@ -259,6 +260,10 @@ if(directxmath_FOUND)
endforeach()
endif()

if(TOOL_EXES)
message(STATUS "Building tools: ${TOOL_EXES}")
endif()

if(MSVC)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /Wall /EHsc /GR-)
Expand Down Expand Up @@ -296,6 +301,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
if(ENABLE_CODE_ANALYSIS)
message(STATUS "Building with Code Analysis (PREFIX)")
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /analyze /WX)
endforeach()
Expand Down
4 changes: 3 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@
{ "name": "x64-Debug-Linux", "description": "WSL Linux x64 (Debug)", "inherits": [ "base", "x64", "Debug", "VCPKG" ] },
{ "name": "x64-Release-Linux", "description": "WSL Linux x64 (Release)", "inherits": [ "base", "x64", "Release", "VCPKG" ] },
{ "name": "arm64-Debug-Linux", "description": "WSL Linux ARM64 (Debug)", "inherits": [ "base", "ARM64", "Debug", "VCPKG" ] },
{ "name": "arm64-Release-Linux", "description": "WSL Linux ARM64 (Release)", "inherits": [ "base", "ARM64", "Release", "VCPKG" ] }
{ "name": "arm64-Release-Linux", "description": "WSL Linux ARM64 (Release)", "inherits": [ "base", "ARM64", "Release", "VCPKG" ] },

{ "name": "x64-Analyze" , "description": "MSVC for x64 (Debug) using /analyze", "inherits": [ "base", "x64", "Debug", "VCPKG", "MSVC", "Tools" ], "cacheVariables": { "ENABLE_CODE_ANALYSIS": true } }
],
"testPresets": [
{ "name": "x64-Debug" , "configurePreset": "x64-Debug" },
Expand Down
Loading

0 comments on commit 83edbed

Please sign in to comment.