diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-25 18:44:42 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-29 13:35:21 (GMT) |
commit | b66c494ca465766a6a46fc508d0ddd02b667873c (patch) | |
tree | b10c02606055742f1efd9b383858feb59240d63d /Tests | |
parent | efad4391e58175d36dc1b12611e504b0a339aae0 (diff) | |
download | CMake-b66c494ca465766a6a46fc508d0ddd02b667873c.zip CMake-b66c494ca465766a6a46fc508d0ddd02b667873c.tar.gz CMake-b66c494ca465766a6a46fc508d0ddd02b667873c.tar.bz2 |
Tests/RunCMake/property_init: test 'with_exports' properties
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/property_init/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/property_init/TargetsWithExports.cmake | 51 |
2 files changed, 52 insertions, 0 deletions
diff --git a/Tests/RunCMake/property_init/RunCMakeTest.cmake b/Tests/RunCMake/property_init/RunCMakeTest.cmake index 02b48c8..310da72 100644 --- a/Tests/RunCMake/property_init/RunCMakeTest.cmake +++ b/Tests/RunCMake/property_init/RunCMakeTest.cmake @@ -13,3 +13,4 @@ run_cmake(PICTargets) run_cmake(SharedLibrary) run_cmake(TargetsWithArtifact) run_cmake(TargetsWithCommands) +run_cmake(TargetsWithExports) diff --git a/Tests/RunCMake/property_init/TargetsWithExports.cmake b/Tests/RunCMake/property_init/TargetsWithExports.cmake new file mode 100644 index 0000000..9b2e213 --- /dev/null +++ b/Tests/RunCMake/property_init/TargetsWithExports.cmake @@ -0,0 +1,51 @@ +set(properties + # property expected alias + # Linking properties + ## Platforms + ### AIX + "AIX_EXPORT_ALL_SYMBOLS" "OFF" "<SAME>" + ### Windows + "WINDOWS_EXPORT_ALL_SYMBOLS" "OFF" "<SAME>" + ) + +prepare_target_types(symbol_export_target + EXECUTABLE SHARED + IMPORTED_EXECUTABLE IMPORTED_SHARED) +run_property_tests(symbol_export_target properties) + +# `ENABLE_EXPORTS` has a more complicated initialization. +set(properties + # property expected alias + # Linking properties + "ENABLE_EXPORTS" "OFF" "<SAME>" + ) + +prepare_target_types(executable + EXECUTABLE + IMPORTED_EXECUTABLE) +set(iteration "-ENABLE_EXPORTS") +run_property_tests(executable_target properties) + +set(with_defaults 1) + +set(CMAKE_SHARED_LIBRARY_ENABLE_EXPORTS OFF) +set(properties + # property expected alias + # Linking properties + "ENABLE_EXPORTS" "OFF" "<SAME>" + ) + +set(iteration "-SHARED_LIBRARY_ENABLE_EXPORTS") +run_property_tests(shared_library_target properties) +unset(CMAKE_SHARED_LIBRARY_ENABLE_EXPORTS) + +set(CMAKE_EXECUTABLE_ENABLE_EXPORTS OFF) +set(properties + # property expected alias + # Linking properties + "ENABLE_EXPORTS" "OFF" "<SAME>" + ) + +set(iteration "-EXECUTABLE_ENABLE_EXPORTS") +run_property_tests(executable_target properties) +unset(CMAKE_EXECUTABLE_ENABLE_EXPORTS) |