1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56: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()
# enable extended messages of many OCCT algorithms
set (BUILD_WITH_DEBUG OFF CACHE BOOL "${BUILD_WITH_DEBUG_DESCR}")
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}")
endif()
else()
OCCT_CHECK_AND_UNSET (BUILD_WITH_DEBUG)
endif()
if (BUILD_WITH_DEBUG)
add_definitions (-DOCCT_DEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:DEBUG>:OCCT_DEBUG>)
endif()
# copy samples to install directory

View File

@ -19,8 +19,9 @@ ExprIntrp functionality are generated automatically with Flex/Bison. Checking th
leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files")
set (BUILD_WITH_DEBUG_DESCR
"Enables extended messages of many OCCT algorithms, usually printed to cout.
These include messages on internal errors and special cases encountered, timing etc")
"Enables extended messages of many OCCT algorithms, usually printed to cout.
These include messages on internal errors and special cases encountered, timing etc.
Applies only for Debug configuration.")
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR
"Append the postfix to names of output libraries")