Merge topic 'cmake-server-enable-more'
957e72c0
Utilities/Release: Use python 3 for server mode test on Linux binary64934f20
Utilities/Release: Enable server mode in all binariesec0bf638
bootstrap: Add options to enable/disable server mode explicitly523f8ec8
server-mode: Add option to enable/disable test case explicitly6b97a5ef
server-mode: Add option to enable/disable the mode explicitlya8334961
server-mode: Rename variable CMake_{HAVE => ENABLE}_SERVER_MODE97b6e17c
server-mode: Enable from bootstrapped CMake build
This commit is contained in:
commit
9c932109a2
|
@ -695,15 +695,28 @@ endif()
|
||||||
CMAKE_SETUP_TESTING()
|
CMAKE_SETUP_TESTING()
|
||||||
|
|
||||||
# Check whether to build server mode or not:
|
# Check whether to build server mode or not:
|
||||||
set(CMake_HAVE_SERVER_MODE 0)
|
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
||||||
if(NOT CMake_TEST_EXTERNAL_CMAKE AND NOT CMAKE_BOOTSTRAP AND CMAKE_USE_LIBUV)
|
if(NOT DEFINED CMake_ENABLE_SERVER_MODE)
|
||||||
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_auto_type CMake_HAVE_CXX_AUTO_TYPE)
|
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)
|
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_USE_LIBUV
|
||||||
if(CMake_HAVE_CXX_MAKE_UNIQUE)
|
AND CMake_HAVE_CXX_AUTO_TYPE
|
||||||
set(CMake_HAVE_SERVER_MODE 1)
|
AND CMake_HAVE_CXX_MAKE_UNIQUE
|
||||||
|
AND CMake_HAVE_CXX_RANGE_FOR
|
||||||
|
)
|
||||||
|
set(CMake_ENABLE_SERVER_MODE 1)
|
||||||
|
else()
|
||||||
|
set(CMake_ENABLE_SERVER_MODE 0)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
if(CMake_ENABLE_SERVER_MODE AND NOT CMAKE_USE_LIBUV)
|
||||||
|
message(FATAL_ERROR "The server mode requires libuv!")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(CMake_ENABLE_SERVER_MODE 0)
|
||||||
|
endif()
|
||||||
|
if(NOT DEFINED CMake_TEST_SERVER_MODE)
|
||||||
|
set(CMake_TEST_SERVER_MODE ${CMake_ENABLE_SERVER_MODE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
||||||
|
|
|
@ -778,7 +778,7 @@ add_executable(cmake cmakemain.cxx cmcmd.cxx cmcmd.h ${MANIFEST_FILE})
|
||||||
list(APPEND _tools cmake)
|
list(APPEND _tools cmake)
|
||||||
target_link_libraries(cmake CMakeLib)
|
target_link_libraries(cmake CMakeLib)
|
||||||
|
|
||||||
if(CMake_HAVE_SERVER_MODE)
|
if(CMake_ENABLE_SERVER_MODE)
|
||||||
add_library(CMakeServerLib
|
add_library(CMakeServerLib
|
||||||
cmServer.cxx cmServer.h
|
cmServer.cxx cmServer.h
|
||||||
cmServerConnection.cxx cmServerConnection.h
|
cmServerConnection.cxx cmServerConnection.h
|
||||||
|
|
|
@ -2723,7 +2723,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
|
||||||
ADD_TEST_MACRO(CMakeCommands.target_compile_definitions target_compile_definitions)
|
ADD_TEST_MACRO(CMakeCommands.target_compile_definitions target_compile_definitions)
|
||||||
ADD_TEST_MACRO(CMakeCommands.target_compile_options target_compile_options)
|
ADD_TEST_MACRO(CMakeCommands.target_compile_options target_compile_options)
|
||||||
|
|
||||||
if(CMake_HAVE_SERVER_MODE)
|
if(CMake_TEST_SERVER_MODE)
|
||||||
# The cmake server-mode test requires python for a simple client.
|
# The cmake server-mode test requires python for a simple client.
|
||||||
find_package(PythonInterp QUIET)
|
find_package(PythonInterp QUIET)
|
||||||
if(PYTHON_EXECUTABLE)
|
if(PYTHON_EXECUTABLE)
|
||||||
|
|
|
@ -31,8 +31,10 @@ CMAKE_USE_OPENSSL:BOOL=ON
|
||||||
OPENSSL_CRYPTO_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2h/lib/libcrypto.a
|
OPENSSL_CRYPTO_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2h/lib/libcrypto.a
|
||||||
OPENSSL_INCLUDE_DIR:PATH=/home/kitware/openssl-1.0.2h/include
|
OPENSSL_INCLUDE_DIR:PATH=/home/kitware/openssl-1.0.2h/include
|
||||||
OPENSSL_SSL_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2h/lib/libssl.a
|
OPENSSL_SSL_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2h/lib/libssl.a
|
||||||
|
PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3
|
||||||
CPACK_SYSTEM_NAME:STRING=Linux-x86_64
|
CPACK_SYSTEM_NAME:STRING=Linux-x86_64
|
||||||
BUILD_QtDialog:BOOL:=TRUE
|
BUILD_QtDialog:BOOL:=TRUE
|
||||||
|
CMake_ENABLE_SERVER_MODE:BOOL=TRUE
|
||||||
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
|
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
|
||||||
CMake_INSTALL_DEPENDENCIES:BOOL=ON
|
CMake_INSTALL_DEPENDENCIES:BOOL=ON
|
||||||
CMAKE_PREFIX_PATH:STRING=${qt_prefix}
|
CMAKE_PREFIX_PATH:STRING=${qt_prefix}
|
||||||
|
|
|
@ -20,6 +20,7 @@ CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7
|
||||||
CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
|
CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
|
||||||
CPACK_SYSTEM_NAME:STRING=Darwin-x86_64
|
CPACK_SYSTEM_NAME:STRING=Darwin-x86_64
|
||||||
BUILD_QtDialog:BOOL=TRUE
|
BUILD_QtDialog:BOOL=TRUE
|
||||||
|
CMake_ENABLE_SERVER_MODE:BOOL=TRUE
|
||||||
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
|
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
|
||||||
CMake_INSTALL_DEPENDENCIES:BOOL=ON
|
CMake_INSTALL_DEPENDENCIES:BOOL=ON
|
||||||
CMAKE_SKIP_RPATH:BOOL=TRUE
|
CMAKE_SKIP_RPATH:BOOL=TRUE
|
||||||
|
|
|
@ -15,6 +15,7 @@ CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
|
||||||
CMAKE_Fortran_COMPILER:FILEPATH=FALSE
|
CMAKE_Fortran_COMPILER:FILEPATH=FALSE
|
||||||
CMAKE_GENERATOR:INTERNAL=Ninja
|
CMAKE_GENERATOR:INTERNAL=Ninja
|
||||||
BUILD_QtDialog:BOOL:=TRUE
|
BUILD_QtDialog:BOOL:=TRUE
|
||||||
|
CMake_ENABLE_SERVER_MODE:BOOL=TRUE
|
||||||
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
|
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
|
||||||
CMake_INSTALL_DEPENDENCIES:BOOL=ON
|
CMake_INSTALL_DEPENDENCIES:BOOL=ON
|
||||||
CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x86 -subsystem:console,5.01
|
CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x86 -subsystem:console,5.01
|
||||||
|
|
|
@ -16,6 +16,7 @@ CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
|
||||||
CMAKE_Fortran_COMPILER:FILEPATH=FALSE
|
CMAKE_Fortran_COMPILER:FILEPATH=FALSE
|
||||||
CMAKE_GENERATOR:INTERNAL=Ninja
|
CMAKE_GENERATOR:INTERNAL=Ninja
|
||||||
BUILD_QtDialog:BOOL:=TRUE
|
BUILD_QtDialog:BOOL:=TRUE
|
||||||
|
CMake_ENABLE_SERVER_MODE:BOOL=TRUE
|
||||||
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
|
CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
|
||||||
CMake_INSTALL_DEPENDENCIES:BOOL=ON
|
CMake_INSTALL_DEPENDENCIES:BOOL=ON
|
||||||
CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x64 -subsystem:console,5.02
|
CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x64 -subsystem:console,5.02
|
||||||
|
|
11
bootstrap
11
bootstrap
|
@ -65,6 +65,7 @@ cmake_init_file=""
|
||||||
cmake_bootstrap_system_libs=""
|
cmake_bootstrap_system_libs=""
|
||||||
cmake_bootstrap_qt_gui=""
|
cmake_bootstrap_qt_gui=""
|
||||||
cmake_bootstrap_qt_qmake=""
|
cmake_bootstrap_qt_qmake=""
|
||||||
|
cmake_bootstrap_server=""
|
||||||
cmake_sphinx_man=""
|
cmake_sphinx_man=""
|
||||||
cmake_sphinx_html=""
|
cmake_sphinx_html=""
|
||||||
cmake_sphinx_qthelp=""
|
cmake_sphinx_qthelp=""
|
||||||
|
@ -407,6 +408,9 @@ Configuration:
|
||||||
--no-qt-gui do not build the Qt-based GUI (default)
|
--no-qt-gui do not build the Qt-based GUI (default)
|
||||||
--qt-qmake=<qmake> use <qmake> as the qmake executable to find Qt
|
--qt-qmake=<qmake> use <qmake> as the qmake executable to find Qt
|
||||||
|
|
||||||
|
--server enable the server mode (default if supported)
|
||||||
|
--no-server disable the server mode
|
||||||
|
|
||||||
--sphinx-man build man pages with Sphinx
|
--sphinx-man build man pages with Sphinx
|
||||||
--sphinx-html build html help with Sphinx
|
--sphinx-html build html help with Sphinx
|
||||||
--sphinx-qthelp build qch help with Sphinx
|
--sphinx-qthelp build qch help with Sphinx
|
||||||
|
@ -641,6 +645,8 @@ while test $# != 0; do
|
||||||
--qt-gui) cmake_bootstrap_qt_gui="1" ;;
|
--qt-gui) cmake_bootstrap_qt_gui="1" ;;
|
||||||
--no-qt-gui) cmake_bootstrap_qt_gui="0" ;;
|
--no-qt-gui) cmake_bootstrap_qt_gui="0" ;;
|
||||||
--qt-qmake=*) cmake_bootstrap_qt_qmake=`cmake_arg "$1"` ;;
|
--qt-qmake=*) cmake_bootstrap_qt_qmake=`cmake_arg "$1"` ;;
|
||||||
|
--server) cmake_bootstrap_server="1" ;;
|
||||||
|
--no-server) cmake_bootstrap_server="0" ;;
|
||||||
--sphinx-man) cmake_sphinx_man="1" ;;
|
--sphinx-man) cmake_sphinx_man="1" ;;
|
||||||
--sphinx-html) cmake_sphinx_html="1" ;;
|
--sphinx-html) cmake_sphinx_html="1" ;;
|
||||||
--sphinx-qthelp) cmake_sphinx_qthelp="1" ;;
|
--sphinx-qthelp) cmake_sphinx_qthelp="1" ;;
|
||||||
|
@ -1401,6 +1407,11 @@ if [ "x${cmake_bootstrap_qt_qmake}" != "x" ]; then
|
||||||
set (QT_QMAKE_EXECUTABLE "'"${cmake_bootstrap_qt_qmake}"'" CACHE FILEPATH "Location of Qt qmake" FORCE)
|
set (QT_QMAKE_EXECUTABLE "'"${cmake_bootstrap_qt_qmake}"'" CACHE FILEPATH "Location of Qt qmake" FORCE)
|
||||||
' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
|
' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
|
||||||
fi
|
fi
|
||||||
|
if [ "x${cmake_bootstrap_server}" != "x" ]; then
|
||||||
|
echo '
|
||||||
|
set (CMake_ENABLE_SERVER_MODE '"${cmake_bootstrap_server}"' CACHE BOOL "Enable server mode" FORCE)
|
||||||
|
' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
|
||||||
|
fi
|
||||||
if [ "x${cmake_sphinx_man}" != "x" ]; then
|
if [ "x${cmake_sphinx_man}" != "x" ]; then
|
||||||
echo '
|
echo '
|
||||||
set (SPHINX_MAN "'"${cmake_sphinx_man}"'" CACHE BOOL "Build man pages with Sphinx" FORCE)
|
set (SPHINX_MAN "'"${cmake_sphinx_man}"'" CACHE BOOL "Build man pages with Sphinx" FORCE)
|
||||||
|
|
Loading…
Reference in New Issue