diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-08-11 14:27:01 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-08-11 14:30:02 (GMT) |
commit | 8b0f0dc25779515c7904cd2286a54e6055cb9f19 (patch) | |
tree | d302c2884184eb0dbf8bae8d3814b870cbb189ae | |
parent | f3d9a8211042c3df043d886f2217a705a62168a8 (diff) | |
download | CMake-8b0f0dc25779515c7904cd2286a54e6055cb9f19.zip CMake-8b0f0dc25779515c7904cd2286a54e6055cb9f19.tar.gz CMake-8b0f0dc25779515c7904cd2286a54e6055cb9f19.tar.bz2 |
Apple Text Stubs (.tbd): various fixes
* ensure tapi lookup is applied only for concerned toolchains
* fix typos in tests
Fixes: #25182
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/AppleTextStubs/Framework-import.cmake | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 327ef0b..f778891 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -229,7 +229,7 @@ if(NOT CMAKE_RANLIB) set(CMAKE_RANLIB : CACHE INTERNAL "noop for ranlib") endif() -if(NOT CMAKE_TAPI) +if(APPLE AND "TAPI" IN_LIST _CMAKE_TOOL_VARS AND NOT CMAKE_TAPI) # try to pick-up from Apple toolchain execute_process(COMMAND xcrun --find tapi OUTPUT_VARIABLE _xcrun_out diff --git a/Tests/RunCMake/AppleTextStubs/Framework-import.cmake b/Tests/RunCMake/AppleTextStubs/Framework-import.cmake index e0001d0..d142c0c 100644 --- a/Tests/RunCMake/AppleTextStubs/Framework-import.cmake +++ b/Tests/RunCMake/AppleTextStubs/Framework-import.cmake @@ -10,15 +10,15 @@ if (NOT is_framework) message(SEND_ERROR "foo-build::foo: FRAMEWORK not set.") endif() get_property(enable_exports TARGET foo-install::foo PROPERTY ENABLE_EXPORTS) -if (CAMKE_TAPI AND NOT enable_exports) +if (CMAKE_TAPI AND NOT enable_exports) message(SEND_ERROR "foo-install::foo: ENABLE_EXPORTS not set.") endif() get_property(implib TARGET foo-install::foo PROPERTY IMPORTED_IMPLIB_RELEASE) -if (CAMKE_TAPI AND NOT implib) +if (CMAKE_TAPI AND NOT implib) message(SEND_ERROR "foo-install::foo: IMPORTED_IMPLIB_RELEASE not set.") endif() -if (CAMKE_TAPI AND NOT implib MATCHES "foo.framework/Versions/A/foo.tbd$") +if (CMAKE_TAPI AND NOT implib MATCHES "foo.framework/Versions/A/foo.tbd$") message(SEND_ERROR "foo-install::foo: ${implib}: wrong value for IMPORTED_IMPLIB_RELEASE.") endif() @@ -41,15 +41,15 @@ if (NOT is_framework) message(SEND_ERROR "foo-build::foo: FRAMEWORK not set.") endif() get_property(enable_exports TARGET foo-build::foo PROPERTY ENABLE_EXPORTS) -if (CAMKE_TAPI AND NOT enable_exports) +if (CMAKE_TAPI AND NOT enable_exports) message(SEND_ERROR "foo-build::foo: ENABLE_EXPORTS not set.") endif() get_property(implib TARGET foo-build::foo PROPERTY IMPORTED_IMPLIB_RELEASE) -if (CAMKE_TAPI AND NOT implib) +if (CMAKE_TAPI AND NOT implib) message(SEND_ERROR "foo-build::foo: IMPORTED_IMPLIB_RELEASE not set.") endif() -if (CAMKE_TAPI AND NOT implib STREQUAL "${foo_BUILD}/foo.framework/Versions/A/foo.tbd") +if (CMAKE_TAPI AND NOT implib STREQUAL "${foo_BUILD}/foo.framework/Versions/A/foo.tbd") message(SEND_ERROR "foo-build::foo: ${implib}: wrong value for IMPORTED_IMPLIB_RELEASE.") endif() |