Minor cmake code review

This commit is contained in:
walbourn 2022-12-02 22:33:06 -08:00
parent 9bc07dc20f
commit d993bbdb6e

View File

@ -297,6 +297,10 @@ if(MSVC)
target_link_options(${t} PRIVATE "$<$<NOT:$<CONFIG:DEBUG>>:/guard:ehcont>") target_link_options(${t} PRIVATE "$<$<NOT:$<CONFIG:DEBUG>>:/guard:ehcont>")
endforeach() endforeach()
endif() endif()
else()
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_definitions(${t} PRIVATE $<IF:$<CONFIG:DEBUG>,_DEBUG,NDEBUG>)
endforeach()
endif() endif()
if(NOT (${DIRECTX_ARCH} MATCHES "^arm")) if(NOT (${DIRECTX_ARCH} MATCHES "^arm"))
@ -323,7 +327,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endforeach() endforeach()
elseif(MINGW) elseif(MINGW)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME}) foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_definitions(${t} PRIVATE $<IF:$<CONFIG:DEBUG>,_DEBUG,NDEBUG>)
target_compile_options(${t} PRIVATE -Wno-ignored-attributes) target_compile_options(${t} PRIVATE -Wno-ignored-attributes)
target_link_options(${t} PRIVATE -municode) target_link_options(${t} PRIVATE -municode)
endforeach() endforeach()