summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-12-05 13:44:11 -0500
committerBill Hoffman <bill.hoffman@kitware.com>2002-12-05 13:44:11 -0500
commit96189f79d582f90758ba1b4f691031b1d7fa02f3 (patch)
tree36bc488b7a77d01a9b9be3b1e4b0ab8963378fdc /Modules
parent8d20322160e6e8c7bf9c6d69de9319f57373de5d (diff)
downloadcmake-96189f79d582f90758ba1b4f691031b1d7fa02f3.tar.gz
ENH: unify EnableLanguage across all generators
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeBackwardCompatibilityC.cmake76
-rw-r--r--Modules/CMakeBackwardCompatibilityCXX.cmake65
-rw-r--r--Modules/CMakeSystemSpecificInformation.cmake88
-rw-r--r--Modules/CMakeVS6BackwardCompatibility.cmake10
-rw-r--r--Modules/CMakeVS6FindMake.cmake9
-rw-r--r--Modules/CMakeVS7BackwardCompatibility.cmake10
-rw-r--r--Modules/CMakeVS7FindMake.cmake9
-rw-r--r--Modules/Dart.cmake4
-rw-r--r--Modules/Platform/Windows-cl.cmake21
9 files changed, 181 insertions, 111 deletions
diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake
index eccad863f9..04cab0b24f 100644
--- a/Modules/CMakeBackwardCompatibilityC.cmake
+++ b/Modules/CMakeBackwardCompatibilityC.cmake
@@ -1,46 +1,56 @@
# Nothing here yet
-
-INCLUDE (${CMAKE_ROOT}/Modules/CheckSizeOf.cmake)
-CHECK_TYPE_SIZE(int CMAKE_SIZEOF_INT)
-CHECK_TYPE_SIZE(long CMAKE_SIZEOF_LONG)
-CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
-CHECK_TYPE_SIZE(char CMAKE_SIZEOF_CHAR)
-CHECK_TYPE_SIZE(short CMAKE_SIZEOF_SHORT)
-CHECK_TYPE_SIZE(float CMAKE_SIZEOF_FLOAT)
-CHECK_TYPE_SIZE(double CMAKE_SIZEOF_DOUBLE)
-
-INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
-CHECK_FUNCTION_EXISTS(connect CMAKE_HAVE_CONNECT)
-CHECK_FUNCTION_EXISTS(remove CMAKE_HAVE_REMOVE)
-
-INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
-CHECK_LIBRARY_EXISTS("ipc" "shmat" "" CMAKE_HAVE_GETHOSTBYNAME)
-
-INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
-CHECK_INCLUDE_FILE("limits.h" CMAKE_HAVE_LIMITS_H)
-CHECK_INCLUDE_FILE("unistd.h" CMAKE_HAVE_UNISTD_H)
-CHECK_INCLUDE_FILE("sys/prctl.h" CMAKE_HAVE_SYS_PRCTL_H)
-CHECK_INCLUDE_FILE("pthread.h" CMAKE_HAVE_PTHREAD_H)
-
-INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
-TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
-INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
-INCLUDE (${CMAKE_ROOT}/Modules/FindThreads.cmake)
-
-SET (CMAKE_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}" CACHE STRING
+IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
+ INCLUDE(${CMAKE_ROOT}/Modules/CMakeVS7BackwardCompatibility.cmake)
+ SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
+ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
+IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+ INCLUDE(${CMAKE_ROOT}/Modules/CMakeVS6BackwardCompatibility.cmake)
+ SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
+ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+
+IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
+ INCLUDE (${CMAKE_ROOT}/Modules/CheckSizeOf.cmake)
+ CHECK_TYPE_SIZE(int CMAKE_SIZEOF_INT)
+ CHECK_TYPE_SIZE(long CMAKE_SIZEOF_LONG)
+ CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
+ CHECK_TYPE_SIZE(char CMAKE_SIZEOF_CHAR)
+ CHECK_TYPE_SIZE(short CMAKE_SIZEOF_SHORT)
+ CHECK_TYPE_SIZE(float CMAKE_SIZEOF_FLOAT)
+ CHECK_TYPE_SIZE(double CMAKE_SIZEOF_DOUBLE)
+
+ INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
+ CHECK_FUNCTION_EXISTS(connect CMAKE_HAVE_CONNECT)
+ CHECK_FUNCTION_EXISTS(remove CMAKE_HAVE_REMOVE)
+
+ INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
+ CHECK_LIBRARY_EXISTS("ipc" "shmat" "" CMAKE_HAVE_GETHOSTBYNAME)
+
+ INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
+ CHECK_INCLUDE_FILE("limits.h" CMAKE_HAVE_LIMITS_H)
+ CHECK_INCLUDE_FILE("unistd.h" CMAKE_HAVE_UNISTD_H)
+ CHECK_INCLUDE_FILE("sys/prctl.h" CMAKE_HAVE_SYS_PRCTL_H)
+ CHECK_INCLUDE_FILE("pthread.h" CMAKE_HAVE_PTHREAD_H)
+
+ INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
+ TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
+ INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
+ INCLUDE (${CMAKE_ROOT}/Modules/FindThreads.cmake)
+
+ SET (CMAKE_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}" CACHE STRING
"Thread library used.")
-SET (CMAKE_USE_PTHREADS "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL
+ SET (CMAKE_USE_PTHREADS "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL
"Use the pthreads library.")
-SET (CMAKE_USE_WIN32_THREADS "${CMAKE_USE_WIN32_THREADS_INIT}" CACHE BOOL
+ SET (CMAKE_USE_WIN32_THREADS "${CMAKE_USE_WIN32_THREADS_INIT}" CACHE BOOL
"Use the win32 thread library.")
-SET (CMAKE_HP_PTHREADS ${CMAKE_HP_PTHREADS_INIT} CACHE BOOL
+ SET (CMAKE_HP_PTHREADS ${CMAKE_HP_PTHREADS_INIT} CACHE BOOL
"Use HP pthreads.")
-SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL
+ SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL
"Use sproc libs.")
+ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
MARK_AS_ADVANCED(
CMAKE_THREAD_LIBS
diff --git a/Modules/CMakeBackwardCompatibilityCXX.cmake b/Modules/CMakeBackwardCompatibilityCXX.cmake
index fb41caac64..c11d56d717 100644
--- a/Modules/CMakeBackwardCompatibilityCXX.cmake
+++ b/Modules/CMakeBackwardCompatibilityCXX.cmake
@@ -1,34 +1,35 @@
#
+IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
+ # check for some ANSI flags in the CXX compiler if it is not gnu
+ IF(NOT CMAKE_COMPILER_IS_GNUCXX)
+ INCLUDE(${CMAKE_ROOT}/Modules/TestCXXAcceptsFlag.cmake)
+ SET(CMAKE_TRY_ANSI_CXX_FLAGS "")
+ IF(CMAKE_SYSTEM MATCHES "IRIX.*")
+ SET(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std")
+ ENDIF(CMAKE_SYSTEM MATCHES "IRIX.*")
+ IF(CMAKE_SYSTEM MATCHES "OSF.*")
+ SET(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname")
+ ENDIF(CMAKE_SYSTEM MATCHES "OSF.*")
+ # if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see
+ # if the compiler accepts it
+ IF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
+ CHECK_CXX_ACCEPTS_FLAG(${CMAKE_TRY_ANSI_CXX_FLAGS} CMAKE_CXX_ACCEPTS_FLAGS)
+ # if the compiler liked the flag then set CMAKE_ANSI_CXXFLAGS
+ # to the flag
+ IF(CMAKE_CXX_ACCEPTS_FLAGS)
+ SET(CMAKE_ANSI_CXXFLAGS ${CMAKE_TRY_ANSI_CXX_FLAGS} CACHE INTERNAL
+ "What flags are required by the c++ compiler to make it ansi." )
+ ENDIF(CMAKE_CXX_ACCEPTS_FLAGS)
+ ENDIF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
+ ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
-# check for some ANSI flags in the CXX compiler if it is not gnu
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
- INCLUDE(${CMAKE_ROOT}/Modules/TestCXXAcceptsFlag.cmake)
- SET(CMAKE_TRY_ANSI_CXX_FLAGS "")
- IF(CMAKE_SYSTEM MATCHES "IRIX.*")
- SET(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std")
- ENDIF(CMAKE_SYSTEM MATCHES "IRIX.*")
- IF(CMAKE_SYSTEM MATCHES "OSF.*")
- SET(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname")
- ENDIF(CMAKE_SYSTEM MATCHES "OSF.*")
- # if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see
- # if the compiler accepts it
- IF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
- CHECK_CXX_ACCEPTS_FLAG(${CMAKE_TRY_ANSI_CXX_FLAGS} CMAKE_CXX_ACCEPTS_FLAGS)
- # if the compiler liked the flag then set CMAKE_ANSI_CXXFLAGS
- # to the flag
- IF(CMAKE_CXX_ACCEPTS_FLAGS)
- SET(CMAKE_ANSI_CXXFLAGS ${CMAKE_TRY_ANSI_CXX_FLAGS} CACHE INTERNAL
- "What flags are required by the c++ compiler to make it ansi." )
- ENDIF(CMAKE_CXX_ACCEPTS_FLAGS)
- ENDIF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
-
-INCLUDE(${CMAKE_ROOT}/Modules/TestForANSIStreamHeaders.cmake)
-INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
-INCLUDE(${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
-INCLUDE(${CMAKE_ROOT}/Modules/TestForANSIForScope.cmake)
-CHECK_INCLUDE_FILE_CXX("sstream" CMAKE_HAS_ANSI_STRING_STREAM)
-IF(NOT CMAKE_HAS_ANSI_STRING_STREAM)
- SET( CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL
- "Does the compiler support sstream or stringstream.")
-ENDIF(NOT CMAKE_HAS_ANSI_STRING_STREAM)
+ INCLUDE(${CMAKE_ROOT}/Modules/TestForANSIStreamHeaders.cmake)
+ INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
+ INCLUDE(${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
+ INCLUDE(${CMAKE_ROOT}/Modules/TestForANSIForScope.cmake)
+ CHECK_INCLUDE_FILE_CXX("sstream" CMAKE_HAS_ANSI_STRING_STREAM)
+ IF(NOT CMAKE_HAS_ANSI_STRING_STREAM)
+ SET( CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL
+ "Does the compiler support sstream or stringstream.")
+ ENDIF(NOT CMAKE_HAS_ANSI_STRING_STREAM)
+ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake
index a73dd87674..04aaa1783f 100644
--- a/Modules/CMakeSystemSpecificInformation.cmake
+++ b/Modules/CMakeSystemSpecificInformation.cmake
@@ -144,10 +144,6 @@ IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only.")
-# default build type is none
-SET (CMAKE_BUILD_TYPE "" CACHE STRING
- "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
-
SET (CMAKE_INSTALL_PREFIX /usr/local CACHE PATH
"Install path prefix, prepended onto install directories.")
@@ -158,76 +154,88 @@ SET (CMAKE_INSTALL_PREFIX /usr/local CACHE PATH
# and you can set these flags in the cmake cache
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_ENV_INIT} $ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}" CACHE STRING
"Flags used by the compiler during all build types.")
-SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT}" CACHE STRING
- "Flags used by the compiler during debug builds.")
-SET (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT}" CACHE STRING
- "Flags used by the compiler during release minsize builds.")
-SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT}" CACHE STRING
- "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
-SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
- "Flags used by the compiler during Release with Debug Info builds.")
+
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_ENV_INIT} $ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}" CACHE STRING
"Flags for C compiler.")
-SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT}" CACHE STRING
- "Flags used by the compiler during debug builds.")
-SET (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL_INIT}" CACHE STRING
- "Flags used by the compiler during release minsize builds.")
-SET (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT}" CACHE STRING
- "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
-SET (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
- "Flags used by the compiler during Release with Debug Info builds.")
SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS_INIT}
CACHE STRING "Flags used by the linker.")
-SET (CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
+IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+# default build type is none
+ IF(NOT CMAKE_NO_BUILD_TYPE)
+ SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
+ "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
+ ENDIF(NOT CMAKE_NO_BUILD_TYPE)
+
+ SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT}" CACHE STRING
+ "Flags used by the compiler during debug builds.")
+ SET (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT}" CACHE STRING
+ "Flags used by the compiler during release minsize builds.")
+ SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT}" CACHE STRING
+ "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
+ SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
+ "Flags used by the compiler during Release with Debug Info builds.")
+ SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT}" CACHE STRING
+ "Flags used by the compiler during debug builds.")
+ SET (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL_INIT}" CACHE STRING
+ "Flags used by the compiler during release minsize builds.")
+ SET (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT}" CACHE STRING
+ "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
+ SET (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
+ "Flags used by the compiler during Release with Debug Info builds.")
+
+ SET (CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
-SET (CMAKE_EXE_LINKER_FLAGS_MINSIZEREL ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT} CACHE STRING
+ SET (CMAKE_EXE_LINKER_FLAGS_MINSIZEREL ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT} CACHE STRING
"Flags used by the linker during release minsize builds.")
-SET (CMAKE_EXE_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT} "" CACHE STRING
+ SET (CMAKE_EXE_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT} "" CACHE STRING
"Flags used by the linker during release builds.")
-SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
+ SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
-# shared linker flags
-SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT}
- CACHE STRING "Flags used by the linker.")
-
-SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
+ SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
-SET (CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL ${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT}
+ SET (CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL ${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT}
CACHE STRING
"Flags used by the linker during release minsize builds.")
-SET (CMAKE_SHARED_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT} "" CACHE STRING
+ SET (CMAKE_SHARED_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT} "" CACHE STRING
"Flags used by the linker during release builds.")
-SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
+ SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
-# module linker flags
-SET (CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_INIT}
- CACHE STRING "Flags used by the linker.")
-
-SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG ${CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
+ SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG ${CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
-SET (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL ${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT}
+ SET (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL ${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT}
CACHE STRING
"Flags used by the linker during release minsize builds.")
-SET (CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT} "" CACHE STRING
+ SET (CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT} "" CACHE STRING
"Flags used by the linker during release builds.")
-SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
+ SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
+ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+
+
+
+# shared linker flags
+SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT}
+ CACHE STRING "Flags used by the linker.")
+
+# module linker flags
+SET (CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_INIT}
+ CACHE STRING "Flags used by the linker.")
SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL
"What is the target build tool cmake is generating for.")
diff --git a/Modules/CMakeVS6BackwardCompatibility.cmake b/Modules/CMakeVS6BackwardCompatibility.cmake
new file mode 100644
index 0000000000..14900c50e1
--- /dev/null
+++ b/Modules/CMakeVS6BackwardCompatibility.cmake
@@ -0,0 +1,10 @@
+# hard code these for fast backwards compatibility tests
+SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
+SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
+SET (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type")
+SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type")
+SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type")
+SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type")
+SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type")
+SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL
+ "Does the compiler support ansi for scope.")
diff --git a/Modules/CMakeVS6FindMake.cmake b/Modules/CMakeVS6FindMake.cmake
new file mode 100644
index 0000000000..3e2081aee5
--- /dev/null
+++ b/Modules/CMakeVS6FindMake.cmake
@@ -0,0 +1,9 @@
+FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+ NAMES msdev
+ PATHS
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\6.0\\Setup;VsCommonDir]/MSDev98/Bin/msdev
+ "c:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
+ "c:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
+ "/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
+)
+MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakeVS7BackwardCompatibility.cmake b/Modules/CMakeVS7BackwardCompatibility.cmake
new file mode 100644
index 0000000000..e05e87fcf1
--- /dev/null
+++ b/Modules/CMakeVS7BackwardCompatibility.cmake
@@ -0,0 +1,10 @@
+# hard code these for fast backwards compatibility tests
+SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
+SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
+SET (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type")
+SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type")
+SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type")
+SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type")
+SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type")
+SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL
+ "Does the compiler support ansi for scope.")
diff --git a/Modules/CMakeVS7FindMake.cmake b/Modules/CMakeVS7FindMake.cmake
new file mode 100644
index 0000000000..7d009f6c68
--- /dev/null
+++ b/Modules/CMakeVS7FindMake.cmake
@@ -0,0 +1,9 @@
+FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+ NAMES devenv
+ PATHS
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VS;EnvironmentDirectory]
+ "c:/Program Files/Microsoft Visual Studio .NET/Common7/IDE"
+ "c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE"
+ "/Program Files/Microsoft Visual Studio .NET/Common7/IDE/"
+)
+MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/Dart.cmake b/Modules/Dart.cmake
index e168ecad86..64af2f840c 100644
--- a/Modules/Dart.cmake
+++ b/Modules/Dart.cmake
@@ -107,7 +107,7 @@ IF(BUILD_TESTING)
# for non IDE based builds nmake and make
# add all these extra targets
- IF(${CMAKE_BUILD_TOOL} MATCHES make)
+ IF(${CMAKE_MAKE_PROGRAM} MATCHES make)
# Make targets for Experimental builds
ADD_CUSTOM_TARGET(ExperimentalStart
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start)
@@ -161,7 +161,7 @@ IF(BUILD_TESTING)
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly DashboardStart)
ADD_CUSTOM_TARGET(NightlyDashboardEnd
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly DashboardEnd)
- ENDIF (${CMAKE_BUILD_TOOL} MATCHES make)
+ ENDIF (${CMAKE_MAKE_PROGRAM} MATCHES make)
ELSE(TCL_TCLSH)
MESSAGE("Could not find TCL_TCLSH, disabling testing." "Error")
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake
index 3b4d6217e9..e09b601717 100644
--- a/Modules/Platform/Windows-cl.cmake
+++ b/Modules/Platform/Windows-cl.cmake
@@ -44,11 +44,9 @@ SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
SET(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> /nologo ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> -link <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
-SET (CMAKE_BUILD_TYPE Debug CACHE STRING
- "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.")
-
SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows)
-
+# default to Debug builds
+SET(CMAKE_BUILD_TYPE_INIT Debug)
SET (CMAKE_CXX_FLAGS_INIT "/W3 /Zm1000 /GX /GR")
SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/MDd /Zi /Od /GZ")
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1")
@@ -65,6 +63,21 @@ SET (CMAKE_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib co
"Libraries linked by defalut with all applications.")
MARK_AS_ADVANCED(CMAKE_STANDARD_LIBRARIES)
+IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+ SET (CMAKE_NO_BUILD_TYPE 1)
+ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
+ SET (CMAKE_CONFIGURATION_TYPES "Debug Release MinSizeRel RelWithDebInfo" CACHE STRING
+ "Space separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.")
+ SET (CMAKE_CXX_WARNING_LEVEL "3" CACHE STRING
+ "Size of stack for programs.")
+ SET (CMAKE_CXX_STACK_SIZE "10000000" CACHE STRING
+ "Size of stack for programs.")
+ MARK_AS_ADVANCED(CMAKE_CONFIGURATION_TYPES CMAKE_CXX_STACK_SIZE CMAKE_CXX_WARNING_LEVEL)
+ SET (CMAKE_NOT_USING_CONFIG_FLAGS 1)
+ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
+
+
# executable linker flags
SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
SET (CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /machine:I386 /INCREMENTAL:YES")