summaryrefslogtreecommitdiff
path: root/Modules/CMakeCInformation.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-22 09:13:04 -0500
committerBrad King <brad.king@kitware.com>2008-01-22 09:13:04 -0500
commit96fd5909d9dd1ffe740230ce652d574cd01c62d5 (patch)
treee83b3ce2d5066660256a69cacb6caa7d2d95c416 /Modules/CMakeCInformation.cmake
parent0df9e6904cd2416336a85d6d7972ce84dcbab417 (diff)
downloadcmake-96fd5909d9dd1ffe740230ce652d574cd01c62d5.tar.gz
ENH: Implement linking with paths to library files instead of -L and -l separation. See bug #3832
- This is purely an implementation improvement. No interface has changed. - Create cmComputeLinkInformation class - Move and re-implement logic from: cmLocalGenerator::ComputeLinkInformation cmOrderLinkDirectories - Link libraries to targets with their full path (if it is known) - Dirs specified with link_directories command still added with -L - Make link type specific to library names without paths (name libfoo.a without path becomes -Wl,-Bstatic -lfoo) - Make directory ordering specific to a runtime path computation feature (look for conflicting SONAMEs instead of library names) - Implement proper rpath support on HP-UX and AIX.
Diffstat (limited to 'Modules/CMakeCInformation.cmake')
-rw-r--r--Modules/CMakeCInformation.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index f02d47cad6..f6d647e3bb 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -149,6 +149,14 @@ IF(NOT CMAKE_C_LINK_EXECUTABLE)
"<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_C_LINK_EXECUTABLE)
+IF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG)
+ SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
+ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG)
+
+IF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP)
+ SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
+ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP)
+
MARK_AS_ADVANCED(
CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG