summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-08-21 20:22:23 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-08-21 20:22:23 (GMT)
commita413160fecc73bf61fccff9b74d6e18349eeb861 (patch)
tree5cbc485d7850ebc5200d8f094ba1559b1bc202e8 /Modules
parent0270b60b8f32c0da9bbe66ebee6aea92ab177c3c (diff)
downloadCMake-a413160fecc73bf61fccff9b74d6e18349eeb861.zip
CMake-a413160fecc73bf61fccff9b74d6e18349eeb861.tar.gz
CMake-a413160fecc73bf61fccff9b74d6e18349eeb861.tar.bz2
ENH: add the unix makefile generator as an option from the windows GUI, this builds with mingw, cygwin, and combinations of make cl, bcc32
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCCompiler.cmake.in10
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake7
-rw-r--r--Modules/CMakeSystemSpecificInformation.cmake4
-rw-r--r--Modules/CMakeTestCCompiler.cmake2
-rw-r--r--Modules/CMakeTestCXXCompiler.cmake2
-rw-r--r--Modules/CMakeTestGNU.c6
-rw-r--r--Modules/Platform/Windows-bcc32.cmake3
-rw-r--r--Modules/Platform/Windows-cl.cmake9
-rw-r--r--Modules/Platform/Windows.cmake22
9 files changed, 51 insertions, 14 deletions
diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in
index dd68261..c9d5008 100644
--- a/Modules/CMakeCCompiler.cmake.in
+++ b/Modules/CMakeCCompiler.cmake.in
@@ -3,4 +3,14 @@ SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_COMPILER_IS_GNUCC @CMAKE_COMPILER_IS_GNUCC@)
SET(CMAKE_C_COMPILER_LOADED 1)
+SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
+SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
+IF(CMAKE_COMPILER_IS_CYGWIN)
+ SET(CYGWIN 1)
+ SET(UNIX 1)
+ENDIF(CMAKE_COMPILER_IS_CYGWIN)
+
+IF(CMAKE_COMPILER_IS_MINGW)
+ SET(MINGW 1)
+ENDIF(CMAKE_COMPILER_IS_MINGW)
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index e85b2f0..230c132 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -59,6 +59,13 @@ IF(NOT CMAKE_COMPILER_RETURN)
"Determining if the C compiler is GNU failed with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
+ IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
+ SET(CMAKE_COMPILER_IS_MINGW 1)
+ ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
+ IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
+ SET(CMAKE_COMPILER_IS_CYGWIN 1)
+ ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
+
ENDIF(NOT CMAKE_COMPILER_RETURN)
diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake
index 8dc4816..cd22499 100644
--- a/Modules/CMakeSystemSpecificInformation.cmake
+++ b/Modules/CMakeSystemSpecificInformation.cmake
@@ -57,9 +57,9 @@ ENDIF(EXISTS ${CMAKE_SYSTEM_INFO_FILE})
IF(CMAKE_C_COMPILER)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
# since the gnu compiler has several names force gcc
- IF(CMAKE_COMPILER_IS_GNUGCC)
+ IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_BASE_NAME gcc)
- ENDIF(CMAKE_COMPILER_IS_GNUGCC)
+ ENDIF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
INCLUDE(${CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE} OPTIONAL)
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index d3fa13c..a619108 100644
--- a/Modules/CMakeTestCCompiler.cmake
+++ b/Modules/CMakeTestCCompiler.cmake
@@ -1,6 +1,6 @@
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected C compiler can actually compile
-# and like the most basic of programs. If not, a fatel error
+# and link the most basic of programs. If not, a fatel error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
IF(NOT CMAKE_C_COMPILER_WORKS)
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake
index dd875da..9f28446 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -1,6 +1,6 @@
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected C++ compiler can actually compile
-# and like the most basic of programs. If not, a fatel error
+# and link the most basic of programs. If not, a fatel error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
IF(NOT CMAKE_CXX_COMPILER_WORKS)
diff --git a/Modules/CMakeTestGNU.c b/Modules/CMakeTestGNU.c
index 63fd2b2..386614a 100644
--- a/Modules/CMakeTestGNU.c
+++ b/Modules/CMakeTestGNU.c
@@ -1,3 +1,9 @@
#ifdef __GNUC__
void THIS_IS_GNU();
#endif
+#ifdef __MINGW32__
+void THIS_IS_MINGW();
+#endif
+#ifdef __CYGWIN__
+void THIS_IS_CYGWIN();
+#endif
diff --git a/Modules/Platform/Windows-bcc32.cmake b/Modules/Platform/Windows-bcc32.cmake
index db08463..e7f5be9 100644
--- a/Modules/Platform/Windows-bcc32.cmake
+++ b/Modules/Platform/Windows-bcc32.cmake
@@ -14,9 +14,8 @@ SET(CMAKE_LIBRARY_PATH_FLAG "-L")
SET(CMAKE_LINK_LIBRARY_FLAG "")
SET(CMAKE_SHARED_BUILD_CXX_FLAGS "-tWR")
SET(CMAKE_SHARED_BUILD_C_FLAGS "-tWR")
+SET(BORLAND 1)
-SET(CMAKE_START_TEMP_FILE "@&&|\n")
-SET(CMAKE_END_TEMP_FILE "\n|")
# uncomment these out to debug makefiles
#SET(CMAKE_START_TEMP_FILE "")
#SET(CMAKE_END_TEMP_FILE "")
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake
index e1e661e..9e31f59 100644
--- a/Modules/Platform/Windows-cl.cmake
+++ b/Modules/Platform/Windows-cl.cmake
@@ -1,13 +1,6 @@
SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
SET(CMAKE_LINK_LIBRARY_FLAG "")
-
-SET(CMAKE_START_TEMP_FILE "@<<\n")
-SET(CMAKE_END_TEMP_FILE "\n<<")
-# uncomment these out to debug makefiles
-#SET(CMAKE_START_TEMP_FILE "")
-#SET(CMAKE_END_TEMP_FILE "")
-#SET(CMAKE_VERBOSE_MAKEFILE 1)
-
+SET(WIN32 1)
# create a shared C++ library
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
"link /nologo ${CMAKE_START_TEMP_FILE} /out:<TARGET> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
diff --git a/Modules/Platform/Windows.cmake b/Modules/Platform/Windows.cmake
index cf46516..29198b5 100644
--- a/Modules/Platform/Windows.cmake
+++ b/Modules/Platform/Windows.cmake
@@ -4,3 +4,25 @@ SET(CMAKE_SHARED_LIBRARY_PREFIX "") # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so
SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
SET(CMAKE_DL_LIBS "")
+
+# for borland make long command lines are redirected to a file
+# with the following syntax, see Windows-bcc32.cmake for use
+IF(CMAKE_GENERATOR MATCHES "Borland")
+ SET(CMAKE_START_TEMP_FILE "@&&|\n")
+ SET(CMAKE_END_TEMP_FILE "\n|")
+ENDIF(CMAKE_GENERATOR MATCHES "Borland")
+
+# for nmake make long command lines are redirected to a file
+# with the following syntax, see Windows-bcc32.cmake for use
+IF(CMAKE_GENERATOR MATCHES "NMake")
+ SET(CMAKE_START_TEMP_FILE "@<<\n")
+ SET(CMAKE_END_TEMP_FILE "\n<<")
+ENDIF(CMAKE_GENERATOR MATCHES "NMake")
+
+# uncomment these out to debug nmake and borland makefiles
+#SET(CMAKE_START_TEMP_FILE "")
+#SET(CMAKE_END_TEMP_FILE "")
+#SET(CMAKE_VERBOSE_MAKEFILE 1)
+
+
+