Added flexible behaviour for option BUILD_WITH_DEBUG.
endif()
# enable extended messages of many OCCT algorithms
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()
+
- add_definitions (-DOCCT_DEBUG)
+ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:DEBUG>:OCCT_DEBUG>)
endif()
# copy samples to install directory
endif()
# copy samples to install directory
leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files")
set (BUILD_WITH_DEBUG_DESCR
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")
set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR
"Append the postfix to names of output libraries")