From 3da299a796f6905662cbee7361e9a59c3c59c7b5 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Fri, 1 Mar 2002 09:00:31 -0500 Subject: [PATCH] ENH: add some OS/compiler variables --- Templates/CMakeBorlandWindowsSystemConfig.cmake | 6 ++++++ Templates/CMakeDotNetSystemConfig.cmake | 7 ++++++- Templates/CMakeNMakeWindowsSystemConfig.cmake | 6 ++++++ Templates/CMakeSystemConfig.cmake.in | 6 ++++++ Templates/CMakeWindowsSystemConfig.cmake | 5 +++++ Templates/configure | 4 ++++ Templates/configure.in | 3 +++ 7 files changed, 36 insertions(+), 1 deletion(-) diff --git a/Templates/CMakeBorlandWindowsSystemConfig.cmake b/Templates/CMakeBorlandWindowsSystemConfig.cmake index 5e3500c59..b639c3ccb 100644 --- a/Templates/CMakeBorlandWindowsSystemConfig.cmake +++ b/Templates/CMakeBorlandWindowsSystemConfig.cmake @@ -8,6 +8,12 @@ FIND_PATH(BCB_BIN_PATH bcc32.exe [HKEY_LOCAL_MACHINE/SOFTWARE/Borland/C++Builder/5.0/RootDir]/Bin ) +SET (CMAKE_BUILD_TOOL borlandmake CACHE INTERNAL + "What is the target build tool cmake is generating for.") + +SET (CMAKE_SYSTEM "Win32" CACHE INTERNAL + "What system is this. Result of uname.") + SET (BORLAND 1 CACHE INTERNAL "This is the borland generator") SET (CMAKE_C_COMPILER ${BCB_BIN_PATH}/bcc32 CACHE FILEPATH diff --git a/Templates/CMakeDotNetSystemConfig.cmake b/Templates/CMakeDotNetSystemConfig.cmake index e4bae83c0..f20e0995b 100644 --- a/Templates/CMakeDotNetSystemConfig.cmake +++ b/Templates/CMakeDotNetSystemConfig.cmake @@ -10,6 +10,12 @@ FIND_PROGRAM(MICROSOFT_DEVENV "c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE" ) +SET (CMAKE_BUILD_TOOL devenv CACHE INTERNAL + "What is the target build tool cmake is generating for.") + +SET (CMAKE_SYSTEM "Win32" CACHE INTERNAL + "What system is this. Result of uname.") + SET (CMAKE_CXX_COMPILER cl CACHE STRING "Name of C++ compiler used.") @@ -37,7 +43,6 @@ SET (BUILDNAME "Win32-DotNET-devenv" CACHE STRING 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.") - # We will hardcode them for now. Make sure to fix that in the future SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type") SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type") diff --git a/Templates/CMakeNMakeWindowsSystemConfig.cmake b/Templates/CMakeNMakeWindowsSystemConfig.cmake index ad36106e2..868a0a4b2 100644 --- a/Templates/CMakeNMakeWindowsSystemConfig.cmake +++ b/Templates/CMakeNMakeWindowsSystemConfig.cmake @@ -4,6 +4,12 @@ # Suffixes +SET (CMAKE_SYSTEM "Win32" CACHE INTERNAL + "What system is this. Result of uname.") + +SET (CMAKE_BUILD_TOOL nmake CACHE INTERNAL + "What is the target build tool cmake is generating for.") + SET (CMAKE_EXECUTABLE_SUFFIX ".exe" CACHE STRING "Executable suffix.") diff --git a/Templates/CMakeSystemConfig.cmake.in b/Templates/CMakeSystemConfig.cmake.in index 907f3cf60..54aa2bfe1 100644 --- a/Templates/CMakeSystemConfig.cmake.in +++ b/Templates/CMakeSystemConfig.cmake.in @@ -111,6 +111,12 @@ SET (CMAKE_NO_ANSI_FOR_SCOPE @CMAKE_NO_ANSI_FOR_SCOPE@ CACHE INTERNAL SET (CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@ CACHE INTERNAL "Is the compile GNU C++.") +SET (CMAKE_SYSTEM @CMAKE_SYSTEM@ CACHE INTERNAL + "What system is this. Result of uname.") + +SET (CMAKE_BUILD_TOOL make CACHE INTERNAL + "What is the target build tool cmake is generating for.") + SET (CMAKE_ANSI_CFLAGS @CMAKE_ANSI_CFLAGS@ CACHE INTERNAL "What flags are required by the c++ compiler to make it ansi.") diff --git a/Templates/CMakeWindowsSystemConfig.cmake b/Templates/CMakeWindowsSystemConfig.cmake index 07e0c88b0..ab4348502 100644 --- a/Templates/CMakeWindowsSystemConfig.cmake +++ b/Templates/CMakeWindowsSystemConfig.cmake @@ -1,5 +1,10 @@ # Microsoft specific config file +SET (CMAKE_BUILD_TOOL msdev CACHE INTERNAL + "What is the target build tool cmake is generating for.") + +SET (CMAKE_SYSTEM "Win32" CACHE INTERNAL + "What system is this. Result of uname.") SET (CMAKE_CXX_COMPILER cl CACHE STRING "Name of C++ compiler used.") diff --git a/Templates/configure b/Templates/configure index fda2ba742..13d433c52 100755 --- a/Templates/configure +++ b/Templates/configure @@ -3502,6 +3502,9 @@ if test $ac_cv_prog_gxx = yes; then CMAKE_COMPILER_IS_GNUCXX=1 fi +CMAKE_SYSTEM="$system" + + # generate output files. # create mkdir files just to make some of the directories @@ -3702,6 +3705,7 @@ s%@RUNMAKE@%$RUNMAKE%g s%@CMAKE_AR_TMP@%$CMAKE_AR_TMP%g s%@CMAKE_AR@%$CMAKE_AR%g s%@CMAKE_AR_ARGS@%$CMAKE_AR_ARGS%g +s%@CMAKE_SYSTEM@%$CMAKE_SYSTEM%g s%@CMAKE_COMPILER_IS_GNUCXX@%$CMAKE_COMPILER_IS_GNUCXX%g CEOF diff --git a/Templates/configure.in b/Templates/configure.in index ef7769683..733c10639 100644 --- a/Templates/configure.in +++ b/Templates/configure.in @@ -731,6 +731,9 @@ CMAKE_COMPILER_IS_GNUGXX=0 if test $ac_cv_prog_gxx = yes; then CMAKE_COMPILER_IS_GNUCXX=1 fi + +CMAKE_SYSTEM="$system" +AC_SUBST(CMAKE_SYSTEM) AC_SUBST(CMAKE_COMPILER_IS_GNUCXX) # generate output files. # create mkdir files just to make some of the directories