CMake: Write expat_config.h as late as needed
Previously, our post-processing of HAVE_GETRANDOM did was not applied to expat_config.h.
This commit is contained in:
parent
a33e021955
commit
17c1fb49e7
@ -107,6 +107,7 @@ if(BUILD_tests)
|
||||
enable_testing()
|
||||
endif(BUILD_tests)
|
||||
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/ConfigureChecks.cmake)
|
||||
|
||||
macro(evaluate_detection_results use_ref have_ref thing_lower thing_title)
|
||||
@ -124,6 +125,9 @@ if(NOT WIN32)
|
||||
evaluate_detection_results(USE_SYS_GETRANDOM HAVE_SYSCALL_GETRANDOM "syscall SYS_getrandom" "Syscall SYS_getrandom")
|
||||
endif()
|
||||
|
||||
configure_file(expat_config.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/expat_config.h")
|
||||
add_definitions(-DHAVE_EXPAT_CONFIG_H)
|
||||
|
||||
|
||||
set(EXTRA_COMPILE_FLAGS)
|
||||
if(FLAG_NO_STRICT_ALIASING)
|
||||
|
@ -62,8 +62,5 @@ check_c_source_compiles("
|
||||
}"
|
||||
HAVE_SYSCALL_GETRANDOM)
|
||||
|
||||
configure_file(expat_config.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/expat_config.h")
|
||||
add_definitions(-DHAVE_EXPAT_CONFIG_H)
|
||||
|
||||
check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)
|
||||
check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY)
|
||||
|
Loading…
Reference in New Issue
Block a user