1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0027212: Make cmake configurator flexible concerning option BUILD_WITH_DEBUG

Added flexible behaviour for option BUILD_WITH_DEBUG.
This commit is contained in:
ski 2016-04-26 11:05:46 +03:00 committed by bugmaster
parent a139a35380
commit e13e5f39c5
2 changed files with 12 additions and 4 deletions

View File

@ -65,9 +65,16 @@ if (DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) # single-configuration ge
endif() endif()
# enable extended messages of many OCCT algorithms # enable extended messages of many OCCT algorithms
if ((SINGLE_GENERATOR AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug") OR NOT SINGLE_GENERATOR)
if (NOT BUILD_WITH_DEBUG)
set (BUILD_WITH_DEBUG OFF CACHE BOOL "${BUILD_WITH_DEBUG_DESCR}") set (BUILD_WITH_DEBUG OFF CACHE BOOL "${BUILD_WITH_DEBUG_DESCR}")
endif()
else()
OCCT_CHECK_AND_UNSET (BUILD_WITH_DEBUG)
endif()
if (BUILD_WITH_DEBUG) if (BUILD_WITH_DEBUG)
add_definitions (-DOCCT_DEBUG) set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:DEBUG>:OCCT_DEBUG>)
endif() endif()
# copy samples to install directory # copy samples to install directory

View File

@ -20,7 +20,8 @@ leads to automatic search of Flex/Bison binaries and regeneration of the mention
set (BUILD_WITH_DEBUG_DESCR set (BUILD_WITH_DEBUG_DESCR
"Enables extended messages of many OCCT algorithms, usually printed to cout. "Enables extended messages of many OCCT algorithms, usually printed to cout.
These include messages on internal errors and special cases encountered, timing etc") These include messages on internal errors and special cases encountered, timing etc.
Applies only for Debug configuration.")
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR
"Append the postfix to names of output libraries") "Append the postfix to names of output libraries")