summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorPhilip Lowman <philip@yhbt.com>2011-05-26 02:10:19 (GMT)
committerPhilip Lowman <philip@yhbt.com>2011-05-26 02:10:19 (GMT)
commit162f3fb413fc862c5c75a0402fdfbdc6dd19468b (patch)
treef38559d56af1f57a72875c4e1dbd8126fda24163 /Modules
parentca000a0948023961130d1ee389d65228a746629a (diff)
parent8b17fd67256d10c86acba9c2b2ce1d0211a90fea (diff)
downloadCMake-162f3fb413fc862c5c75a0402fdfbdc6dd19468b.zip
CMake-162f3fb413fc862c5c75a0402fdfbdc6dd19468b.tar.gz
CMake-162f3fb413fc862c5c75a0402fdfbdc6dd19468b.tar.bz2
Merge branch 'master' of git://public.kitware.com/cmake into 12128_FindProtobuf_module_behavior_under_Windows_is_annoying
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake3
-rw-r--r--Modules/CMakeDetermineSystem.cmake7
-rw-r--r--Modules/CMakeFortranCompilerId.F.in2
-rw-r--r--Modules/CMakeGenericSystem.cmake6
-rw-r--r--Modules/CMakeParseImplicitLinkInfo.cmake8
-rw-r--r--Modules/CPackRPM.cmake6
-rw-r--r--Modules/Compiler/Absoft-Fortran.cmake8
-rw-r--r--Modules/Platform/Darwin-Absoft-Fortran.cmake1
-rw-r--r--Modules/Platform/Linux-Absoft-Fortran.cmake1
9 files changed, 33 insertions, 9 deletions
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 5355886..ed4e983 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -64,7 +64,7 @@ IF(NOT CMAKE_Fortran_COMPILER)
# 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 pathf2003 pathf95 pgf95 lf95 xlf95 fort
+ ifort ifc af95 af90 efc f95 pathf2003 pathf95 pgf95 lf95 xlf95 fort
gfortran gfortran-4 g95 f90 pathf90 pgf90 xlf90 epcf90 fort77
frt pgf77 xlf fl32 af77 g77 f77
)
@@ -72,6 +72,7 @@ IF(NOT CMAKE_Fortran_COMPILER)
# Vendor-specific compiler names.
SET(_Fortran_COMPILER_NAMES_GNU gfortran gfortran-4 g95 g77)
SET(_Fortran_COMPILER_NAMES_Intel ifort ifc efc)
+ SET(_Fortran_COMPILER_NAMES_Absoft af95 af90 af77)
SET(_Fortran_COMPILER_NAMES_PGI pgf95 pgf90 pgf77)
SET(_Fortran_COMPILER_NAMES_PathScale pathf2003 pathf95 pathf90)
SET(_Fortran_COMPILER_NAMES_XL xlf)
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index 0e65bce..7ae3775 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -50,14 +50,17 @@ IF(CMAKE_HOST_UNIX)
IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
- ELSE(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
+ ELSEIF(CMAKE_HOST_SYSTEM_NAME MATCHES "OpenBSD")
+ EXEC_PROGRAM(arch ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
+ RETURN_VALUE val)
+ ELSE()
EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
IF("${val}" GREATER 0)
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
ENDIF("${val}" GREATER 0)
- ENDIF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
+ ENDIF()
# check the return of the last uname -m or -p
IF("${val}" GREATER 0)
SET(CMAKE_HOST_SYSTEM_PROCESSOR "unknown")
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 8584731..4d25de0 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -12,6 +12,8 @@
PRINT *, 'INFO:compiler[G95]'
#elif defined(__PATHSCALE__)
PRINT *, 'INFO:compiler[PathScale]'
+#elif defined(__ABSOFT__)
+ PRINT *, 'INFO:compiler[Absoft]'
#elif defined(__GNUC__)
PRINT *, 'INFO:compiler[GNU]'
#elif defined(__IBMC__)
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index b5d3072..6615849 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -50,6 +50,12 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
IF(DEFINED CMAKE_RULE_MESSAGES)
SET_PROPERTY(GLOBAL PROPERTY RULE_MESSAGES ${CMAKE_RULE_MESSAGES})
ENDIF(DEFINED CMAKE_RULE_MESSAGES)
+ IF(CMAKE_GENERATOR MATCHES "Unix Makefiles")
+ SET(CMAKE_EXPORT_COMPILE_COMMANDS OFF CACHE BOOL
+ "Enable/Disable output of compile commands during generation."
+ )
+ MARK_AS_ADVANCED(CMAKE_EXPORT_COMPILE_COMMANDS)
+ ENDIF(CMAKE_GENERATOR MATCHES "Unix Makefiles")
ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index 5405bda..ecb20dc 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -29,11 +29,13 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
# Construct a regex to match linker lines. It must match both the
# whole line and just the command (argv[0]).
set(linker_regex "^( *|.*[/\\])(${linker}|ld|collect2)[^/\\]*( |$)")
+ set(linker_exclude_regex "collect2 version ")
set(log "${log} link line regex: [${linker_regex}]\n")
string(REGEX REPLACE "\r?\n" ";" output_lines "${text}")
foreach(line IN LISTS output_lines)
set(cmd)
- if("${line}" MATCHES "${linker_regex}")
+ if("${line}" MATCHES "${linker_regex}" AND
+ NOT "${line}" MATCHES "${linker_exclude_regex}")
if(UNIX)
separate_arguments(args UNIX_COMMAND "${line}")
else()
@@ -64,8 +66,8 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
# Object file full path.
list(APPEND implicit_libs_tmp ${arg})
set(log "${log} arg [${arg}] ==> obj [${arg}]\n")
- elseif("${arg}" MATCHES "^-Y(P,)?")
- # Sun search path.
+ elseif("${arg}" MATCHES "^-Y(P,)?[^0-9]")
+ # Sun search path ([^0-9] avoids conflict with Mac -Y<num>).
string(REGEX REPLACE "^-Y(P,)?" "" dirs "${arg}")
string(REPLACE ":" ";" dirs "${dirs}")
list(APPEND implicit_dirs_tmp ${dirs})
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index d9d074c..b711bc2 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -489,9 +489,9 @@ ENDIF(CPACK_RPM_PACKAGE_COMPONENT)
# file name by enclosing it between double quotes (thus the sed)
# Then we must authorize any man pages extension (adding * at the end)
# because rpmbuild may automatically compress those files
-EXECUTE_PROCESS(COMMAND find -type f -o -type l
- COMMAND sed {s:.*/man.*/.*:&*:}
- COMMAND sed {s/\\.\\\(.*\\\)/\"\\1\"/}
+EXECUTE_PROCESS(COMMAND find . -type f -o -type l
+ COMMAND sed s:.*/man.*/.*:&*:
+ COMMAND sed s/\\.\\\(.*\\\)/\"\\1\"/
WORKING_DIRECTORY "${WDIR}"
OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)
diff --git a/Modules/Compiler/Absoft-Fortran.cmake b/Modules/Compiler/Absoft-Fortran.cmake
new file mode 100644
index 0000000..bb7d3dc
--- /dev/null
+++ b/Modules/Compiler/Absoft-Fortran.cmake
@@ -0,0 +1,8 @@
+SET(CMAKE_Fortran_FLAGS_INIT "")
+SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "")
+SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
+SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+SET(CMAKE_Fortran_MODDIR_FLAG "-YMOD_OUT_DIR=")
+SET(CMAKE_Fortran_MODPATH_FLAG "-p")
+SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
diff --git a/Modules/Platform/Darwin-Absoft-Fortran.cmake b/Modules/Platform/Darwin-Absoft-Fortran.cmake
new file mode 100644
index 0000000..beb41a3
--- /dev/null
+++ b/Modules/Platform/Darwin-Absoft-Fortran.cmake
@@ -0,0 +1 @@
+set(CMAKE_Fortran_VERBOSE_FLAG "-X -v") # Runs gcc under the hood.
diff --git a/Modules/Platform/Linux-Absoft-Fortran.cmake b/Modules/Platform/Linux-Absoft-Fortran.cmake
new file mode 100644
index 0000000..beb41a3
--- /dev/null
+++ b/Modules/Platform/Linux-Absoft-Fortran.cmake
@@ -0,0 +1 @@
+set(CMAKE_Fortran_VERBOSE_FLAG "-X -v") # Runs gcc under the hood.