added CMake option CPPCHK_GLIBCXX_DEBUG to make usage of _GLIBCXX_DEBUG in Debug build configurable (#3628)
This commit is contained in:
parent
184ef4e739
commit
4b5fba19bd
|
@ -38,13 +38,17 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir cmake.output
|
mkdir cmake.output
|
||||||
cd cmake.output
|
cd cmake.output
|
||||||
cmake -G "Unix Makefiles" -DUSE_Z3=On -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On ..
|
cmake -G "Unix Makefiles" -DUSE_Z3=On -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCPPCHK_GLIBCXX_DEBUG=Off ..
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: Clang-Tidy
|
- name: Prepare CMake dependencies
|
||||||
run: |
|
run: |
|
||||||
# make sure the precompiled headers exist
|
# make sure the precompiled headers exist
|
||||||
make -C cmake.output lib/CMakeFiles/lib_objs.dir/cmake_pch.hxx.cxx
|
make -C cmake.output lib/CMakeFiles/lib_objs.dir/cmake_pch.hxx.cxx
|
||||||
make -C cmake.output test/CMakeFiles/testrunner.dir/cmake_pch.hxx.cxx
|
make -C cmake.output test/CMakeFiles/testrunner.dir/cmake_pch.hxx.cxx
|
||||||
|
# make sure the auto-generated GUI sources exist
|
||||||
make -C cmake.output autogen
|
make -C cmake.output autogen
|
||||||
|
|
||||||
|
- name: Clang-Tidy
|
||||||
|
run: |
|
||||||
cmake --build cmake.output --target run-clang-tidy 2> /dev/null
|
cmake --build cmake.output --target run-clang-tidy 2> /dev/null
|
||||||
|
|
|
@ -7,7 +7,8 @@ if (MSVC)
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (UNIX)
|
# TODO: this should probably apply to the compiler and not the platform
|
||||||
|
if (CPPCHK_GLIBCXX_DEBUG AND UNIX)
|
||||||
# TODO: check if this can be enabled again for Clang - also done in Makefile
|
# TODO: check if this can be enabled again for Clang - also done in Makefile
|
||||||
if (CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
if (CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||||
add_definitions(-D_GLIBCXX_DEBUG)
|
add_definitions(-D_GLIBCXX_DEBUG)
|
||||||
|
|
|
@ -42,6 +42,7 @@ option(WITH_QCHART "When building GUI(need BUILD_GUI=ON), use Qt5 Chart
|
||||||
option(HAVE_RULES "Usage of rules (needs PCRE library and headers)" OFF)
|
option(HAVE_RULES "Usage of rules (needs PCRE library and headers)" OFF)
|
||||||
option(USE_Z3 "Usage of z3 library" OFF)
|
option(USE_Z3 "Usage of z3 library" OFF)
|
||||||
option(USE_BUNDLED_TINYXML2 "Usage of bundled tinyxml2 library" ON)
|
option(USE_BUNDLED_TINYXML2 "Usage of bundled tinyxml2 library" ON)
|
||||||
|
option(CPPCHK_GLIBCXX_DEBUG "Usage of _GLIBCXX_DEBUG in Debug build" ON)
|
||||||
|
|
||||||
if (CMAKE_VERSION VERSION_EQUAL "3.16" OR CMAKE_VERSION VERSION_GREATER "3.16")
|
if (CMAKE_VERSION VERSION_EQUAL "3.16" OR CMAKE_VERSION VERSION_GREATER "3.16")
|
||||||
set(CMAKE_DISABLE_PRECOMPILE_HEADERS Off CACHE BOOL "Disable precompiled headers")
|
set(CMAKE_DISABLE_PRECOMPILE_HEADERS Off CACHE BOOL "Disable precompiled headers")
|
||||||
|
|
Loading…
Reference in New Issue