diff options
author | Brad King <brad.king@kitware.com> | 2023-12-19 13:09:49 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-12-19 13:10:15 (GMT) |
commit | d2cbadf3b435af9d271b5ed174c56c16af771f79 (patch) | |
tree | 9e3210ea8362b25b4dee9d9704b94d46e4c5c72b /Tests | |
parent | 923cb0ed2faabd1e65b112af03066e6b77d31be1 (diff) | |
parent | dc5098429b5bd6b5f5c61eb76dcdb79f022b323e (diff) | |
download | CMake-d2cbadf3b435af9d271b5ed174c56c16af771f79.zip CMake-d2cbadf3b435af9d271b5ed174c56c16af771f79.tar.gz CMake-d2cbadf3b435af9d271b5ed174c56c16af771f79.tar.bz2 |
Merge topic 'package-dispatch-apple'
dc5098429b CMakePackageConfigHelpers: Clarify Apple platform selection usage error
3b9586671c CMakePackageConfigHelpers: Clarify Apple platform selection template name
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9087
Diffstat (limited to 'Tests')
4 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakePackage/ApplePlatformMissingDest-result.txt b/Tests/RunCMake/CMakePackage/ApplePlatformMissingDest-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMakePackage/ApplePlatformMissingDest-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMakePackage/ApplePlatformMissingDest-stderr.txt b/Tests/RunCMake/CMakePackage/ApplePlatformMissingDest-stderr.txt new file mode 100644 index 0000000..03be015 --- /dev/null +++ b/Tests/RunCMake/CMakePackage/ApplePlatformMissingDest-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at [^ +]*/Modules/CMakePackageConfigHelpers\.cmake:[0-9]+ \(message\): + No INSTALL_DESTINATION given to generate_apple_platform_selection_file\(\) +Call Stack \(most recent call first\): + ApplePlatformMissingDest\.cmake:[0-9]+ \(generate_apple_platform_selection_file\) + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CMakePackage/ApplePlatformMissingDest.cmake b/Tests/RunCMake/CMakePackage/ApplePlatformMissingDest.cmake new file mode 100644 index 0000000..e47b595 --- /dev/null +++ b/Tests/RunCMake/CMakePackage/ApplePlatformMissingDest.cmake @@ -0,0 +1,4 @@ +include(CMakePackageConfigHelpers) +generate_apple_platform_selection_file(mylib-config-install.cmake + #missing: INSTALL_DESTINATION lib/cmake/mylib + ) diff --git a/Tests/RunCMake/CMakePackage/RunCMakeTest.cmake b/Tests/RunCMake/CMakePackage/RunCMakeTest.cmake index 9fef792..9c1dbd5 100644 --- a/Tests/RunCMake/CMakePackage/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakePackage/RunCMakeTest.cmake @@ -33,6 +33,10 @@ function(apple_import platform system_name archs sysroot) run_cmake_command(apple-import-${platform}-build ${CMAKE_COMMAND} --build . --config Release) endfunction() +if(APPLE) + run_cmake(ApplePlatformMissingDest) +endif() + if(APPLE AND CMAKE_C_COMPILER_ID STREQUAL "AppleClang") set(apple_install ${RunCMake_BINARY_DIR}/apple-install) file(REMOVE_RECURSE "${apple_install}") |