summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-08-26 18:55:55 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-08-26 18:55:55 (GMT)
commit66a08c10e5bd4b8eff58837cd58372a4dfdd19df (patch)
tree9d094b67d0899a3cebdfeba8b0280d374e7f25db /Modules
parent7cdf5c4601ea2a791d35fafadd890508ce434c6f (diff)
downloadCMake-66a08c10e5bd4b8eff58837cd58372a4dfdd19df.zip
CMake-66a08c10e5bd4b8eff58837cd58372a4dfdd19df.tar.gz
CMake-66a08c10e5bd4b8eff58837cd58372a4dfdd19df.tar.bz2
ENH: more uniform approach to enable language, one step closer to being able to enable a language without modifing cmake source code
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMake.cmake3
-rw-r--r--Modules/CMakeCInformation.cmake115
-rw-r--r--Modules/CMakeCXXInformation.cmake164
-rw-r--r--Modules/CMakeCommonLanguageInclude.cmake89
-rw-r--r--Modules/CMakeDefaultMakeRuleVariables.cmake140
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake4
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake68
-rw-r--r--Modules/CMakeDetermineJavaCompiler.cmake1
-rw-r--r--Modules/CMakeFortranCompiler.cmake.in4
-rw-r--r--Modules/CMakeFortranInformation.cmake120
-rw-r--r--Modules/CMakeGenericSystem.cmake36
-rw-r--r--Modules/CMakeJavaCompiler.cmake.in2
-rw-r--r--Modules/CMakeJavaInformation.cmake1
-rw-r--r--Modules/CMakeSystemSpecificInformation.cmake314
-rw-r--r--Modules/CMakeTestFortranCompiler.cmake24
-rw-r--r--Modules/Platform/AIX.cmake1
-rw-r--r--Modules/Platform/BSDOS.cmake2
-rw-r--r--Modules/Platform/CYGWIN.cmake1
-rw-r--r--Modules/Platform/Darwin.cmake1
-rw-r--r--Modules/Platform/FreeBSD.cmake1
-rw-r--r--Modules/Platform/HP-UX.cmake1
-rw-r--r--Modules/Platform/IRIX.cmake1
-rw-r--r--Modules/Platform/IRIX64.cmake5
-rw-r--r--Modules/Platform/Linux.cmake2
-rw-r--r--Modules/Platform/MP-RAS.cmake2
-rw-r--r--Modules/Platform/NetBSD.cmake2
-rw-r--r--Modules/Platform/OSF1.cmake1
-rw-r--r--Modules/Platform/OpenBSD.cmake3
-rw-r--r--Modules/Platform/RISCos.cmake2
-rw-r--r--Modules/Platform/SCO_SV.cmake2
-rw-r--r--Modules/Platform/SINIX.cmake2
-rw-r--r--Modules/Platform/SunOS.cmake2
-rw-r--r--Modules/Platform/True64.cmake3
-rw-r--r--Modules/Platform/ULTRIX.cmake2
-rw-r--r--Modules/Platform/UNIX_SV.cmake2
-rw-r--r--Modules/Platform/UnixWare.cmake2
-rw-r--r--Modules/Platform/Windows-gcc.cmake2
-rw-r--r--Modules/Platform/Windows-ifort.cmake65
-rw-r--r--Modules/Platform/Xenix.cmake3
40 files changed, 668 insertions, 529 deletions
diff --git a/Modules/CMake.cmake b/Modules/CMake.cmake
new file mode 100644
index 0000000..411544f
--- /dev/null
+++ b/Modules/CMake.cmake
@@ -0,0 +1,3 @@
+# This file is used by cmake.cxx to compute the CMAKE_ROOT location.
+# Do not remove this file from cvs without updating cmake.cxx to look
+# for a different file.
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
new file mode 100644
index 0000000..440550b
--- /dev/null
+++ b/Modules/CMakeCInformation.cmake
@@ -0,0 +1,115 @@
+# This file sets the basic flags for the C language in CMake.
+# It also loads the available platform file for the system-compiler
+# if it exists.
+
+GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
+IF(CMAKE_COMPILER_IS_GNUCC)
+ SET(CMAKE_BASE_NAME gcc)
+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(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
+
+# for most systems a module is the same as a shared library
+# so unless the variable CMAKE_MODULE_EXISTS is set just
+# copy the values from the LIBRARY variables
+IF(NOT CMAKE_MODULE_EXISTS)
+ SET(CMAKE_SHARED_MODULE_C_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
+ SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
+ENDIF(NOT CMAKE_MODULE_EXISTS)
+
+SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_ENV_INIT} $ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}" CACHE STRING
+ "Flags for C compiler.")
+
+SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
+ CACHE STRING "Flags used by the linker.")
+
+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_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.")
+ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+
+INCLUDE(CMakeCommonLanguageInclude)
+
+# now define the following rule variables
+
+# CMAKE_C_CREATE_SHARED_LIBRARY
+# CMAKE_C_CREATE_SHARED_MODULE
+# CMAKE_C_CREATE_STATIC_LIBRARY
+# CMAKE_C_COMPILE_OBJECT
+# CMAKE_C_LINK_EXECUTABLE
+
+# variables supplied by the generator at use time
+# <TARGET>
+# <TARGET_BASE> the target without the suffix
+# <OBJECTS>
+# <OBJECT>
+# <LINK_LIBRARIES>
+# <FLAGS>
+# <LINK_FLAGS>
+
+# C compiler information
+# <CMAKE_C_COMPILER>
+# <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS>
+# <CMAKE_SHARED_MODULE_CREATE_C_FLAGS>
+# <CMAKE_C_LINK_FLAGS>
+
+# Static library tools
+# <CMAKE_AR>
+# <CMAKE_RANLIB>
+
+
+# create a C shared library
+IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
+ SET(CMAKE_C_CREATE_SHARED_LIBRARY
+ "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+ENDIF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
+
+# create a C shared module just copy the shared library rule
+IF(NOT CMAKE_C_CREATE_SHARED_MODULE)
+ SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
+ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
+
+# create a C static library
+IF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
+ SET(CMAKE_C_CREATE_STATIC_LIBRARY
+ "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
+ "<CMAKE_RANLIB> <TARGET> ")
+ENDIF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
+
+# compile a C file into an object file
+IF(NOT CMAKE_C_COMPILE_OBJECT)
+ SET(CMAKE_C_COMPILE_OBJECT
+ "<CMAKE_C_COMPILER> -o <OBJECT> <FLAGS> -c <SOURCE>")
+ENDIF(NOT CMAKE_C_COMPILE_OBJECT)
+
+IF(NOT CMAKE_C_LINK_EXECUTABLE)
+ SET(CMAKE_C_LINK_EXECUTABLE
+ "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+ENDIF(NOT CMAKE_C_LINK_EXECUTABLE)
+
+IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+ INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
+ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+
+MARK_AS_ADVANCED(
+CMAKE_C_FLAGS
+CMAKE_C_FLAGS_DEBUG
+CMAKE_C_FLAGS_MINSIZEREL
+CMAKE_C_FLAGS_RELEASE
+CMAKE_C_FLAGS_RELWITHDEBINFO
+)
+SET(CMAKE_C_INFOMATION_LOADED 1)
+
+
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
new file mode 100644
index 0000000..52f1ff9
--- /dev/null
+++ b/Modules/CMakeCXXInformation.cmake
@@ -0,0 +1,164 @@
+# This file sets the basic flags for the C++ language in CMake.
+# It also loads the available platform file for the system-compiler
+# if it exists.
+
+
+GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
+# since the gnu compiler has several names force g++
+IF(CMAKE_COMPILER_IS_GNUCXX)
+ SET(CMAKE_BASE_NAME g++)
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+SET(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE
+ ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
+INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
+
+# for most systems a module is the same as a shared library
+# so unless the variable CMAKE_MODULE_EXISTS is set just
+# copy the values from the LIBRARY variables
+IF(NOT CMAKE_MODULE_EXISTS)
+ SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
+ENDIF(NOT CMAKE_MODULE_EXISTS)
+# Create a set of shared library variable specific to C++
+# For 90% of the systems, these are the same flags as the C versions
+# so if these are not set just copy the flags from the c version
+IF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
+ SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
+ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
+
+IF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
+ SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
+ENDIF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
+
+IF(NOT CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
+ SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_FLAGS})
+ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
+
+IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
+ SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG})
+ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
+
+IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
+ SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP})
+ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
+
+# repeat for modules
+IF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
+ SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
+ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
+
+IF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
+ SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
+ENDIF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
+
+IF(NOT CMAKE_SHARED_MODULE_LINK_CXX_FLAGS)
+ SET(CMAKE_SHARED_MODULE_LINK_CXX_FLAGS ${CMAKE_SHARED_MODULE_LINK_FLAGS})
+ENDIF(NOT CMAKE_SHARED_MODULE_LINK_CXX_FLAGS)
+
+IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG)
+ SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_FLAG})
+ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG)
+
+IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP)
+ SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP})
+ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP)
+
+# add the flags to the cache based
+# on the initial values computed in the platform/*.cmake files
+# use _INIT variables so that this only happens the first time
+# 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.")
+
+
+IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+ 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.")
+
+ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+
+
+INCLUDE(CMakeCommonLanguageInclude)
+
+# now define the following rules:
+# CMAKE_CXX_CREATE_SHARED_LIBRARY
+# CMAKE_CXX_CREATE_SHARED_MODULE
+# CMAKE_CXX_CREATE_STATIC_LIBRARY
+# CMAKE_CXX_COMPILE_OBJECT
+# CMAKE_CXX_LINK_EXECUTABLE
+
+# variables supplied by the generator at use time
+# <TARGET>
+# <TARGET_BASE> the target without the suffix
+# <OBJECTS>
+# <OBJECT>
+# <LINK_LIBRARIES>
+# <FLAGS>
+# <LINK_FLAGS>
+
+# CXX compiler information
+# <CMAKE_CXX_COMPILER>
+# <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS>
+# <CMAKE_CXX_SHARED_MODULE_CREATE_FLAGS>
+# <CMAKE_CXX_LINK_FLAGS>
+
+# Static library tools
+# <CMAKE_AR>
+# <CMAKE_RANLIB>
+
+
+# create a shared C++ library
+IF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
+ SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
+ "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+ENDIF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
+
+IF(CMAKE_COMPILER_IS_GNUCXX)
+ SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} -lgcc")
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
+# create a c++ shared module copy the shared library rule by default
+IF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
+ SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
+ENDIF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
+
+
+# create a C++ static library
+IF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
+ SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
+ "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
+ "<CMAKE_RANLIB> <TARGET> ")
+ENDIF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
+
+# compile a C++ file into an object file
+IF(NOT CMAKE_CXX_COMPILE_OBJECT)
+ SET(CMAKE_CXX_COMPILE_OBJECT
+ "<CMAKE_CXX_COMPILER> -o <OBJECT> <FLAGS> -c <SOURCE>")
+ENDIF(NOT CMAKE_CXX_COMPILE_OBJECT)
+
+IF(NOT CMAKE_CXX_LINK_EXECUTABLE)
+ SET(CMAKE_CXX_LINK_EXECUTABLE
+ "<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+ENDIF(NOT CMAKE_CXX_LINK_EXECUTABLE)
+
+IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+ INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
+ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+
+
+MARK_AS_ADVANCED(
+CMAKE_BUILD_TOOL
+CMAKE_VERBOSE_MAKEFILE
+CMAKE_CXX_FLAGS
+CMAKE_CXX_FLAGS_RELEASE
+CMAKE_CXX_FLAGS_RELWITHDEBINFO
+CMAKE_CXX_FLAGS_MINSIZEREL
+CMAKE_CXX_FLAGS_DEBUG)
+
+SET(CMAKE_CXX_INFOMATION_LOADED 1)
+
diff --git a/Modules/CMakeCommonLanguageInclude.cmake b/Modules/CMakeCommonLanguageInclude.cmake
new file mode 100644
index 0000000..1ed1543
--- /dev/null
+++ b/Modules/CMakeCommonLanguageInclude.cmake
@@ -0,0 +1,89 @@
+# this file has flags that are shared across languages and sets
+# cache values that can be initialized in the platform-compiler.cmake file
+# it may be included by more than one language.
+
+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_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
+ "Flags used by the linker during release minsize builds.")
+
+ 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
+ ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
+ "Flags used by the linker during Release with Debug Info builds.")
+
+ 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}
+ 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
+ "Flags used by the linker during release builds.")
+
+ 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.")
+
+ 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}
+ 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
+ "Flags used by the linker during release builds.")
+
+ 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} $ENV{LDFLAGS}
+ CACHE STRING "Flags used by the linker during the creation of dll's.")
+
+# module linker flags
+SET (CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
+ CACHE STRING "Flags used by the linker during the creation of modules.")
+
+SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL
+ "What is the target build tool cmake is generating for.")
+
+
+MARK_AS_ADVANCED(
+CMAKE_BUILD_TOOL
+CMAKE_VERBOSE_MAKEFILE
+
+CMAKE_EXE_LINKER_FLAGS
+CMAKE_EXE_LINKER_FLAGS_DEBUG
+CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
+CMAKE_EXE_LINKER_FLAGS_RELEASE
+CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
+
+CMAKE_SHARED_LINKER_FLAGS
+CMAKE_SHARED_LINKER_FLAGS_DEBUG
+CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
+CMAKE_SHARED_LINKER_FLAGS_RELEASE
+CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
+
+CMAKE_MODULE_LINKER_FLAGS
+CMAKE_MODULE_LINKER_FLAGS_DEBUG
+CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
+CMAKE_MODULE_LINKER_FLAGS_RELEASE
+CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
+
+)
+
diff --git a/Modules/CMakeDefaultMakeRuleVariables.cmake b/Modules/CMakeDefaultMakeRuleVariables.cmake
deleted file mode 100644
index 73d8ab8..0000000
--- a/Modules/CMakeDefaultMakeRuleVariables.cmake
+++ /dev/null
@@ -1,140 +0,0 @@
-# this file contains rule variables that tell cmake how to
-# do things like build a .o file, create a shared or static library
-#
-
-# this file defines the following rule variables
-# CMAKE_CXX_CREATE_SHARED_LIBRARY
-# CMAKE_CXX_CREATE_SHARED_MODULE
-# CMAKE_C_CREATE_SHARED_LIBRARY
-# CMAKE_C_CREATE_SHARED_MODULE
-# CMAKE_FORTRAN_CREATE_SHARED_LIBRARY
-# CMAKE_FORTRAN_CREATE_SHARED_MODULE
-# CMAKE_CXX_CREATE_STATIC_LIBRARY
-# CMAKE_C_CREATE_STATIC_LIBRARY
-# CMAKE_FORTRAN_CREATE_STATIC_LIBRARY
-# CMAKE_CXX_COMPILE_OBJECT
-# CMAKE_C_COMPILE_OBJECT
-# CMAKE_FORTRAN_COMPILE_OBJECT
-# CMAKE_C_LINK_EXECUTABLE
-# CMAKE_FORTRAN_LINK_EXECUTABLE
-# CMAKE_CXX_LINK_EXECUTABLE
-
-# variables supplied by the generator at use time
-# <TARGET>
-# <TARGET_BASE> the target without the suffix
-# <OBJECTS>
-# <OBJECT>
-# <LINK_LIBRARIES>
-# <FLAGS>
-# <LINK_FLAGS>
-
-# CXX compiler information
-# <CMAKE_CXX_COMPILER>
-# <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS>
-# <CMAKE_CXX_SHARED_MODULE_CREATE_FLAGS>
-# <CMAKE_CXX_LINK_FLAGS>
-
-# C compiler information
-# <CMAKE_C_COMPILER>
-# <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS>
-# <CMAKE_SHARED_MODULE_CREATE_C_FLAGS>
-# <CMAKE_C_LINK_FLAGS>
-
-# Static library tools
-# <CMAKE_AR>
-# <CMAKE_RANLIB>
-
-
-# create a shared C++ library
-IF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
- SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
- "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
-
-IF(CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} -lgcc")
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-
-# create a c++ shared module copy the shared library rule by default
-IF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
- SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
-ENDIF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
-
-
-# create a C shared library
-IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
- SET(CMAKE_C_CREATE_SHARED_LIBRARY
- "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
-
-# create a C shared module just copy the shared library rule
-IF(NOT CMAKE_C_CREATE_SHARED_MODULE)
- SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
-ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
-
-# create a FORTRAN shared library
-IF(NOT CMAKE_FORTRAN_CREATE_SHARED_LIBRARY)
- SET(CMAKE_FORTRAN_CREATE_SHARED_LIBRARY
- "<CMAKE_FORTRAN_COMPILER> <CMAKE_SHARED_LIBRARY_FORTRAN_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_FORTRAN_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_FORTRAN_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_FORTRAN_CREATE_SHARED_LIBRARY)
-
-# create a FORTRAN shared module just copy the shared library rule
-IF(NOT CMAKE_FORTRAN_CREATE_SHARED_MODULE)
- SET(CMAKE_FORTRAN_CREATE_SHARED_MODULE ${CMAKE_FORTRAN_CREATE_SHARED_LIBRARY})
-ENDIF(NOT CMAKE_FORTRAN_CREATE_SHARED_MODULE)
-
-# create a C++ static library
-IF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
- SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
- "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
- "<CMAKE_RANLIB> <TARGET> ")
-ENDIF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
-
-# create a C static library
-IF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
- SET(CMAKE_C_CREATE_STATIC_LIBRARY
- "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
- "<CMAKE_RANLIB> <TARGET> ")
-ENDIF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
-
-# create a Fortran static library
-IF(NOT CMAKE_FORTRAN_CREATE_STATIC_LIBRARY)
- SET(CMAKE_FORTRAN_CREATE_STATIC_LIBRARY
- "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
- "<CMAKE_RANLIB> <TARGET> ")
-ENDIF(NOT CMAKE_FORTRAN_CREATE_STATIC_LIBRARY)
-
-# compile a C++ file into an object file
-IF(NOT CMAKE_CXX_COMPILE_OBJECT)
- SET(CMAKE_CXX_COMPILE_OBJECT
- "<CMAKE_CXX_COMPILER> -o <OBJECT> <FLAGS> -c <SOURCE>")
-ENDIF(NOT CMAKE_CXX_COMPILE_OBJECT)
-
-# compile a C file into an object file
-IF(NOT CMAKE_C_COMPILE_OBJECT)
- SET(CMAKE_C_COMPILE_OBJECT
- "<CMAKE_C_COMPILER> -o <OBJECT> <FLAGS> -c <SOURCE>")
-ENDIF(NOT CMAKE_C_COMPILE_OBJECT)
-
-# compile a Fortran file into an object file
-IF(NOT CMAKE_FORTRAN_COMPILE_OBJECT)
- SET(CMAKE_FORTRAN_COMPILE_OBJECT
- "<CMAKE_FORTRAN_COMPILER> -o <OBJECT> <FLAGS> -c <SOURCE>")
-ENDIF(NOT CMAKE_FORTRAN_COMPILE_OBJECT)
-
-
-IF(NOT CMAKE_C_LINK_EXECUTABLE)
- SET(CMAKE_C_LINK_EXECUTABLE
- "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_C_LINK_EXECUTABLE)
-
-IF(NOT CMAKE_FORTRAN_LINK_EXECUTABLE)
- SET(CMAKE_FORTRAN_LINK_EXECUTABLE
- "<CMAKE_FORTRAN_COMPILER> <CMAKE_FORTRAN_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_FORTRAN_LINK_EXECUTABLE)
-
-
-IF(NOT CMAKE_CXX_LINK_EXECUTABLE)
- SET(CMAKE_CXX_LINK_EXECUTABLE
- "<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_CXX_LINK_EXECUTABLE)
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 2dc6383..a14dd04 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -37,7 +37,6 @@ IF(NOT CMAKE_C_COMPILER)
SET(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_INIT} CACHE STRING "C compiler")
ENDIF(NOT CMAKE_C_COMPILER)
MARK_AS_ADVANCED(CMAKE_C_COMPILER)
-
FIND_PROGRAM(CMAKE_AR NAMES ar )
FIND_PROGRAM(CMAKE_RANLIB NAMES ranlib)
@@ -81,3 +80,4 @@ ENDIF(NOT CMAKE_COMPILER_IS_GNUCC_RUN)
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
${CMAKE_BINARY_DIR}/CMakeCCompiler.cmake IMMEDIATE)
MARK_AS_ADVANCED(CMAKE_AR)
+SET(CMAKE_C_COMPILER_ENV_VAR "CC")
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 661f489..3718f5f 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -60,6 +60,4 @@ ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX_RUN)
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_BINARY_DIR}/CMakeCXXCompiler.cmake IMMEDIATE)
-
-
-
+SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 52004ee..de75627 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -5,38 +5,55 @@
# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator
# as a default compiler
-IF(NOT CMAKE_FORTRAN_COMPILER)
+IF(NOT CMAKE_Fortran_COMPILER)
# prefer the environment variable CC
IF($ENV{FC} MATCHES ".+")
- GET_FILENAME_COMPONENT(CMAKE_FORTRAN_COMPILER_INIT $ENV{FC} PROGRAM PROGRAM_ARGS CMAKE_FORTRAN_FLAGS_ENV_INIT)
- IF(EXISTS ${CMAKE_FORTRAN_COMPILER_INIT})
- ELSE(EXISTS ${CMAKE_FORTRAN_COMPILER_INIT})
+ GET_FILENAME_COMPONENT(CMAKE_Fortran_COMPILER_INIT $ENV{FC} PROGRAM PROGRAM_ARGS CMAKE_Fortran_FLAGS_ENV_INIT)
+ IF(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
+ ELSE(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable FC:\n$ENV{FC}.")
- ENDIF(EXISTS ${CMAKE_FORTRAN_COMPILER_INIT})
+ ENDIF(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
ENDIF($ENV{FC} MATCHES ".+")
# next try prefer the compiler specified by the generator
IF(CMAKE_GENERATOR_FC)
- IF(NOT CMAKE_FORTRAN_COMPILER_INIT)
- SET(CMAKE_FORTRAN_COMPILER_INIT ${CMAKE_GENERATOR_FC})
- ENDIF(NOT CMAKE_FORTRAN_COMPILER_INIT)
+ IF(NOT CMAKE_Fortran_COMPILER_INIT)
+ SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
+ ENDIF(NOT CMAKE_Fortran_COMPILER_INIT)
ENDIF(CMAKE_GENERATOR_FC)
# if no compiler has been specified yet, then look for one
- IF(NOT CMAKE_FORTRAN_COMPILER_INIT)
- # if not in the envionment then search for the compiler in the path
- SET(CMAKE_FORTRAN_COMPILER_LIST g77 ifort f77 f90 epcf90 efc ecc)
- FIND_PROGRAM(CMAKE_FORTRAN_COMPILER_FULLPATH NAMES ${CMAKE_FORTRAN_COMPILER_LIST} )
- GET_FILENAME_COMPONENT(CMAKE_FORTRAN_COMPILER_INIT
- ${CMAKE_FORTRAN_COMPILER_FULLPATH} NAME)
- SET(CMAKE_FORTRAN_COMPILER_FULLPATH "${CMAKE_FORTRAN_COMPILER_FULLPATH}" CACHE INTERNAL "full path to the compiler cmake found")
- ENDIF(NOT CMAKE_FORTRAN_COMPILER_INIT)
+ IF(NOT CMAKE_Fortran_COMPILER_INIT)
+ # if not in the envionment then search for the compiler in the path# Known compilers:
+ # f77/f90/f95: generic compiler names
+ # g77: GNU Fortran 77 compiler
+ # gfortran: putative GNU Fortran 95+ compiler (in progress)
+ # fort77: native F77 compiler under HP-UX (and some older Crays)
+ # frt: Fujitsu F77 compiler
+ # pgf77/pgf90/pgf95: Portland Group F77/F90/F95 compilers
+ # xlf/xlf90/xlf95: IBM (AIX) F77/F90/F95 compilers
+ # lf95: Lahey-Fujitsu F95 compiler
+ # fl32: Microsoft Fortran 77 "PowerStation" compiler
+ # af77: Apogee F77 compiler for Intergraph hardware running CLIX
+ # epcf90: "Edinburgh Portable Compiler" F90
+ # fort: Compaq (now HP) Fortran 90/95 compiler for Tru64 and Linux/Alpha
+ # ifc: Intel Fortran 95 compiler for Linux/x86
+ # efc: Intel Fortran 95 compiler for IA64
+ # the order is 95 or newer compilers first, then 90, then 77 or older compilers, gnu is always last in the group,
+ # so if you paid for a compiler it is picked by default
+ SET(CMAKE_Fortran_COMPILER_LIST ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran f90 pgf90 xlf90 epcf90
+ f77 fort77 frt pgf77 xlf fl32 af77 g77 )
+ FIND_PROGRAM(CMAKE_Fortran_COMPILER_FULLPATH NAMES ${CMAKE_Fortran_COMPILER_LIST} )
+ GET_FILENAME_COMPONENT(CMAKE_Fortran_COMPILER_INIT
+ ${CMAKE_Fortran_COMPILER_FULLPATH} NAME)
+ SET(CMAKE_Fortran_COMPILER_FULLPATH "${CMAKE_Fortran_COMPILER_FULLPATH}" CACHE INTERNAL "full path to the compiler cmake found")
+ ENDIF(NOT CMAKE_Fortran_COMPILER_INIT)
- SET(CMAKE_FORTRAN_COMPILER ${CMAKE_FORTRAN_COMPILER_INIT} CACHE STRING "Fortran compiler")
-ENDIF(NOT CMAKE_FORTRAN_COMPILER)
+ SET(CMAKE_Fortran_COMPILER ${CMAKE_Fortran_COMPILER_INIT} CACHE STRING "Fortran compiler")
+ENDIF(NOT CMAKE_Fortran_COMPILER)
-MARK_AS_ADVANCED(CMAKE_FORTRAN_COMPILER)
+MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER)
FIND_PROGRAM(CMAKE_AR NAMES ar )
@@ -49,12 +66,12 @@ MARK_AS_ADVANCED(CMAKE_RANLIB)
IF(NOT CMAKE_COMPILER_IS_GNUG77_RUN)
# test to see if the Fortran compiler is gnu
- IF(CMAKE_FORTRAN_FLAGS)
- SET(CMAKE_BOOT_FORTRAN_FLAGS ${CMAKE_FORTRAN_FLAGS})
- ELSE(CMAKE_FORTRAN_FLAGS)
- SET(CMAKE_BOOT_FORTRAN_FLAGS $ENV{FFLAGS})
- ENDIF(CMAKE_FORTRAN_FLAGS)
- EXEC_PROGRAM(${CMAKE_FORTRAN_COMPILER} ARGS ${CMAKE_BOOT_FORTRAN_FLAGS} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\"" OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
+ IF(CMAKE_Fortran_FLAGS)
+ SET(CMAKE_BOOT_Fortran_FLAGS ${CMAKE_Fortran_FLAGS})
+ ELSE(CMAKE_Fortran_FLAGS)
+ SET(CMAKE_BOOT_Fortran_FLAGS $ENV{FFLAGS})
+ ENDIF(CMAKE_Fortran_FLAGS)
+ EXEC_PROGRAM(${CMAKE_Fortran_COMPILER} ARGS ${CMAKE_BOOT_Fortran_FLAGS} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\"" OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
SET(CMAKE_COMPILER_IS_GNUG77_RUN 1)
IF(NOT CMAKE_COMPILER_RETURN)
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
@@ -81,3 +98,4 @@ ENDIF(NOT CMAKE_COMPILER_IS_GNUG77_RUN)
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
${CMAKE_BINARY_DIR}/CMakeFortranCompiler.cmake IMMEDIATE)
MARK_AS_ADVANCED(CMAKE_AR)
+SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")
diff --git a/Modules/CMakeDetermineJavaCompiler.cmake b/Modules/CMakeDetermineJavaCompiler.cmake
index 91a44e7..de5227d 100644
--- a/Modules/CMakeDetermineJavaCompiler.cmake
+++ b/Modules/CMakeDetermineJavaCompiler.cmake
@@ -73,3 +73,4 @@ MARK_AS_ADVANCED(CMAKE_JAVA_COMPILER)
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in
${CMAKE_BINARY_DIR}/CMakeJavaCompiler.cmake IMMEDIATE @ONLY)
MARK_AS_ADVANCED(CMAKE_AR CMAKE_JAVA_COMPILER_FULLPATH)
+SET(CMAKE_JAVA_COMPILER_ENV_VAR "JC")
diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in
index 1bf30a1..21a5f0d 100644
--- a/Modules/CMakeFortranCompiler.cmake.in
+++ b/Modules/CMakeFortranCompiler.cmake.in
@@ -1,8 +1,8 @@
-SET(CMAKE_FORTRAN_COMPILER "@CMAKE_FORTRAN_COMPILER@")
+SET(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@")
SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_COMPILER_IS_GNUCC @CMAKE_COMPILER_IS_GNUCC@)
-SET(CMAKE_FORTRAN_COMPILER_LOADED 1)
+SET(CMAKE_Fortran_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)
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
new file mode 100644
index 0000000..fa4894a
--- /dev/null
+++ b/Modules/CMakeFortranInformation.cmake
@@ -0,0 +1,120 @@
+# This file sets the basic flags for the Fortran language in CMake.
+# It also loads the available platform file for the system-compiler
+# if it exists.
+
+GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
+# since the gnu compiler has several names force g++
+IF(CMAKE_COMPILER_IS_GNUG77)
+ SET(CMAKE_BASE_NAME g77)
+ENDIF(CMAKE_COMPILER_IS_GNUG77)
+SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE
+ ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
+INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
+
+
+# Create a set of shared library variable specific to Fortran
+# For 90% of the systems, these are the same flags as the C versions
+# so if these are not set just copy the flags from the c version
+IF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
+ SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
+ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
+
+IF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
+ SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
+ENDIF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
+
+IF(NOT CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
+ SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_FLAGS})
+ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
+
+IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
+ SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG})
+ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
+
+IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
+ SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP})
+ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
+
+# repeat for modules
+IF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
+ SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
+ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
+
+IF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS)
+ SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
+ENDIF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS)
+
+IF(NOT CMAKE_SHARED_MODULE_LINK_Fortran_FLAGS)
+ SET(CMAKE_SHARED_MODULE_LINK_Fortran_FLAGS ${CMAKE_SHARED_MODULE_LINK_FLAGS})
+ENDIF(NOT CMAKE_SHARED_MODULE_LINK_Fortran_FLAGS)
+
+IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG)
+ SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_FLAG})
+ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG)
+
+IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP)
+ SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP})
+ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP)
+
+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. With Visual Studio IDE projects all commands are done without /nologo.")
+
+SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_ENV_INIT} $ENV{FFLAGS} ${CMAKE_Fortran_FLAGS_INIT}" CACHE STRING
+ "Flags for Fortran compiler.")
+
+
+
+INCLUDE(CMakeCommonLanguageInclude)
+
+# now define the following rule variables
+# CMAKE_Fortran_CREATE_SHARED_LIBRARY
+# CMAKE_Fortran_CREATE_SHARED_MODULE
+# CMAKE_Fortran_CREATE_STATIC_LIBRARY
+# CMAKE_Fortran_COMPILE_OBJECT
+# CMAKE_Fortran_LINK_EXECUTABLE
+
+# create a Fortran shared library
+IF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
+ SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
+ "<CMAKE_Fortran_COMPILER> <CMAKE_SHARED_LIBRARY_Fortran_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
+
+# create a Fortran shared module just copy the shared library rule
+IF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
+ SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
+ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
+
+# create a Fortran static library
+IF(NOT CMAKE_Fortran_CREATE_STATIC_LIBRARY)
+ SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY
+ "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
+ "<CMAKE_RANLIB> <TARGET> ")
+ENDIF(NOT CMAKE_Fortran_CREATE_STATIC_LIBRARY)
+
+# compile a Fortran file into an object file
+IF(NOT CMAKE_Fortran_COMPILE_OBJECT)
+ SET(CMAKE_Fortran_COMPILE_OBJECT
+ "<CMAKE_Fortran_COMPILER> -o <OBJECT> <FLAGS> -c <SOURCE>")
+ENDIF(NOT CMAKE_Fortran_COMPILE_OBJECT)
+
+# link a fortran program
+IF(NOT CMAKE_Fortran_LINK_EXECUTABLE)
+ SET(CMAKE_Fortran_LINK_EXECUTABLE
+ "<CMAKE_Fortran_COMPILER> <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+ENDIF(NOT CMAKE_Fortran_LINK_EXECUTABLE)
+
+
+# Load the user define rules
+IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+ INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
+ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+
+
+MARK_AS_ADVANCED(
+CMAKE_Fortran_FLAGS
+CMAKE_Fortran_FLAGS_DEBUG
+CMAKE_Fortran_FLAGS_MINSIZEREL
+CMAKE_Fortran_FLAGS_RELEASE
+CMAKE_Fortran_FLAGS_RELWITHDEBINFO)
+
+# set this variable so we can avoid loading this more than once.
+SET(CMAKE_Fortran_INFOMATION_LOADED 1)
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
new file mode 100644
index 0000000..7ab9995
--- /dev/null
+++ b/Modules/CMakeGenericSystem.cmake
@@ -0,0 +1,36 @@
+SET(CMAKE_LINK_LIBRARY_SUFFIX "")
+
+SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
+SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
+SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
+SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
+SET(CMAKE_DL_LIBS "-ldl")
+SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
+SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
+SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "") # +s, flag for exe link to use shared lib
+SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "") # -rpath
+SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP "") # : or empty
+SET(CMAKE_LIBRARY_PATH_FLAG "-L")
+SET(CMAKE_LINK_LIBRARY_FLAG "-l")
+IF(CMAKE_COMPILER_IS_GNUCC)
+ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
+ENDIF(CMAKE_COMPILER_IS_GNUCC)
+IF(CMAKE_COMPILER_IS_GNUCXX)
+ SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
+SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
+ "If set, runtime paths are not added when using shared libraries.")
+SET (CMAKE_INSTALL_PREFIX /usr/local CACHE PATH
+ "Install path prefix, prepended onto install directories.")
+
+MARK_AS_ADVANCED(
+CMAKE_SKIP_RPATH
+)
+
+IF(NOT UNIX)
+ MARK_AS_ADVANCED(CMAKE_INSTALL_PREFIX)
+ENDIF(NOT UNIX)
+
+# always include the gcc compiler information
+INCLUDE(Platform/gcc)
diff --git a/Modules/CMakeJavaCompiler.cmake.in b/Modules/CMakeJavaCompiler.cmake.in
index d1b85e7..f0ae7c0 100644
--- a/Modules/CMakeJavaCompiler.cmake.in
+++ b/Modules/CMakeJavaCompiler.cmake.in
@@ -63,4 +63,4 @@ MACRO(ADD_JAVA_LIBRARY LIBRARYNAME SOURCES)
ELSE(CMAKE_JAVA_COMPILER AND CMAKE_JAVA_ARCHIVE)
MESSAGE(SEND_ERROR "Java compiler and/or Java archiver not found")
ENDIF(CMAKE_JAVA_COMPILER AND CMAKE_JAVA_ARCHIVE)
-ENDMACRO(ADD_JAVA_LIBRARY LIBRARYNAME SOURCES) \ No newline at end of file
+ENDMACRO(ADD_JAVA_LIBRARY LIBRARYNAME SOURCES)
diff --git a/Modules/CMakeJavaInformation.cmake b/Modules/CMakeJavaInformation.cmake
new file mode 100644
index 0000000..891ac06
--- /dev/null
+++ b/Modules/CMakeJavaInformation.cmake
@@ -0,0 +1 @@
+# this is a place holder if java needed flags for javac they would go here.
diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake
index bdc3fe0..aeb4d09 100644
--- a/Modules/CMakeSystemSpecificInformation.cmake
+++ b/Modules/CMakeSystemSpecificInformation.cmake
@@ -1,48 +1,14 @@
-# this module sets system information like how to build libraries
-# before including this file the system, C, and C++ compilers must
-# have already been determined.
-# This file first sets default variables that can be used for most
-# makefiles. Next, it will include a system specific file. Finally,
-# it will optionally include a system and compiler specific file that
-# can be used to override any of this information.
-# For debugging new systems, and expert users, if the
-# CMAKE_USER_MAKE_RULES_OVERRIDE is set to a file name, that
-# file will be included last, and can override any variable
+# This file is included by cmGlobalGenerator::EnableLanguage.
+# It is included after the compiler has been determined, so
+# we know things like the compiler name and if the compiler is gnu.
+# include Generic system information
+INCLUDE(CMakeGenericSystem)
-# 1. set default values that will work for most system
-
-# suffix that needs to be added onto a library to link it .lib on windows
-# not used on most unix systems
-SET(CMAKE_LINK_LIBRARY_SUFFIX "")
-
-SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
-SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
-SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
-SET(CMAKE_DL_LIBS "-ldl")
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "") # -rpath
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP "") # : or empty
-SET(CMAKE_LIBRARY_PATH_FLAG "-L")
-SET(CMAKE_LINK_LIBRARY_FLAG "-l")
-IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
-IF(CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-
-
-SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
- "If set, runtime paths are not added when using shared libraries.")
-MARK_AS_ADVANCED(CMAKE_SKIP_RPATH)
# 2. now include SystemName.cmake file to set the system specific information
SET(CMAKE_SYSTEM_INFO_FILE ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}.cmake)
IF(EXISTS ${CMAKE_SYSTEM_INFO_FILE})
- INCLUDE(${CMAKE_SYSTEM_INFO_FILE})
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
ELSE(EXISTS ${CMAKE_SYSTEM_INFO_FILE})
MESSAGE("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}"
" to use this system, please send your config file to "
@@ -52,39 +18,15 @@ ELSE(EXISTS ${CMAKE_SYSTEM_INFO_FILE})
${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
MESSAGE("You CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
"Please send that file to cmake@www.cmake.org.")
- ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
+ ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
ENDIF(EXISTS ${CMAKE_SYSTEM_INFO_FILE})
-# 3. include optional systemname-compiler.cmake files
-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_GNUCC)
- SET(CMAKE_BASE_NAME gcc)
- 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)
-ENDIF(CMAKE_C_COMPILER)
-IF(CMAKE_CXX_COMPILER)
- GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
- # since the gnu compiler has several names force g++
- IF(CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_BASE_NAME g++)
- ENDIF(CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE
- ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
- INCLUDE(${CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE} OPTIONAL)
-ENDIF(CMAKE_CXX_COMPILER)
-
# for most systems a module is the same as a shared library
# so unless the variable CMAKE_MODULE_EXISTS is set just
# copy the values from the LIBRARY variables
+# this has to be done after the system information has been loaded
IF(NOT CMAKE_MODULE_EXISTS)
- SET(CMAKE_SHARED_MODULE_C_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
- SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
- SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
SET(CMAKE_SHARED_MODULE_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
SET(CMAKE_SHARED_MODULE_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
SET(CMAKE_SHARED_MODULE_LINK_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_FLAGS})
@@ -93,244 +35,4 @@ IF(NOT CMAKE_MODULE_EXISTS)
ENDIF(NOT CMAKE_MODULE_EXISTS)
-# Create a set of shared library variable specific to C++
-# For 90% of the systems, these are the same flags as the C versions
-# so if these are not set just copy the flags from the c version
-IF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
- SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
-
-IF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
- SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
-
-IF(NOT CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
- SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
-
-IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
-
-IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
-
-# repeat for modules
-IF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
- SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
-
-IF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
- SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
-
-IF(NOT CMAKE_SHARED_MODULE_LINK_CXX_FLAGS)
- SET(CMAKE_SHARED_MODULE_LINK_CXX_FLAGS ${CMAKE_SHARED_MODULE_LINK_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_LINK_CXX_FLAGS)
-
-IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG)
- SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_FLAG})
-ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG)
-
-IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP)
- SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP})
-ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP)
-
-# Create a set of shared library variable specific to Fortran
-# For 90% of the systems, these are the same flags as the C versions
-# so if these are not set just copy the flags from the c version
-IF(NOT CMAKE_SHARED_LIBRARY_CREATE_FORTRAN_FLAGS)
- SET(CMAKE_SHARED_LIBRARY_CREATE_FORTRAN_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_FORTRAN_FLAGS)
-
-IF(NOT CMAKE_SHARED_LIBRARY_FORTRAN_FLAGS)
- SET(CMAKE_SHARED_LIBRARY_FORTRAN_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_FORTRAN_FLAGS)
-
-IF(NOT CMAKE_SHARED_LIBRARY_LINK_FORTRAN_FLAGS)
- SET(CMAKE_SHARED_LIBRARY_LINK_FORTRAN_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_FORTRAN_FLAGS)
-
-IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_FORTRAN_FLAG)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_FORTRAN_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_FORTRAN_FLAG)
-
-IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_FORTRAN_FLAG_SEP)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_FORTRAN_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_FORTRAN_FLAG_SEP)
-
-# repeat for modules
-IF(NOT CMAKE_SHARED_MODULE_CREATE_FORTRAN_FLAGS)
- SET(CMAKE_SHARED_MODULE_CREATE_FORTRAN_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_FORTRAN_FLAGS)
-
-IF(NOT CMAKE_SHARED_MODULE_FORTRAN_FLAGS)
- SET(CMAKE_SHARED_MODULE_FORTRAN_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_FORTRAN_FLAGS)
-
-IF(NOT CMAKE_SHARED_MODULE_LINK_FORTRAN_FLAGS)
- SET(CMAKE_SHARED_MODULE_LINK_FORTRAN_FLAGS ${CMAKE_SHARED_MODULE_LINK_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_LINK_FORTRAN_FLAGS)
-
-IF(NOT CMAKE_SHARED_MODULE_RUNTIME_FORTRAN_FLAG)
- SET(CMAKE_SHARED_MODULE_RUNTIME_FORTRAN_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_FLAG})
-ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_FORTRAN_FLAG)
-
-IF(NOT CMAKE_SHARED_MODULE_RUNTIME_FORTRAN_FLAG_SEP)
- SET(CMAKE_SHARED_MODULE_RUNTIME_FORTRAN_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP})
-ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_FORTRAN_FLAG_SEP)
-
-# include default rules that work for most unix like systems and compilers
-# this file will not set anything if it is already set
-INCLUDE(${CMAKE_ROOT}/Modules/CMakeDefaultMakeRuleVariables.cmake)
-
-IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
- INCLUDE(${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. With Visual Studio IDE projects all commands are done without /nologo.")
-
-SET (CMAKE_INSTALL_PREFIX /usr/local CACHE PATH
- "Install path prefix, prepended onto install directories.")
-
-# add the flags to the cache based
-# on the initial values computed in the platform/*.cmake files
-# use _INIT variables so that this only happens the first time
-# 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_C_FLAGS "${CMAKE_C_FLAGS_ENV_INIT} $ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}" CACHE STRING
- "Flags for C compiler.")
-
-SET (CMAKE_FORTRAN_FLAGS "${CMAKE_FORTRAN_FLAGS_ENV_INIT} $ENV{FFLAGS} ${CMAKE_FORTRAN_FLAGS_INIT}" CACHE STRING
- "Flags for Fortran compiler.")
-
-SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
- CACHE STRING "Flags used by the linker.")
-
-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
- "Flags used by the linker during release minsize builds.")
-
- 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
- ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
- "Flags used by the linker during Release with Debug Info builds.")
-
- 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}
- 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
- "Flags used by the linker during release builds.")
-
- 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.")
-
- 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}
- 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
- "Flags used by the linker during release builds.")
-
- 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} $ENV{LDFLAGS}
- CACHE STRING "Flags used by the linker during the creation of dll's.")
-
-# module linker flags
-SET (CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
- CACHE STRING "Flags used by the linker during the creation of modules.")
-
-SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL
- "What is the target build tool cmake is generating for.")
-
-MARK_AS_ADVANCED(
-CMAKE_BUILD_TOOL
-CMAKE_VERBOSE_MAKEFILE
-CMAKE_CXX_FLAGS
-CMAKE_CXX_FLAGS_RELEASE
-CMAKE_CXX_FLAGS_RELWITHDEBINFO
-CMAKE_CXX_FLAGS_MINSIZEREL
-CMAKE_CXX_FLAGS_DEBUG
-
-CMAKE_C_FLAGS
-CMAKE_C_FLAGS_DEBUG
-CMAKE_C_FLAGS_MINSIZEREL
-CMAKE_C_FLAGS_RELEASE
-CMAKE_C_FLAGS_RELWITHDEBINFO
-
-CMAKE_FORTRAN_FLAGS
-CMAKE_FORTRAN_FLAGS_DEBUG
-CMAKE_FORTRAN_FLAGS_MINSIZEREL
-CMAKE_FORTRAN_FLAGS_RELEASE
-CMAKE_FORTRAN_FLAGS_RELWITHDEBINFO
-
-CMAKE_EXE_LINKER_FLAGS
-CMAKE_EXE_LINKER_FLAGS_DEBUG
-CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
-CMAKE_EXE_LINKER_FLAGS_RELEASE
-CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
-
-CMAKE_SHARED_LINKER_FLAGS
-CMAKE_SHARED_LINKER_FLAGS_DEBUG
-CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
-CMAKE_SHARED_LINKER_FLAGS_RELEASE
-CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
-
-CMAKE_MODULE_LINKER_FLAGS
-CMAKE_MODULE_LINKER_FLAGS_DEBUG
-CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
-CMAKE_MODULE_LINKER_FLAGS_RELEASE
-CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
-
-)
-IF(NOT UNIX)
- MARK_AS_ADVANCED(CMAKE_INSTALL_PREFIX)
-ENDIF(NOT UNIX)
-
SET(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)
diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake
index 677cb77..e805d62 100644
--- a/Modules/CMakeTestFortranCompiler.cmake
+++ b/Modules/CMakeTestFortranCompiler.cmake
@@ -1,32 +1,32 @@
# This file is used by EnableLanguage in cmGlobalGenerator to
-# determine that that selected C compiler can actually compile
+# determine that that selected Fortran compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
-IF(NOT CMAKE_FORTRAN_COMPILER_WORKS)
- MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_FORTRAN_COMPILER}")
+IF(NOT CMAKE_Fortran_COMPILER_WORKS)
+ MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER}")
FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/testFortranCompiler.f "
- PROGRAM TESTFORTRAN
+ PROGRAM TESTFortran
PRINT *, 'Hello'
END
")
- TRY_COMPILE(CMAKE_FORTRAN_COMPILER_WORKS ${CMAKE_BINARY_DIR}
+ TRY_COMPILE(CMAKE_Fortran_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeTmp/testFortranCompiler.f
OUTPUT_VARIABLE OUTPUT)
-ENDIF(NOT CMAKE_FORTRAN_COMPILER_WORKS)
+ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
-IF(NOT CMAKE_FORTRAN_COMPILER_WORKS)
- MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_FORTRAN_COMPILER} -- broken")
+IF(NOT CMAKE_Fortran_COMPILER_WORKS)
+ MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER} -- broken")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the Fortran compiler works failed with "
"the following output:\n${OUTPUT}\n\n")
- MESSAGE(FATAL_ERROR "The Fortran compiler \"${CMAKE_FORTRAN_COMPILER}\" "
+ MESSAGE(FATAL_ERROR "The Fortran compiler \"${CMAKE_Fortran_COMPILER}\" "
"is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
-ELSE(NOT CMAKE_FORTRAN_COMPILER_WORKS)
- MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_FORTRAN_COMPILER} -- works")
+ELSE(NOT CMAKE_Fortran_COMPILER_WORKS)
+ MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER} -- works")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the Fortran compiler works passed with "
"the following output:\n${OUTPUT}\n\n")
-ENDIF(NOT CMAKE_FORTRAN_COMPILER_WORKS)
+ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
diff --git a/Modules/Platform/AIX.cmake b/Modules/Platform/AIX.cmake
index 7dffcde..7f17c83 100644
--- a/Modules/Platform/AIX.cmake
+++ b/Modules/Platform/AIX.cmake
@@ -9,4 +9,3 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-G") # -shared
ENDIF(CMAKE_COMPILER_IS_GNUCC)
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/BSDOS.cmake b/Modules/Platform/BSDOS.cmake
index 7d4d0c8..8b13789 100644
--- a/Modules/Platform/BSDOS.cmake
+++ b/Modules/Platform/BSDOS.cmake
@@ -1 +1 @@
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
+
diff --git a/Modules/Platform/CYGWIN.cmake b/Modules/Platform/CYGWIN.cmake
index a7cb34c..78a53ce 100644
--- a/Modules/Platform/CYGWIN.cmake
+++ b/Modules/Platform/CYGWIN.cmake
@@ -5,4 +5,3 @@ SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
# no pic for gcc on cygwin
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 8a1fd17..88eab7e 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -24,6 +24,5 @@ SET(CMAKE_CXX_CREATE_SHARED_MODULE
SET(CMAKE_C_CREATE_SHARED_MODULE
"<CMAKE_C_COMPILER> <CMAKE_SHARED_MODULE_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
SET(CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES /usr/local/include)
diff --git a/Modules/Platform/FreeBSD.cmake b/Modules/Platform/FreeBSD.cmake
index e5a8093..e5c03cb 100644
--- a/Modules/Platform/FreeBSD.cmake
+++ b/Modules/Platform/FreeBSD.cmake
@@ -7,4 +7,3 @@ IF(EXISTS /usr/include/dlfcn.h)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty
ENDIF(EXISTS /usr/include/dlfcn.h)
# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake
index 97d3e24..b66a9eb 100644
--- a/Modules/Platform/HP-UX.cmake
+++ b/Modules/Platform/HP-UX.cmake
@@ -51,4 +51,3 @@ ELSE(CMAKE_COMPILER_IS_GNUCXX)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
# set flags for gcc support
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/IRIX.cmake b/Modules/Platform/IRIX.cmake
index 9d924c9..96c8258 100644
--- a/Modules/Platform/IRIX.cmake
+++ b/Modules/Platform/IRIX.cmake
@@ -14,4 +14,3 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX)
SET (CMAKE_C_FLAGS_INIT "")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
# set flags for gcc support
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/IRIX64.cmake b/Modules/Platform/IRIX64.cmake
index 9403381..1d556fb 100644
--- a/Modules/Platform/IRIX64.cmake
+++ b/Modules/Platform/IRIX64.cmake
@@ -9,6 +9,7 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX)
# Set default flags init.
SET(CMAKE_C_FLAGS_INIT "")
SET(CMAKE_CXX_FLAGS_INIT "")
+ SET(CMAKE_FORTRAN_FLAGS_INIT "")
SET(CMAKE_EXE_LINKER_FLAGS_INIT "")
SET(CMAKE_SHARED_LINKER_FLAGS_INIT "")
SET(CMAKE_MODULE_LINKER_FLAGS_INIT "")
@@ -27,6 +28,7 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX)
IF(CMAKE_FILE_SELF MATCHES " 64-bit ")
SET(CMAKE_C_FLAGS_INIT "-64")
SET(CMAKE_CXX_FLAGS_INIT "-64")
+ SET(CMAKE_Fortran_FLAGS_INIT "-64")
SET(CMAKE_EXE_LINKER_FLAGS_INIT "-64")
SET(CMAKE_SHARED_LINKER_FLAGS_INIT "-64")
SET(CMAKE_MODULE_LINKER_FLAGS_INIT "-64")
@@ -41,6 +43,3 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX)
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
-
-# set up for gcc if the compiler is gcc
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake
index 02c809e..6e76a2f 100644
--- a/Modules/Platform/Linux.cmake
+++ b/Modules/Platform/Linux.cmake
@@ -1,6 +1,4 @@
# GCC is the default compiler on Linux.
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
-
SET(CMAKE_DL_LIBS "-ldl")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
diff --git a/Modules/Platform/MP-RAS.cmake b/Modules/Platform/MP-RAS.cmake
index b52fe12..5a644dc 100644
--- a/Modules/Platform/MP-RAS.cmake
+++ b/Modules/Platform/MP-RAS.cmake
@@ -7,5 +7,3 @@ ENDIF(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/NetBSD.cmake b/Modules/Platform/NetBSD.cmake
index e5a8093..e9c9ab2 100644
--- a/Modules/Platform/NetBSD.cmake
+++ b/Modules/Platform/NetBSD.cmake
@@ -6,5 +6,3 @@ IF(EXISTS /usr/include/dlfcn.h)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-rpath,") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty
ENDIF(EXISTS /usr/include/dlfcn.h)
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/OSF1.cmake b/Modules/Platform/OSF1.cmake
index f31aac0..d501c2d 100644
--- a/Modules/Platform/OSF1.cmake
+++ b/Modules/Platform/OSF1.cmake
@@ -29,7 +29,6 @@ ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
IF(CMAKE_COMPILER_IS_GNUCXX)
# include the gcc flags
- INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
ELSE (CMAKE_COMPILER_IS_GNUCXX)
# use default OSF compiler flags
SET (CMAKE_C_FLAGS_INIT "")
diff --git a/Modules/Platform/OpenBSD.cmake b/Modules/Platform/OpenBSD.cmake
index 63ffb93..8b13789 100644
--- a/Modules/Platform/OpenBSD.cmake
+++ b/Modules/Platform/OpenBSD.cmake
@@ -1,2 +1 @@
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
+
diff --git a/Modules/Platform/RISCos.cmake b/Modules/Platform/RISCos.cmake
index 5622827..1979d5e 100644
--- a/Modules/Platform/RISCos.cmake
+++ b/Modules/Platform/RISCos.cmake
@@ -2,5 +2,3 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0")
SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o")
SET(CMAKE_DL_LIBS "")
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-D,08000000")
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/SCO_SV.cmake b/Modules/Platform/SCO_SV.cmake
index 929b04d..89dcd56 100644
--- a/Modules/Platform/SCO_SV.cmake
+++ b/Modules/Platform/SCO_SV.cmake
@@ -2,5 +2,3 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-Kpic -belf")
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-Kpic -belf")
SET(CMAKE_DL_LIBS "")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-belf -Wl,-Bexport")
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/SINIX.cmake b/Modules/Platform/SINIX.cmake
index 5542709..1acacbb 100644
--- a/Modules/Platform/SINIX.cmake
+++ b/Modules/Platform/SINIX.cmake
@@ -1,4 +1,2 @@
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake
index ea2ecd9..c8b4a38 100644
--- a/Modules/Platform/SunOS.cmake
+++ b/Modules/Platform/SunOS.cmake
@@ -46,5 +46,3 @@ ELSE(CMAKE_COMPILER_IS_GNUCXX)
"<CMAKE_CXX_COMPILER> -xar -o <TARGET> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/True64.cmake b/Modules/Platform/True64.cmake
index 63ffb93..8b13789 100644
--- a/Modules/Platform/True64.cmake
+++ b/Modules/Platform/True64.cmake
@@ -1,2 +1 @@
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
+
diff --git a/Modules/Platform/ULTRIX.cmake b/Modules/Platform/ULTRIX.cmake
index 5d425fc..4064721 100644
--- a/Modules/Platform/ULTRIX.cmake
+++ b/Modules/Platform/ULTRIX.cmake
@@ -2,5 +2,3 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0")
SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o")
SET(CMAKE_DL_LIBS "")
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-D,08000000")
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
diff --git a/Modules/Platform/UNIX_SV.cmake b/Modules/Platform/UNIX_SV.cmake
index 14e0689..62b0e59 100644
--- a/Modules/Platform/UNIX_SV.cmake
+++ b/Modules/Platform/UNIX_SV.cmake
@@ -1,4 +1,2 @@
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-Bexport")
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) \ No newline at end of file
diff --git a/Modules/Platform/UnixWare.cmake b/Modules/Platform/UnixWare.cmake
index a471bcb..80acb87 100644
--- a/Modules/Platform/UnixWare.cmake
+++ b/Modules/Platform/UnixWare.cmake
@@ -1,4 +1,2 @@
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-Wl,-Bexport")
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) \ No newline at end of file
diff --git a/Modules/Platform/Windows-gcc.cmake b/Modules/Platform/Windows-gcc.cmake
index c38df85..0fab3f6 100644
--- a/Modules/Platform/Windows-gcc.cmake
+++ b/Modules/Platform/Windows-gcc.cmake
@@ -12,5 +12,3 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP "") # : or empty
SET(CMAKE_LIBRARY_PATH_FLAG "-L")
SET(CMAKE_LINK_LIBRARY_FLAG "-l")
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) \ No newline at end of file
diff --git a/Modules/Platform/Windows-ifort.cmake b/Modules/Platform/Windows-ifort.cmake
new file mode 100644
index 0000000..7665422
--- /dev/null
+++ b/Modules/Platform/Windows-ifort.cmake
@@ -0,0 +1,65 @@
+SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
+SET(CMAKE_LINK_LIBRARY_FLAG "")
+SET(WIN32 1)
+
+SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
+ "link /nologo ${CMAKE_START_TEMP_FILE} /out:<TARGET> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
+
+SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
+
+# create a C++ static library
+SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY "lib /nologo <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
+
+# compile a C++ file into an object file
+SET(CMAKE_Fortran_COMPILE_OBJECT
+ "<CMAKE_Fortran_COMPILER> ${CMAKE_START_TEMP_FILE} /nologo /Fo<OBJECT> <FLAGS> -c <SOURCE>${CMAKE_END_TEMP_FILE}")
+
+SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
+
+SET(CMAKE_Fortran_LINK_EXECUTABLE
+ "<CMAKE_Fortran_COMPILER> /nologo ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> -link <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
+
+SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows)
+SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console)
+
+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" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
+ SET (CMAKE_NO_BUILD_TYPE 1)
+ SET (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING
+ "Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.")
+ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
+# does the compiler support pdbtype and is it the newer compiler
+
+SET(CMAKE_BUILD_TYPE_INIT Debug)
+SET (CMAKE_Fortran_FLAGS_INIT "/W1")
+SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full")
+SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O2 /D NDEBUG")
+SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/MD /O1 /D NDEBUG")
+SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O1 /debug:full /D NDEBUG")
+SET (CMAKE_STANDARD_LIBRARIES "user32.lib" CACHE STRING
+ "Libraries linked by defalut with all applications.")
+
+
+MARK_AS_ADVANCED(CMAKE_STANDARD_LIBRARIES)
+
+
+
+# executable linker flags
+SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
+SET (CMAKE_EXE_LINKER_FLAGS_INIT " /INCREMENTAL:YES")
+IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
+ SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept")
+ SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept")
+ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
+ SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
+ SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
+ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
+
+SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
+SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
+SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
+SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
+SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
+SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
diff --git a/Modules/Platform/Xenix.cmake b/Modules/Platform/Xenix.cmake
index 63ffb93..8b13789 100644
--- a/Modules/Platform/Xenix.cmake
+++ b/Modules/Platform/Xenix.cmake
@@ -1,2 +1 @@
-# include the gcc flags
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
+