PROTON-1143: CMake minimum version now 2.8.7 - Remove some old cruft
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/36059eba Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/36059eba Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/36059eba Branch: refs/heads/master Commit: 36059eba2cfe0135dacd8dbd11371f041239fdc9 Parents: 1bfc05e Author: Andrew Stitcher <[email protected]> Authored: Fri Feb 19 16:27:22 2016 -0500 Committer: Andrew Stitcher <[email protected]> Committed: Tue Feb 23 00:36:10 2016 -0500 ---------------------------------------------------------------------- CMakeLists.txt | 2 +- proton-c/CMakeLists.txt | 64 +++++++++----------------- proton-c/bindings/cpp/docs/CMakeLists.txt | 2 +- proton-c/bindings/python/CMakeLists.txt | 4 +- proton-c/docs/api/CMakeLists.txt | 2 +- 5 files changed, 26 insertions(+), 48 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/36059eba/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ef9f56..02bd134 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ # specific language governing permissions and limitations # under the License. # -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 2.8.7) project (Proton C) http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/36059eba/proton-c/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt index f10aa5b..0f60ce0 100644 --- a/proton-c/CMakeLists.txt +++ b/proton-c/CMakeLists.txt @@ -23,31 +23,12 @@ include(CheckSymbolExists) include(soversion.cmake) -if(WIN32 AND NOT CYGWIN) - # linking against Windows native libraries, including mingw - set (PN_WINAPI TRUE) - set (PLATFORM_LIBS ws2_32 Rpcrt4) - list(APPEND PLATFORM_DEFINITIONS "PN_WINAPI") -endif(WIN32 AND NOT CYGWIN) - -# Can't use ${CMAKE_VERSION) as it is not available in all versions of cmake 2.6 -if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.8.0") - # OPTIONAL does not exist in install before 2.8 so always make docs and install - set (OPTIONAL_ARG "") - add_custom_target(docs ALL) - # There are bugs in the OpenSSL detection that mean -lcrypto is missed from the link line - # so turn off unknown symbol warnings - set (NOENABLE_UNDEFINED_ERROR ON) - set (OLD_ADD_TEST_COMMAND ON) -else() - set (OPTIONAL_ARG OPTIONAL) - add_custom_target(docs) -endif() +add_custom_target(docs) add_custom_target(doc DEPENDS docs) # Set the default SSL/TLS implementation find_package(OpenSSL) -find_package (PythonInterp REQUIRED) +find_package(PythonInterp REQUIRED) find_package(SWIG) # FindSwig.cmake "forgets" make its outputs advanced like a good citizen mark_as_advanced(SWIG_DIR SWIG_EXECUTABLE SWIG_VERSION) @@ -62,6 +43,11 @@ mark_as_advanced(CYRUS_SASL_LIBRARY CYRUS_SASL_INCLUDE_DIR) find_program(SASLPASSWD_EXE saslpasswd2 DOC "Program used to make SASL user db for testing") mark_as_advanced(SASLPASSWD_EXE) +if(WIN32 AND NOT CYGWIN) + # linking against Windows native libraries, including mingw + set (PN_WINAPI TRUE) +endif(WIN32 AND NOT CYGWIN) + set(ssl_impl, none) if(PN_WINAPI) set(ssl_impl schannel) @@ -184,6 +170,11 @@ else (C99_ATOLL) endif (WINAPI_ATOI64) endif (C99_ATOLL) +if (PN_WINAPI) + set (PLATFORM_LIBS ws2_32 Rpcrt4) + list(APPEND PLATFORM_DEFINITIONS "PN_WINAPI") +endif (PN_WINAPI) + # Try to keep any platform specific overrides together here: # MacOS has a bunch of differences in build tools and process and so we have to turn some things @@ -520,28 +511,15 @@ if (BUILD_PYTHON) set (py_pythonpath ${py_root} ${py_src} ${py_bin} ${py_dll} $ENV{PYTHONPATH}) to_native_path ("${py_pythonpath}" py_pythonpath) - if (NOT OLD_ADD_TEST_COMMAND) - to_native_path ("${py_path}" py_path) - add_test (NAME python-test - COMMAND ${env_py} - "PATH=${py_path}" "PYTHONPATH=${py_pythonpath}" "PKG_CONFIG_PATH=${pn_c_root}" - "CLASSPATH=${CMAKE_BINARY_DIR}/proton-j/proton-j.jar" - "SASLPASSWD=${SASLPASSWD_EXE}" - ${VALGRIND_ENV} - ${PYTHON_EXECUTABLE} "${py_root}/proton-test") - set_tests_properties(python-test PROPERTIES PASS_REGULAR_EXPRESSION "Totals: .* 0 failed") - else (NOT OLD_ADD_TEST_COMMAND) - list (APPEND py_path "${Proton_BINARY_DIR}/tests/tools/apps/c") - to_native_path ("${py_path}" py_path) - add_test (python-test - ${env_py} - "PATH=${py_path}" "PYTHONPATH=${py_pythonpath}" "PKG_CONFIG_PATH=${pn_c_root}" - "CLASSPATH=${CMAKE_BINARY_DIR}/proton-j/proton-j.jar" - "SASLPASSWD=${SASLPASSWD_EXE}" - ${VALGRIND_ENV} - ${PYTHON_EXECUTABLE} "${py_root}/proton-test") - set_tests_properties(python-test PROPERTIES PASS_REGULAR_EXPRESSION "Totals: .* 0 failed") - endif (NOT OLD_ADD_TEST_COMMAND) + to_native_path ("${py_path}" py_path) + add_test (NAME python-test + COMMAND ${env_py} + "PATH=${py_path}" "PYTHONPATH=${py_pythonpath}" "PKG_CONFIG_PATH=${pn_c_root}" + "CLASSPATH=${CMAKE_BINARY_DIR}/proton-j/proton-j.jar" + "SASLPASSWD=${SASLPASSWD_EXE}" + ${VALGRIND_ENV} + ${PYTHON_EXECUTABLE} "${py_root}/proton-test") + set_tests_properties(python-test PROPERTIES PASS_REGULAR_EXPRESSION "Totals: .* 0 failed") # Eventually, we'll get rid of this check when other # platforms will be supported. Since `setup.py` will skip http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/36059eba/proton-c/bindings/cpp/docs/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/docs/CMakeLists.txt b/proton-c/bindings/cpp/docs/CMakeLists.txt index 94b9f0b..cf7876e 100644 --- a/proton-c/bindings/cpp/docs/CMakeLists.txt +++ b/proton-c/bindings/cpp/docs/CMakeLists.txt @@ -30,7 +30,7 @@ if (DOXYGEN_FOUND) install (DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" DESTINATION "${PROTON_SHARE}/docs/api-cpp" COMPONENT documentation - ${OPTIONAL_ARG}) + OPTIONAL) endif (DOXYGEN_FOUND) set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES html) http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/36059eba/proton-c/bindings/python/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/proton-c/bindings/python/CMakeLists.txt b/proton-c/bindings/python/CMakeLists.txt index d16caad..7da9247 100644 --- a/proton-c/bindings/python/CMakeLists.txt +++ b/proton-c/bindings/python/CMakeLists.txt @@ -92,7 +92,7 @@ if (EPYDOC_EXE) install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" DESTINATION "${PROTON_SHARE}/docs/api-py" COMPONENT documentation - ${OPTIONAL_ARG}) + OPTIONAL) endif (EPYDOC_EXE) find_program(SPHINX_EXE sphinx-build) @@ -105,7 +105,7 @@ if (SPHINX_EXE) install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/tutorial/" DESTINATION "${PROTON_SHARE}/docs/tutorial-py" COMPONENT documentation - ${OPTIONAL_ARG}) + OPTIONAL) endif (SPHINX_EXE) install(FILES ${CPROTON_ARTIFACTS} http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/36059eba/proton-c/docs/api/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/proton-c/docs/api/CMakeLists.txt b/proton-c/docs/api/CMakeLists.txt index 566ce2f..7756e48 100644 --- a/proton-c/docs/api/CMakeLists.txt +++ b/proton-c/docs/api/CMakeLists.txt @@ -28,7 +28,7 @@ if (DOXYGEN_FOUND) install (DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" DESTINATION "${PROTON_SHARE}/docs/api-c" COMPONENT documentation - ${OPTIONAL_ARG}) + OPTIONAL) set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES html) endif (DOXYGEN_FOUND) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
