diff --git a/CMakeLists.txt b/CMakeLists.txt index 3812c207b5b..25325dd6f6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/module) +include(ProcessConfigurations) #============================= # Configurable options @@ -230,8 +231,6 @@ if(BUILD_FOR_FUZZING) ) endif() -include(ProcessConfigurations) - include(TryAppendCXXFlags) include(TryAppendLinkerFlag) diff --git a/cmake/module/ProcessConfigurations.cmake b/cmake/module/ProcessConfigurations.cmake index 52fca3cd1f7..9a510a00a55 100644 --- a/cmake/module/ProcessConfigurations.cmake +++ b/cmake/module/ProcessConfigurations.cmake @@ -4,8 +4,6 @@ include_guard(GLOBAL) -include(TryAppendCXXFlags) - macro(normalize_string string) string(REGEX REPLACE " +" " " ${string} "${${string}}") string(STRIP "${${string}}" ${string}) @@ -119,6 +117,8 @@ endfunction() set_default_config(RelWithDebInfo) +include(TryAppendCXXFlags) + # We leave assertions on. if(MSVC) remove_cxx_flag_from_all_configs(/DNDEBUG)