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
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
make
......@@ -68,7 +68,7 @@ fi
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
make unittests
......
......@@ -32,7 +32,7 @@ fi
cd build-release
cmake -DCMAKE_BUILD_TYPE=Release -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
cmake -DCMAKE_BUILD_TYPE=Release $OPTIONS ../
#build it
make
......@@ -62,7 +62,7 @@ fi
cd build-debug
cmake -DCMAKE_BUILD_TYPE=Debug -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
cmake -DCMAKE_BUILD_TYPE=Debug $OPTIONS ../
#build it
make
......
......@@ -30,6 +30,17 @@ if (OVM_STANDALONE_BUILD)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Build/lib")
set(OVM_TARGET_PREFIX "")
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()
# OVM_TARGET_PREFIX is prepended to targets with generic names,
# i.e., "doc", "unittests"
......
SET(SOURCE_FILES
OpenVolumeMesh/Attribs/InterfaceAttrib.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