diff options
author | Brad King <brad.king@kitware.com> | 2024-11-23 20:12:26 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-11-23 20:12:49 (GMT) |
commit | 2fad42832d41092dd21e63185d23fde3e44103a5 (patch) | |
tree | 16978f78ca78b65625c86c9c31d6b0922e54f5d6 /Tests | |
parent | 5caaf1d6518fca74bc46de9cf5bfddc39be441e6 (diff) | |
parent | cd6fb6309328a9c113f1fe3c2b842d4650c81980 (diff) | |
download | CMake-2fad42832d41092dd21e63185d23fde3e44103a5.zip CMake-2fad42832d41092dd21e63185d23fde3e44103a5.tar.gz CMake-2fad42832d41092dd21e63185d23fde3e44103a5.tar.bz2 |
Merge topic 'aix-archive-shared-libraries-export' into release-3.31
cd6fb63093 AIX: Propagate AIX_SHARED_LIBRARY_ARCHIVE through exports
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10027
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/ExportImport/Export/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/ExportImport/Export/testSharedObjectAIX.c (renamed from Tests/ExportImport/Export/testSharedLibArchiveAIX.c) | 2 | ||||
-rw-r--r-- | Tests/ExportImport/Import/A/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/ExportImport/Import/A/imp_testExe1.c | 4 | ||||
-rw-r--r-- | Tests/SharedLibraryArchive/CMakeLists.txt | 6 |
5 files changed, 17 insertions, 9 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 2cc2354..f6d32b8 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -5,6 +5,8 @@ if(POLICY CMP0129) endif() project(Export C CXX) +set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 1) + find_package(Foo REQUIRED CONFIG NO_DEFAULT_PATH) # Pretend that RelWithDebInfo should link to debug libraries to test @@ -482,8 +484,8 @@ add_library(testMod1 MODULE empty.cpp) add_library(testMod2 MODULE empty.cpp) set_property(TARGET testMod2 PROPERTY BUNDLE 1) -add_library(testSharedLibArchiveAIX SHARED testSharedLibArchiveAIX.c) -set_property(TARGET testSharedLibArchiveAIX PROPERTY AIX_SHARED_LIBRARY_ARCHIVE 1) +add_library(testSharedObjectAIX SHARED testSharedObjectAIX.c) +set_property(TARGET testSharedObjectAIX PROPERTY AIX_SHARED_LIBRARY_ARCHIVE 0) install(TARGETS testLibRequired EXPORT RequiredExp DESTINATION lib @@ -625,7 +627,7 @@ install( systemlib testInterfaceIncludeUser testInterfaceIncludeUser2 - testSharedLibArchiveAIX + testSharedObjectAIX EXPORT exp RUNTIME DESTINATION $<1:bin>$<0:/wrong> LIBRARY DESTINATION $<1:lib>$<0:/wrong> NAMELINK_SKIP @@ -703,7 +705,7 @@ export(TARGETS testExe2 testLib4 testLib5 testLib6 testLib7 testExe3 testExe4 te testExeWithPluginHelper testExePluginHelperObj testMod1 testMod2 testLibPerConfigDest - testSharedLibArchiveAIX + testSharedObjectAIX NAMESPACE bld_ APPEND FILE ExportBuildTree.cmake ) diff --git a/Tests/ExportImport/Export/testSharedLibArchiveAIX.c b/Tests/ExportImport/Export/testSharedObjectAIX.c index 25a29e0..9879c39 100644 --- a/Tests/ExportImport/Export/testSharedLibArchiveAIX.c +++ b/Tests/ExportImport/Export/testSharedObjectAIX.c @@ -4,7 +4,7 @@ # define EXPORT #endif -EXPORT int testSharedLibArchiveAIX(void) +EXPORT int testSharedObjectAIX(void) { return 0; } diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt index 84a50a6..7d933a4 100644 --- a/Tests/ExportImport/Import/A/CMakeLists.txt +++ b/Tests/ExportImport/Import/A/CMakeLists.txt @@ -68,7 +68,7 @@ target_link_libraries(imp_testExe1 exp_testLib7 exp_testLibCycleA exp_testLibPerConfigDest - exp_testSharedLibArchiveAIX + exp_testSharedObjectAIX exp_testStaticLibWithPlugin ) @@ -124,7 +124,7 @@ target_link_libraries(imp_testExe1b bld_testLib7 bld_testLibCycleA bld_testLibPerConfigDest - bld_testSharedLibArchiveAIX + bld_testSharedObjectAIX bld_testStaticLibWithPlugin ) diff --git a/Tests/ExportImport/Import/A/imp_testExe1.c b/Tests/ExportImport/Import/A/imp_testExe1.c index 7f30c5d..554bf4b 100644 --- a/Tests/ExportImport/Import/A/imp_testExe1.c +++ b/Tests/ExportImport/Import/A/imp_testExe1.c @@ -11,7 +11,7 @@ extern int testLib7(void); extern int testLibCycleA1(void); extern int testLibPerConfigDest(void); extern int testStaticLibPlugin(void); -extern int testSharedLibArchiveAIX(void); +extern int testSharedObjectAIX(void); /* Switch a symbol between debug and optimized builds to make sure the proper library is found from the testLib4 link interface. */ @@ -27,6 +27,6 @@ int main(void) return (testLib2() + generated_by_testExe1() + testLib3() + testLib4() + testLib5() + testLib6() + testLib7() + testLibCycleA1() + testLibPerConfigDest() + testStaticLibPlugin() + - testSharedLibArchiveAIX() + generated_by_testExe3() + + testSharedObjectAIX() + generated_by_testExe3() + generated_by_testExe4() + testLib4lib() + testLib4libcfg()); } diff --git a/Tests/SharedLibraryArchive/CMakeLists.txt b/Tests/SharedLibraryArchive/CMakeLists.txt index f6bef24..cc961f1 100644 --- a/Tests/SharedLibraryArchive/CMakeLists.txt +++ b/Tests/SharedLibraryArchive/CMakeLists.txt @@ -36,3 +36,9 @@ if(aix_sla_versioned) message(FATAL_ERROR "AIX_SHARED_LIBRARY_ARCHIVE initialized on EXECUTABLE") endif() target_link_libraries(UseSLA_versioned PRIVATE sla_versioned) + +add_library(imported SHARED IMPORTED) +get_property(aix_sla TARGET imported PROPERTY AIX_SHARED_LIBRARY_ARCHIVE) +if(aix_sla) + message(FATAL_ERROR "AIX_SHARED_LIBRARY_ARCHIVE initialized on imported target") +endif() |