Skip to content

Commit

Permalink
CMake: Set DBG option based on BUILD_TYPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaffeine committed Jul 11, 2024
1 parent b9eaac2 commit 95bb0e4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ if(NOT(CMAKE_BUILD_TYPE))
set(CMAKE_BUILD_TYPE Release)
endif()

set(DBG $<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(DBG FALSE)
else()
set(DBG TRUE)
endif()

if(MSVC)
# Use static CRT
if(DBG)
Expand Down

0 comments on commit 95bb0e4

Please sign in to comment.