diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-08-26 18:55:55 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-08-26 18:55:55 (GMT) |
commit | 66a08c10e5bd4b8eff58837cd58372a4dfdd19df (patch) | |
tree | 9d094b67d0899a3cebdfeba8b0280d374e7f25db /Modules/Platform | |
parent | 7cdf5c4601ea2a791d35fafadd890508ce434c6f (diff) | |
download | CMake-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/Platform')
-rw-r--r-- | Modules/Platform/AIX.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/BSDOS.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/CYGWIN.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/Darwin.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/FreeBSD.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/HP-UX.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/IRIX.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/IRIX64.cmake | 5 | ||||
-rw-r--r-- | Modules/Platform/Linux.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/MP-RAS.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/NetBSD.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/OSF1.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/OpenBSD.cmake | 3 | ||||
-rw-r--r-- | Modules/Platform/RISCos.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/SCO_SV.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/SINIX.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/SunOS.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/True64.cmake | 3 | ||||
-rw-r--r-- | Modules/Platform/ULTRIX.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/UNIX_SV.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/UnixWare.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/Windows-gcc.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/Windows-ifort.cmake | 65 | ||||
-rw-r--r-- | Modules/Platform/Xenix.cmake | 3 |
24 files changed, 71 insertions, 39 deletions
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) + |