diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c8bd063..2ec8b57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -702,6 +702,18 @@ endif() # setup some Testing support (a macro defined in this file) CMAKE_SETUP_TESTING() +# Check whether to build server mode or not: +set(CMake_HAVE_SERVER_MODE 0) +if(NOT CMake_TEST_EXTERNAL_CMAKE AND NOT CMAKE_BOOTSTRAP AND CMAKE_USE_LIBUV) + list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_auto_type CMake_HAVE_CXX_AUTO_TYPE) + list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_range_for CMake_HAVE_CXX_RANGE_FOR) + if(CMake_HAVE_CXX_AUTO_TYPE AND CMake_HAVE_CXX_RANGE_FOR) + if(CMake_HAVE_CXX_MAKE_UNIQUE) + set(CMake_HAVE_SERVER_MODE 1) + endif() + endif() +endif() + if(NOT CMake_TEST_EXTERNAL_CMAKE) if(NOT CMake_VERSION_IS_RELEASE) if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND |