This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, master has been updated via dbd14ecacf9b85dcdf5f566538167261dba224fe (commit) via 5c3c2285706cf03e11562b7573f7f75a059a963b (commit) via 70307b935193789624fc694b4e94175e902fdc2e (commit) via e123cfec099ee0c225a49fd698a9802305b86e1c (commit) via bd1f350883fe0c276b319873d38164b56689b8bb (commit) via 9decc17a232055ccd8510e9c92383d0f3299f424 (commit) via 721b99defc53e88a5c7ce295d075288f0566f719 (commit) via 94d669ecc7914bec49288a5a91efefc1f23eb2a0 (commit) via abac3a31a2caba00e56db917cebaae8e47ffeefd (commit) via b30701f04500b44810ec1413fe787a0c88a98c41 (commit) via accbaf5f733fb9046c0d16903021c25febc9bd97 (commit) via 0692eaf0fe00fd4bd90c2a4f107356b2bc0f9d99 (commit) via 63c0bc929240b0dd7253cced980fea0b735eb5c3 (commit) via f805cdd2614b932d7a5b1b236f75ad11d59f349d (commit) via b7955bd9311601906ef4cb919c2e8f38d977d3d9 (commit) via 687a354518c8f6d5d1864ef9cd5d823b92b305bb (commit) from 543ceb9d9e06647356328313b8d0ec0c4a171de3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbd14ecacf9b85dcdf5f566538167261dba224fe commit dbd14ecacf9b85dcdf5f566538167261dba224fe Merge: 5c3c228570 687a354518 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Nov 4 15:29:47 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Mon Nov 4 10:30:39 2019 -0500 Merge topic 'FindPython-customize-failure-message' 687a354518 FindPython: customize failure message Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3970 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5c3c2285706cf03e11562b7573f7f75a059a963b commit 5c3c2285706cf03e11562b7573f7f75a059a963b Merge: 70307b9351 63c0bc9292 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Nov 4 15:29:36 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Mon Nov 4 10:29:44 2019 -0500 Merge topic 'cpack_absolute_package_directory' 63c0bc9292 CPack: Ensure CPACK_PACKAGE_DIRECTORY is an absolute path Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3946 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70307b935193789624fc694b4e94175e902fdc2e commit 70307b935193789624fc694b4e94175e902fdc2e Merge: abac3a31a2 e123cfec09 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Nov 4 10:28:14 2019 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Nov 4 10:28:14 2019 -0500 Merge branch 'release-3.16' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=abac3a31a2caba00e56db917cebaae8e47ffeefd commit abac3a31a2caba00e56db917cebaae8e47ffeefd Merge: b30701f045 0692eaf0fe Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Nov 4 15:24:05 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Mon Nov 4 10:24:31 2019 -0500 Merge topic 'root-dir-assertion-fix' 0692eaf0fe ForceToRelativePath: Fix spurious assertion when local path is root dir Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3976 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b30701f04500b44810ec1413fe787a0c88a98c41 commit b30701f04500b44810ec1413fe787a0c88a98c41 Merge: accbaf5f73 f805cdd261 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Nov 4 15:23:11 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Mon Nov 4 10:23:46 2019 -0500 Merge topic 'FindwxWidgets-wxwin-313' f805cdd261 FindwxWidgets: Add support for 3.1.3 VS binaries Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3972 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=accbaf5f733fb9046c0d16903021c25febc9bd97 commit accbaf5f733fb9046c0d16903021c25febc9bd97 Merge: 543ceb9d9e b7955bd931 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Nov 4 15:20:59 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Mon Nov 4 10:22:29 2019 -0500 Merge topic 'update-compile-feature-supported-compiler-list' b7955bd931 Help: Remove out of date bounds on compile feature supported versions Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3974 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63c0bc929240b0dd7253cced980fea0b735eb5c3 commit 63c0bc929240b0dd7253cced980fea0b735eb5c3 Author: Johnny Jazeix <jaz...@gmail.com> AuthorDate: Wed Oct 30 18:53:21 2019 +0100 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Nov 1 10:18:33 2019 -0400 CPack: Ensure CPACK_PACKAGE_DIRECTORY is an absolute path Fixes: #18133, #19412 diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 58956522f4..d7868f3465 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -314,7 +314,7 @@ int main(int argc, char const* const* argv) else { // get a default value (current working directory) cpackProjectDirectory = cmsys::SystemTools::GetCurrentWorkingDirectory(); - // use default value iff no value has been provided by the config file + // use default value if no value has been provided by the config file if (!globalMF.IsSet("CPACK_PACKAGE_DIRECTORY")) { globalMF.AddDefinition("CPACK_PACKAGE_DIRECTORY", cpackProjectDirectory); @@ -324,6 +324,12 @@ int main(int argc, char const* const* argv) globalMF.AddDefinition(cd.first, cd.second); } + // Force CPACK_PACKAGE_DIRECTORY as absolute path + cpackProjectDirectory = globalMF.GetDefinition("CPACK_PACKAGE_DIRECTORY"); + cpackProjectDirectory = + cmSystemTools::CollapseFullPath(cpackProjectDirectory); + globalMF.AddDefinition("CPACK_PACKAGE_DIRECTORY", cpackProjectDirectory); + const char* cpackModulesPath = globalMF.GetDefinition("CPACK_MODULE_PATH"); if (cpackModulesPath) { globalMF.AddDefinition("CMAKE_MODULE_PATH", cpackModulesPath); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=687a354518c8f6d5d1864ef9cd5d823b92b305bb commit 687a354518c8f6d5d1864ef9cd5d823b92b305bb Author: Marc Chevrier <marc.chevr...@gmail.com> AuthorDate: Thu Oct 31 17:05:48 2019 +0100 Commit: Marc Chevrier <marc.chevr...@gmail.com> CommitDate: Fri Nov 1 12:10:30 2019 +0100 FindPython: customize failure message diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index b67d563b5c..0d6d2fca16 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -409,6 +409,7 @@ function (_PYTHON_VALIDATE_INTERPRETER) if (_PVI_CHECK_EXISTS AND NOT EXISTS "${_${_PYTHON_PREFIX}_EXECUTABLE}") # interpreter does not exist anymore + set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot find the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"") set_property (CACHE _${_PYTHON_PREFIX}_EXECUTABLE PROPERTY VALUE "_${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND") return() endif() @@ -427,6 +428,7 @@ function (_PYTHON_VALIDATE_INTERPRETER) endif() if (NOT abi IN_LIST _${_PYTHON_PREFIX}_ABIFLAGS) # incompatible ABI + set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong ABI for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"") set_property (CACHE _${_PYTHON_PREFIX}_EXECUTABLE PROPERTY VALUE "_${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND") return() endif() @@ -444,6 +446,11 @@ function (_PYTHON_VALIDATE_INTERPRETER) OUTPUT_STRIP_TRAILING_WHITESPACE) if (result OR (_PVI_EXACT AND NOT version VERSION_EQUAL expected_version) OR (version VERSION_LESS expected_version)) # interpreter not usable or has wrong major version + if (result) + set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot use the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"") + else() + set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong major version for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"") + endif() set_property (CACHE _${_PYTHON_PREFIX}_EXECUTABLE PROPERTY VALUE "_${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND") return() endif() @@ -459,6 +466,11 @@ function (_PYTHON_VALIDATE_INTERPRETER) OUTPUT_STRIP_TRAILING_WHITESPACE) if (result OR NOT version EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) # interpreter not usable or has wrong major version + if (result) + set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot use the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"") + else() + set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong major version for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"") + endif() set_property (CACHE _${_PYTHON_PREFIX}_EXECUTABLE PROPERTY VALUE "_${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND") return() endif() @@ -476,6 +488,11 @@ function (_PYTHON_VALIDATE_INTERPRETER) OUTPUT_STRIP_TRAILING_WHITESPACE) if (result OR NOT size EQUAL CMAKE_SIZEOF_VOID_P) # interpreter not usable or has wrong architecture + if (result) + set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot use the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"") + else() + set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong architecture for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"") + endif() set_property (CACHE _${_PYTHON_PREFIX}_EXECUTABLE PROPERTY VALUE "_${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND") return() endif() @@ -500,6 +517,7 @@ function (_PYTHON_VALIDATE_COMPILER expected_version) if (_PVC_CHECK_EXISTS AND NOT EXISTS "${_${_PYTHON_PREFIX}_COMPILER}") # Compiler does not exist anymore + set (_${_PYTHON_PREFIX}_Compiler_REASON_FAILURE "Cannot find the compiler \"${_${_PYTHON_PREFIX}_COMPILER}\"") set_property (CACHE _${_PYTHON_PREFIX}_COMPILER PROPERTY VALUE "_${_PYTHON_PREFIX}_COMPILER-NOTFOUND") return() endif() @@ -526,6 +544,11 @@ function (_PYTHON_VALIDATE_COMPILER expected_version) if (result OR (_PVC_EXACT AND NOT version VERSION_EQUAL expected_version) OR (version VERSION_LESS expected_version)) # Compiler not usable or has wrong version + if (result) + set (_${_PYTHON_PREFIX}_Compiler_REASON_FAILURE "Cannot use the compiler \"${_${_PYTHON_PREFIX}_COMPILER}\"") + else() + set (_${_PYTHON_PREFIX}_Compiler_REASON_FAILURE "Wrong version for the compiler \"${_${_PYTHON_PREFIX}_COMPILER}\"") + endif() set_property (CACHE _${_PYTHON_PREFIX}_COMPILER PROPERTY VALUE "_${_PYTHON_PREFIX}_COMPILER-NOTFOUND") endif() endfunction() @@ -545,6 +568,7 @@ function (_PYTHON_VALIDATE_LIBRARY) if (_PVL_CHECK_EXISTS AND NOT EXISTS "${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}") # library does not exist anymore + set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Cannot find the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"") set_property (CACHE _${_PYTHON_PREFIX}_LIBRARY_RELEASE PROPERTY VALUE "_${_PYTHON_PREFIX}_LIBRARY_RELEASE-NOTFOUND") if (WIN32) set_property (CACHE _${_PYTHON_PREFIX}_LIBRARY_DEBUG PROPERTY VALUE "_${_PYTHON_PREFIX}_LIBRARY_DEBUG-NOTFOUND") @@ -558,16 +582,19 @@ function (_PYTHON_VALIDATE_LIBRARY) if (DEFINED _${_PYTHON_PREFIX}_FIND_ABI AND NOT lib_ABI IN_LIST _${_PYTHON_PREFIX}_ABIFLAGS) # incompatible ABI + set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong ABI for the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"") set_property (CACHE _${_PYTHON_PREFIX}_LIBRARY_RELEASE PROPERTY VALUE "_${_PYTHON_PREFIX}_LIBRARY_RELEASE-NOTFOUND") else() if (expected_version) if ((_PVL_EXACT AND NOT lib_VERSION VERSION_EQUAL expected_version) OR (lib_VERSION VERSION_LESS expected_version)) # library has wrong version + set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong version for the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"") set_property (CACHE _${_PYTHON_PREFIX}_LIBRARY_RELEASE PROPERTY VALUE "_${_PYTHON_PREFIX}_LIBRARY_RELEASE-NOTFOUND") endif() else() if (NOT lib_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) # library has wrong major version + set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong major version for the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"") set_property (CACHE _${_PYTHON_PREFIX}_LIBRARY_RELEASE PROPERTY VALUE "_${_PYTHON_PREFIX}_LIBRARY_RELEASE-NOTFOUND") endif() endif() @@ -596,6 +623,7 @@ function (_PYTHON_VALIDATE_INCLUDE_DIR) if (_PVID_CHECK_EXISTS AND NOT EXISTS "${_${_PYTHON_PREFIX}_INCLUDE_DIR}") # include file does not exist anymore + set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Cannot find the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"") set_property (CACHE _${_PYTHON_PREFIX}_INCLUDE_DIR PROPERTY VALUE "_${_PYTHON_PREFIX}_INCLUDE_DIR-NOTFOUND") return() endif() @@ -605,16 +633,19 @@ function (_PYTHON_VALIDATE_INCLUDE_DIR) if (DEFINED _${_PYTHON_PREFIX}_FIND_ABI AND NOT inc_ABI IN_LIST _${_PYTHON_PREFIX}_ABIFLAGS) # incompatible ABI + set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong ABI for the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"") set_property (CACHE _${_PYTHON_PREFIX}_INCLUDE_DIR PROPERTY VALUE "_${_PYTHON_PREFIX}_INCLUDE_DIR-NOTFOUND") else() if (expected_version) if ((_PVID_EXACT AND NOT inc_VERSION VERSION_EQUAL expected_version) OR (inc_VERSION VERSION_LESS expected_version)) # include dir has wrong version + set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong version for the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"") set_property (CACHE _${_PYTHON_PREFIX}_INCLUDE_DIR PROPERTY VALUE "_${_PYTHON_PREFIX}_INCLUDE_DIR-NOTFOUND") endif() else() if (NOT inc_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) # include dir has wrong major version + set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong major version for the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"") set_property (CACHE _${_PYTHON_PREFIX}_INCLUDE_DIR PROPERTY VALUE "_${_PYTHON_PREFIX}_INCLUDE_DIR-NOTFOUND") endif() endif() @@ -836,6 +867,10 @@ endif() unset (_${_PYTHON_PREFIX}_REQUIRED_VARS) unset (_${_PYTHON_PREFIX}_CACHED_VARS) +unset (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE) +unset (_${_PYTHON_PREFIX}_Compiler_REASON_FAILURE) +unset (_${_PYTHON_PREFIX}_Development_REASON_FAILURE) +unset (_${_PYTHON_PREFIX}_NumPy_REASON_FAILURE) # first step, search for the interpreter @@ -1161,6 +1196,7 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) # Interpreter is not usable set (_${_PYTHON_PREFIX}_EXECUTABLE_USABLE FALSE) unset (${_PYTHON_PREFIX}_VERSION) + set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot run the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"") endif() endif() @@ -1416,6 +1452,7 @@ if ("Compiler" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) else() # compiler not usable set (_${_PYTHON_PREFIX}_COMPILER_USABLE FALSE) + set (_${_PYTHON_PREFIX}_Compiler_REASON_FAILURE "Cannot run the compiler \"${_${_PYTHON_PREFIX}_COMPILER}\"") endif() file (REMOVE_RECURSE "${_${_PYTHON_PREFIX}_VERSION_DIR}") endif() @@ -1914,6 +1951,7 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS set (${_PYTHON_PREFIX}_LIBRARY_RELEASE "${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}" CACHE FILEPATH "Path to a library." FORCE) if (_${_PYTHON_PREFIX}_LIBRARY_RELEASE AND NOT EXISTS "${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}") + set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Cannot find the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"") set_property (CACHE _${_PYTHON_PREFIX}_LIBRARY_RELEASE PROPERTY VALUE "_${_PYTHON_PREFIX}_LIBRARY_RELEASE-NOTFOUND") endif() @@ -2046,6 +2084,7 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS set (${_PYTHON_PREFIX}_INCLUDE_DIRS "${_${_PYTHON_PREFIX}_INCLUDE_DIR}") if (_${_PYTHON_PREFIX}_INCLUDE_DIR AND NOT EXISTS "${_${_PYTHON_PREFIX}_INCLUDE_DIR}") + set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Cannot find the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"") set_property (CACHE _${_PYTHON_PREFIX}_INCLUDE_DIR PROPERTY VALUE "_${_PYTHON_PREFIX}_INCLUDE_DIR-NOTFOUND") endif() @@ -2169,6 +2208,7 @@ if ("NumPy" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND ${_PYTHON_PREFIX}_Inte set (${_PYTHON_PREFIX}_NumPy_INCLUDE_DIRS "${_${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR}") if(_${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR AND NOT EXISTS "${_${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR}") + set (_${_PYTHON_PREFIX}_NumPy_REASON_FAILURE "Cannot find the directory \"${_${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR}\"") set_property (CACHE _${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR PROPERTY VALUE "_${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR-NOTFOUND") endif() @@ -2207,11 +2247,19 @@ if (${_PYTHON_PREFIX}_VERSION_MAJOR AND _python_display_failure ("Could NOT find ${_PYTHON_PREFIX}: Found unsuitable major version \"${${_PYTHON_PREFIX}_VERSION_MAJOR}\", but required major version is exact version \"${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR}\"") endif() +unset (_${_PYTHON_PREFIX}_REASON_FAILURE) +foreach (_${_PYTHON_PREFIX}_COMPONENT IN ITEMS Interpreter Compiler Development NumPy) + if (_${_PYTHON_PREFIX}_${_${_PYTHON_PREFIX}_COMPONENT}_REASON_FAILURE) + string (APPEND _${_PYTHON_PREFIX}_REASON_FAILURE "\n ${_${_PYTHON_PREFIX}_COMPONENT}: ${_${_PYTHON_PREFIX}_${_${_PYTHON_PREFIX}_COMPONENT}_REASON_FAILURE}") + endif() +endforeach() + include (${CMAKE_CURRENT_LIST_DIR}/../FindPackageHandleStandardArgs.cmake) find_package_handle_standard_args (${_PYTHON_PREFIX} REQUIRED_VARS ${_${_PYTHON_PREFIX}_REQUIRED_VARS} VERSION_VAR ${_PYTHON_PREFIX}_VERSION - HANDLE_COMPONENTS) + HANDLE_COMPONENTS + REASON_FAILURE_MESSAGE "${_${_PYTHON_PREFIX}_REASON_FAILURE}") # Create imported targets and helper functions if(_${_PYTHON_PREFIX}_CMAKE_ROLE STREQUAL "PROJECT") diff --git a/Tests/FindPython/CMakeLists.txt b/Tests/FindPython/CMakeLists.txt index 868cfe0e13..10c98c5360 100644 --- a/Tests/FindPython/CMakeLists.txt +++ b/Tests/FindPython/CMakeLists.txt @@ -134,6 +134,20 @@ if(CMake_TEST_FindPython) --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> ) + add_test(NAME FindPython.CustomFailureMessage COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/CustomFailureMessage" + "${CMake_BINARY_DIR}/Tests/FindPython/CustomFailureMessage" + ${build_generator_args} + --build-project TestCustomFailureMessage + --build-options ${build_options} "-Dbuild_generator_args=${build_generator_args}" + "-DCMake_SOURCE_DIR=${CMake_SOURCE_DIR}" + "-DCMake_BINARY_DIR=${CMake_BINARY_DIR}" + "-DCMake_TEST_FindPython_NumPy=${CMake_TEST_FindPython_NumPy}" + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) + endif() if(CMake_TEST_FindPython_NumPy) diff --git a/Tests/FindPython/CustomFailureMessage/CMakeLists.txt b/Tests/FindPython/CustomFailureMessage/CMakeLists.txt new file mode 100644 index 0000000000..a0d8eb2f44 --- /dev/null +++ b/Tests/FindPython/CustomFailureMessage/CMakeLists.txt @@ -0,0 +1,79 @@ +cmake_minimum_required(VERSION 3.1) + +project(TestCustomFailureMessage LANGUAGES NONE) + +include(CTest) + +add_test(NAME FindPython.CustomFailureMessage.Interpreter COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/CustomFailureMessage/Check" + "${CMake_BINARY_DIR}/Tests/FindPython/CustomFailureMessage/Interpreter" + ${build_generator_args} + --build-project TestCustomFailureMessage.Check + --build-options "-DCHECK_COMPONENTS=Interpreter" + "-DPython3_EXECUTABLE=/not/found/interpreter" + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) +set_tests_properties(FindPython.CustomFailureMessage.Interpreter PROPERTIES + PASS_REGULAR_EXPRESSION "Reason given by package:.+Interpreter: Cannot run the interpreter") + +add_test(NAME FindPython.CustomFailureMessage.Library COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/CustomFailureMessage/Check" + "${CMake_BINARY_DIR}/Tests/FindPython/CustomFailureMessage/Library" + ${build_generator_args} + --build-project TestCustomFailureMessage.Check + --build-options "-DCHECK_COMPONENTS=Development" + "-DPython3_LIBRARY=/not/found/library" + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) +set_tests_properties(FindPython.CustomFailureMessage.Library PROPERTIES + PASS_REGULAR_EXPRESSION "Reason given by package:.+Development: Cannot find the library") + +add_test(NAME FindPython.CustomFailureMessage.Include COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/CustomFailureMessage/Check" + "${CMake_BINARY_DIR}/Tests/FindPython/CustomFailureMessage/Include" + ${build_generator_args} + --build-project TestCustomFailureMessage.Check + --build-options "-DCHECK_COMPONENTS=Development" + "-DPython3_INCLUDE_DIR=/not/found/include" + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) +set_tests_properties(FindPython.CustomFailureMessage.Include PROPERTIES + PASS_REGULAR_EXPRESSION "Reason given by package:.+Development: Cannot find the directory") + +add_test(NAME FindPython.CustomFailureMessage.Multiple COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/CustomFailureMessage/Check" + "${CMake_BINARY_DIR}/Tests/FindPython/CustomFailureMessage/Multiple" + ${build_generator_args} + --build-project TestCustomFailureMessage.Check + --build-options "-DCHECK_COMPONENTS=Interpreter;Development" + "-DPython3_EXECUTABLE=/not/found/interpreter" + "-DPython3_LIBRARY=/not/found/library" + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) +set_tests_properties(FindPython.CustomFailureMessage.Multiple PROPERTIES + PASS_REGULAR_EXPRESSION "Reason given by package:.+Interpreter: Cannot run the interpreter.+Development: Cannot find the library") + + +if (CMake_TEST_FindPython_NumPy) + add_test(NAME FindPython.CustomFailureMessage.NumPy COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/CustomFailureMessage/Check" + "${CMake_BINARY_DIR}/Tests/FindPython/CustomFailureMessage/NumPy" + ${build_generator_args} + --build-project TestCustomFailureMessage.Check + --build-options "-DCHECK_COMPONENTS=Interpreter;Development;NumPy" + "-DPython3_NumPy_INCLUDE_DIR=/not/found/numpy/include" + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) + set_tests_properties(FindPython.CustomFailureMessage.NumPy PROPERTIES + PASS_REGULAR_EXPRESSION "Reason given by package:.+NumPy: Cannot find the directory") +endif() diff --git a/Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt b/Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt new file mode 100644 index 0000000000..fed963e476 --- /dev/null +++ b/Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.1) + +project(TestCustomFailureMessage.Check LANGUAGES C) + +find_package (Python3 REQUIRED COMPONENTS ${CHECK_COMPONENTS}) ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-compile-features.7.rst | 22 +++--- Modules/FindPython/Support.cmake | 50 +++++++++++++- Modules/FindwxWidgets.cmake | 10 +++ Source/CPack/cpack.cxx | 8 ++- Source/cmSystemTools.cxx | 9 ++- Tests/FindPython/CMakeLists.txt | 14 ++++ .../FindPython/CustomFailureMessage/CMakeLists.txt | 79 ++++++++++++++++++++++ .../CustomFailureMessage/Check/CMakeLists.txt | 5 ++ Tests/RunCMake/message/RunCMakeTest.cmake | 9 +++ .../message/warnmessage-rootdir-stderr.txt | 1 + Tests/RunCMake/message/warnmessage-rootdir.cmake | 5 ++ 11 files changed, 197 insertions(+), 15 deletions(-) create mode 100644 Tests/FindPython/CustomFailureMessage/CMakeLists.txt create mode 100644 Tests/FindPython/CustomFailureMessage/Check/CMakeLists.txt create mode 100644 Tests/RunCMake/message/warnmessage-rootdir-stderr.txt create mode 100644 Tests/RunCMake/message/warnmessage-rootdir.cmake hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits