mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 10:32:57 +01:00
Fix #279 by not checking CMAKE_BUILD_TYPE when setting CMAKE_DEBUG_POSTFIX.
CMAKE_DEBUG_POSTFIX is already build-type specific and only applied in case of "Debug" builds. The build-type is correctly inferred from either CMAKE_BUILD_TYPE for MAkefile based generators or the selected build type in the Visual Studio IDE. This fix allows to switch the build type in Visual Studio and have Poco compile/link correctly.
This commit is contained in:
parent
48f7ea1a58
commit
aa0218fa9a
@ -51,13 +51,9 @@ endif ()
|
||||
# * Release (CMAKE_C_FLAGS_RELEASE or CMAKE_CXX_FLAGS_RELEASE)
|
||||
# * RelWithDebInfo (CMAKE_C_FLAGS_RELWITHDEBINFO or CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
# * MinSizeRel (CMAKE_C_FLAGS_MINSIZEREL or CMAKE_CXX_FLAGS_MINSIZEREL)
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
message(STATUS "Debug output enabled")
|
||||
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix" FORCE)
|
||||
else ()
|
||||
message(STATUS "Optimized output enabled")
|
||||
set(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Set debug library postfix" FORCE)
|
||||
endif ()
|
||||
|
||||
# For Debug build types, append a "d" to the library names.
|
||||
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix" FORCE)
|
||||
|
||||
option(ENABLE_TESTS
|
||||
"Set to OFF|ON (default is OFF) to control build of POCO tests & samples" OFF)
|
||||
|
Loading…
Reference in New Issue
Block a user