[cmake-commits] king committed CYGWIN.cmake 1.15 1.16
Windows-gcc.cmake 1.16 1.17
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Oct 5 15:08:25 EDT 2006
Update of /cvsroot/CMake/CMake/Modules/Platform
In directory public:/mounts/ram/cvs-serv9315/Modules/Platform
Modified Files:
CYGWIN.cmake Windows-gcc.cmake
Log Message:
ENH: Enabling link-type selection flags on Cygwin, MSYS, and MinGW. This addresses bug#1644 on these platforms.
Index: Windows-gcc.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Windows-gcc.cmake,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- Windows-gcc.cmake 17 Apr 2006 17:57:08 -0000 1.16
+++ Windows-gcc.cmake 5 Oct 2006 19:08:23 -0000 1.17
@@ -34,3 +34,14 @@
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> <OBJECTS> <LINK_LIBRARIES>")
+
+# Initialize C 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.
+IF(MSYS OR MINGW)
+ FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
+ SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
+ SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
+ ENDFOREACH(type)
+ENDIF(MSYS OR MINGW)
Index: CYGWIN.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/CYGWIN.cmake,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- CYGWIN.cmake 6 May 2006 01:49:02 -0000 1.15
+++ CYGWIN.cmake 5 Oct 2006 19:08:23 -0000 1.16
@@ -27,4 +27,14 @@
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> <OBJECTS> <LINK_LIBRARIES>")
+
+# Initialize C 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.
+FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
+ SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
+ SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
+ENDFOREACH(type)
+
INCLUDE(Platform/UnixPaths)
More information about the Cmake-commits
mailing list