Merge pull request #2684 from firewave/precompiled
use precompiled headers if CMake supports it
This commit is contained in:
commit
94f92f00fe
|
@ -37,7 +37,13 @@ else()
|
|||
endif()
|
||||
|
||||
add_library(lib_objs OBJECT ${srcs_lib} ${hdrs})
|
||||
if (CMAKE_VERSION VERSION_EQUAL "3.16" OR CMAKE_VERSION VERSION_GREATER "3.16")
|
||||
target_precompile_headers(lib_objs PRIVATE precompiled.h)
|
||||
endif()
|
||||
if (ENABLE_OSS_FUZZ AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_library(lib_objs_sanitized OBJECT EXCLUDE_FROM_ALL ${srcs_lib} ${hdrs})
|
||||
target_compile_options(lib_objs_sanitized PRIVATE -fsanitize=address)
|
||||
if (CMAKE_VERSION VERSION_EQUAL "3.16" OR CMAKE_VERSION VERSION_GREATER "3.16")
|
||||
target_precompile_headers(lib_objs_sanitized PRIVATE precompiled.h)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -27,6 +27,10 @@ if (BUILD_TESTS)
|
|||
target_link_libraries(testrunner ${Z3_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (CMAKE_VERSION VERSION_EQUAL "3.16" OR CMAKE_VERSION VERSION_GREATER "3.16")
|
||||
target_precompile_headers(testrunner PRIVATE precompiled.h)
|
||||
endif()
|
||||
|
||||
add_custom_target(copy_cfg ALL
|
||||
COMMENT "Copying cfg files")
|
||||
add_custom_command(
|
||||
|
|
Loading…
Reference in New Issue