place config.h generation after mac version check

pull/3/head
Li Linfeng 2019-10-29 21:12:13 +08:00
parent 7f64139a53
commit f8fcc4c0ae
1 changed files with 2 additions and 1 deletions

View File

@ -291,7 +291,6 @@ include_directories("${CMAKE_SOURCE_DIR}/src" ${CMAKE_BINARY_DIR})
# to the source code
check_include_files(byteswap.h HAVE_BYTESWAP_H)
check_include_file_cxx(experimental/filesystem HAVE_EXPERIMENTAL_FILESYSTEM)
configure_file("config.h.in" "config.h")
if(APPLE)
string(REGEX MATCH "[0-9]+" DARWIN_MAJOR_VERSION ${CMAKE_SYSTEM_VERSION})
@ -302,6 +301,8 @@ if(APPLE)
endif()
endif()
configure_file("config.h.in" "config.h")
if (HAVE_EXPERIMENTAL_FILESYSTEM)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
find_library(CLANG_FS_LIBRARY "c++fs")