disabled precompiled headers in CMake as they currently do not emit any compiler warnings / adjusted check for precompiled header (#2820)
This commit is contained in:
parent
d9eacaecbb
commit
dae37f1c9f
|
@ -41,11 +41,12 @@ 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)
|
||||||
|
|
||||||
if (CMAKE_VERSION VERSION_EQUAL "3.16" OR CMAKE_VERSION VERSION_GREATER "3.16")
|
# precompiled headers do not emit compiler warnings so we cannot use them right now
|
||||||
set(CMAKE_DISABLE_PRECOMPILE_HEADERS Off CACHE BOOL "Disable precompiled headers")
|
#if (CMAKE_VERSION VERSION_EQUAL "3.16" OR CMAKE_VERSION VERSION_GREATER "3.16")
|
||||||
else()
|
# set(CMAKE_DISABLE_PRECOMPILE_HEADERS Off CACHE BOOL "Disable precompiled headers")
|
||||||
|
#else()
|
||||||
set(CMAKE_DISABLE_PRECOMPILE_HEADERS On CACHE BOOL "Disable precompiled headers")
|
set(CMAKE_DISABLE_PRECOMPILE_HEADERS On CACHE BOOL "Disable precompiled headers")
|
||||||
endif()
|
#endif()
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_DIRS_CONFIGCMAKE ${CMAKE_INSTALL_PREFIX}/include CACHE PATH "Output directory for headers")
|
set(CMAKE_INCLUDE_DIRS_CONFIGCMAKE ${CMAKE_INSTALL_PREFIX}/include CACHE PATH "Output directory for headers")
|
||||||
set(CMAKE_LIB_DIRS_CONFIGCMAKE ${CMAKE_INSTALL_PREFIX}/lib CACHE PATH "Output directory for libraries")
|
set(CMAKE_LIB_DIRS_CONFIGCMAKE ${CMAKE_INSTALL_PREFIX}/lib CACHE PATH "Output directory for libraries")
|
||||||
|
|
|
@ -27,7 +27,7 @@ if (BUILD_TESTS)
|
||||||
target_link_libraries(testrunner ${Z3_LIBRARIES})
|
target_link_libraries(testrunner ${Z3_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_VERSION VERSION_EQUAL "3.16" OR CMAKE_VERSION VERSION_GREATER "3.16")
|
if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS)
|
||||||
target_precompile_headers(testrunner PRIVATE precompiled.h)
|
target_precompile_headers(testrunner PRIVATE precompiled.h)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue