diff options
author | Chuck Atkins <chuck.atkins@kitware.com> | 2015-08-10 17:21:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-08-12 13:36:57 (GMT) |
commit | dc64d8250b686c26a557f58dfad46a0a2101299e (patch) | |
tree | 6a090f74ae79670c4039969bc38bf5fa2500d512 /Modules | |
parent | 2f16e608436193f465d4bac181db36464fa88e22 (diff) | |
download | CMake-dc64d8250b686c26a557f58dfad46a0a2101299e.zip CMake-dc64d8250b686c26a557f58dfad46a0a2101299e.tar.gz CMake-dc64d8250b686c26a557f58dfad46a0a2101299e.tar.bz2 |
HP-UX: Fix linker search type flags for C shared libs on HP-UX
Since commit v2.8.7~31^2 (HP: Drive shared library linking with compiler
front end, 2011-12-12) the C compiler is used to link shared libraries
instead of calling the linker directly, so linker options need to be
wrapped as -Wl,-foo instead of -foo.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Platform/HP-UX.cmake | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake index 65cc731..581301b 100644 --- a/Modules/Platform/HP-UX.cmake +++ b/Modules/Platform/HP-UX.cmake @@ -33,18 +33,11 @@ list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES # Initialize C and CXX link type selection flags. These flags are # used when building a shared library, shared module, or executable # that links to other libraries to select whether to use the static or -# shared versions of the libraries. Note that C modules and shared -# libs are built using ld directly so we leave off the "-Wl," portion. -foreach(type SHARED_LIBRARY SHARED_MODULE) - set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-a archive") - set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-a default") -endforeach() -foreach(type EXE) - set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-a,archive") - set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-a,default") -endforeach() +# shared versions of the libraries. foreach(type SHARED_LIBRARY SHARED_MODULE EXE) - set(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Wl,-a,archive") - set(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Wl,-a,default") + foreach(lang C CXX) + set(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-a,archive") + set(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-a,default") + endforeach() endforeach() |