Skip to content

Commit 94738dd

Browse files
[CMake][AIX] Enable CMP0182: Create shared library archives by default (#155686)
On AIX we prefer to create shared libraries as shared library archives (i.e. we archive the shared object in a big AR archive) as this is the standard format on the platform. There is now a CMake policy that allows us to do this by default, so opt-in to that behaviour. --------- Co-authored-by: Hubert Tong <[email protected]>
1 parent 736c9c6 commit 94738dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmake/Modules/CMakePolicy.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,9 @@ if(POLICY CMP0156)
4141
cmake_policy(SET CMP0179 NEW)
4242
endif()
4343
endif()
44+
45+
# CMP0182: Create shared library archives by default on AIX.
46+
# New in CMake 4.0: https://cmake.org/cmake/help/latest/policy/CMP0182.html
47+
if(POLICY CMP0182)
48+
cmake_policy(SET CMP0182 NEW)
49+
endif()

0 commit comments

Comments
 (0)