diff options
author | Brad King <brad.king@kitware.com> | 2024-04-15 18:01:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-04-15 18:01:33 (GMT) |
commit | f1cacaa8304860c9db4ee5a469518a1a25e60e43 (patch) | |
tree | a65295f20864681a2ab1185ff4d06e69075f5679 | |
parent | d3190d6a730207a56ef2144566468975167a811e (diff) | |
download | CMake-f1cacaa8304860c9db4ee5a469518a1a25e60e43.zip CMake-f1cacaa8304860c9db4ee5a469518a1a25e60e43.tar.gz CMake-f1cacaa8304860c9db4ee5a469518a1a25e60e43.tar.bz2 |
Tests/RunCMake/CMakePackage: Define variable closer to where it is used
-rw-r--r-- | Tests/RunCMake/CMakePackage/RunCMakeTest.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Tests/RunCMake/CMakePackage/RunCMakeTest.cmake b/Tests/RunCMake/CMakePackage/RunCMakeTest.cmake index 1551b55..848c36d 100644 --- a/Tests/RunCMake/CMakePackage/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakePackage/RunCMakeTest.cmake @@ -48,9 +48,6 @@ if(APPLE) endif() if(APPLE AND CMAKE_C_COMPILER_ID STREQUAL "AppleClang") - set(apple_install ${RunCMake_BINARY_DIR}/apple-install) - file(REMOVE_RECURSE "${apple_install}") - if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 12) set(macos_archs "x86_64;arm64") set(tvos_sim_archs "x86_64;arm64") @@ -78,6 +75,10 @@ if(APPLE AND CMAKE_C_COMPILER_ID STREQUAL "AppleClang") set(enable_visionos 1) endif() + # Place all export/import steps in a single install prefix. + set(apple_install ${RunCMake_BINARY_DIR}/apple-install) + file(REMOVE_RECURSE "${apple_install}") + apple_export(macos Darwin "${macos_archs}" macosx) apple_export(ios iOS "arm64" iphoneos) apple_export(tvos tvOS "arm64" appletvos) |