Commit 1f33daea authored by Martin Heistermann's avatar Martin Heistermann

cmake: implement STL_DEBUG, use it in place of STL_VECTOR_CHECKS in CI

Disable STL_DEBUG on mac, the macos libc++ does not support it.
parent 59e3ff5d
...@@ -37,7 +37,7 @@ fi ...@@ -37,7 +37,7 @@ fi
cd build-release-$BUILDPATH cd build-release-$BUILDPATH
cmake -DCMAKE_BUILD_TYPE=Release -DSTL_VECTOR_CHECKS=ON $OPTIONS ../ cmake -DCMAKE_BUILD_TYPE=Release -DSTL_DEBUG=ON $OPTIONS ../
#build it #build it
make make
...@@ -68,7 +68,7 @@ fi ...@@ -68,7 +68,7 @@ fi
cd build-debug-$BUILDPATH cd build-debug-$BUILDPATH
cmake -DCMAKE_BUILD_TYPE=Debug -DSTL_VECTOR_CHECKS=ON $OPTIONS ../ cmake -DCMAKE_BUILD_TYPE=Debug -DSTL_DEBUG=ON $OPTIONS ../
#build the unit tests #build the unit tests
make unittests make unittests
......
...@@ -32,7 +32,7 @@ fi ...@@ -32,7 +32,7 @@ fi
cd build-release cd build-release
cmake -DCMAKE_BUILD_TYPE=Release -DSTL_VECTOR_CHECKS=ON $OPTIONS ../ cmake -DCMAKE_BUILD_TYPE=Release $OPTIONS ../
#build it #build it
make make
...@@ -62,7 +62,7 @@ fi ...@@ -62,7 +62,7 @@ fi
cd build-debug cd build-debug
cmake -DCMAKE_BUILD_TYPE=Debug -DSTL_VECTOR_CHECKS=ON $OPTIONS ../ cmake -DCMAKE_BUILD_TYPE=Debug $OPTIONS ../
#build it #build it
make make
......
...@@ -30,6 +30,17 @@ if (OVM_STANDALONE_BUILD) ...@@ -30,6 +30,17 @@ if (OVM_STANDALONE_BUILD)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Build/lib") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Build/lib")
set(OVM_TARGET_PREFIX "") set(OVM_TARGET_PREFIX "")
enable_testing() enable_testing()
option(STL_DEBUG "Enable STL debug checks. Warning: This must be consistent across the whole build! Not compatible with the libc++ shipped with Apple XCode as of 2019." OFF)
if (STL_DEBUG)
# We do not know which STL will be used, defining both is the easist way.
# https://libcxx.llvm.org/docs/UsingLibcxx.html#libc-configuration-macros
# https://libcxx.llvm.org/docs/DesignDocs/DebugMode.html#using-debug-mode
add_definitions(-D_LIBCPP_DEBUG=1)
# https://gcc.gnu.org/onlinedocs/libstdc%2B%2B/manual/debug_mode_using.html
add_definitions(-D_GLIBXX_DEBUG=1)
add_definitions(-D_GLIBXX_DEBUG_PEDANTIC=1)
endif()
else() else()
# OVM_TARGET_PREFIX is prepended to targets with generic names, # OVM_TARGET_PREFIX is prepended to targets with generic names,
# i.e., "doc", "unittests" # i.e., "doc", "unittests"
......
SET(SOURCE_FILES SET(SOURCE_FILES
OpenVolumeMesh/Attribs/InterfaceAttrib.cc OpenVolumeMesh/Attribs/InterfaceAttrib.cc
OpenVolumeMesh/Attribs/OpenVolumeMeshStatus.cc OpenVolumeMesh/Attribs/OpenVolumeMeshStatus.cc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment