summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-08-13 14:34:18 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-08-13 14:34:18 (GMT)
commit7a7922e0201fee6a6f45c702f96ca57a295c68fe (patch)
tree46ce288bb25beef05f43ad887bdb67bb11996492
parent37ab2f38aea33cd217f0d9f6982804129c35d81c (diff)
parentdc64d8250b686c26a557f58dfad46a0a2101299e (diff)
downloadCMake-7a7922e0201fee6a6f45c702f96ca57a295c68fe.zip
CMake-7a7922e0201fee6a6f45c702f96ca57a295c68fe.tar.gz
CMake-7a7922e0201fee6a6f45c702f96ca57a295c68fe.tar.bz2
Merge topic 'fix-hpux-link-search-shared-flags'
dc64d825 HP-UX: Fix linker search type flags for C shared libs on HP-UX
-rw-r--r--Modules/Platform/HP-UX.cmake17
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()