[Cmake-commits] CMake branch, next, updated. v2.8.3-606-gc539232
Brad King
brad.king at kitware.com
Fri Nov 12 09:36:35 EST 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via c53923295c94b877eddce78531dd8b65c2e52db3 (commit)
via 53e76c8f126fd2480c560cf2bb46a93eabbc91fa (commit)
via 34e1ac2489778a854c3ffaa9c141a9a70416a47e (commit)
from 71e9e36e0e9ba5f6bd69bf42b19ab9bd7437ee96 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c53923295c94b877eddce78531dd8b65c2e52db3
commit c53923295c94b877eddce78531dd8b65c2e52db3
Merge: 71e9e36 53e76c8
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 12 09:36:30 2010 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Nov 12 09:36:30 2010 -0500
Merge topic 'cray-compiler' into next
53e76c8 Teach CMake about Cray C, C++, and Fortran compilers
34e1ac2 Create Fortran info variables for .mod behavior
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53e76c8f126fd2480c560cf2bb46a93eabbc91fa
commit 53e76c8f126fd2480c560cf2bb46a93eabbc91fa
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 12 09:12:08 2010 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 12 09:12:08 2010 -0500
Teach CMake about Cray C, C++, and Fortran compilers
The Cray Fortran compiler needs "-em" to enable module output and also
"-J." to place the .mod files in the current working directory (instead
of next to the .o file).
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index accda32..2b80c88 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -42,6 +42,9 @@
#elif defined(__PATHSCALE__)
# define COMPILER_ID "PathScale"
+#elif defined(_CRAYC)
+# define COMPILER_ID "Cray"
+
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 4a32823..91f116a 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -44,6 +44,9 @@
#elif defined(__PATHSCALE__)
# define COMPILER_ID "PathScale"
+#elif defined(_CRAYC)
+# define COMPILER_ID "Cray"
+
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 107470c..4080cc1 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -6,6 +6,8 @@
PRINT *, 'INFO:compiler[Intel]'
#elif defined(__SUNPRO_F90) || defined(__SUNPRO_F95)
PRINT *, 'INFO:compiler[SunPro]'
+#elif defined(_CRAYFTN)
+ PRINT *, 'INFO:compiler[Cray]'
#elif defined(__G95__)
PRINT *, 'INFO:compiler[G95]'
#elif defined(__PATHSCALE__)
diff --git a/Modules/Compiler/Cray-C.cmake b/Modules/Compiler/Cray-C.cmake
new file mode 100644
index 0000000..675560c
--- /dev/null
+++ b/Modules/Compiler/Cray-C.cmake
@@ -0,0 +1 @@
+set(CMAKE_C_VERBOSE_FLAG "-v")
diff --git a/Modules/Compiler/Cray-CXX.cmake b/Modules/Compiler/Cray-CXX.cmake
new file mode 100644
index 0000000..9fb191c
--- /dev/null
+++ b/Modules/Compiler/Cray-CXX.cmake
@@ -0,0 +1 @@
+set(CMAKE_CXX_VERBOSE_FLAG "-v")
diff --git a/Modules/Compiler/Cray-Fortran.cmake b/Modules/Compiler/Cray-Fortran.cmake
new file mode 100644
index 0000000..4f45176
--- /dev/null
+++ b/Modules/Compiler/Cray-Fortran.cmake
@@ -0,0 +1,4 @@
+set(CMAKE_Fortran_VERBOSE_FLAG "-v")
+set(CMAKE_Fortran_MODOUT_FLAG -em)
+set(CMAKE_Fortran_MODDIR_FLAG -J)
+set(CMAKE_Fortran_MODDIR_DEFAULT .)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34e1ac2489778a854c3ffaa9c141a9a70416a47e
commit 34e1ac2489778a854c3ffaa9c141a9a70416a47e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 12 09:03:49 2010 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 12 09:03:49 2010 -0500
Create Fortran info variables for .mod behavior
Define CMAKE_Fortran_MODDIR_DEFAULT and CMAKE_Fortran_MODOUT_FLAG
variables to help some Fortran compilers generate .mod files in the
current working directory.
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index a877680..a69bb8f 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -1336,6 +1336,29 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"this variable is defined to 1.",
false,"Variables for Languages");
+ cm->DefineProperty(
+ "CMAKE_Fortran_MODDIR_FLAG", cmProperty::VARIABLE,
+ "Fortran flag for module output directory.",
+ "This stores the flag needed to pass the value of the "
+ "Fortran_MODULE_DIRECTORY target property to the compiler.",
+ false,"Variables for Languages");
+
+ cm->DefineProperty(
+ "CMAKE_Fortran_MODDIR_DEFAULT", cmProperty::VARIABLE,
+ "Fortran default module output directory.",
+ "Most Fortran compilers write .mod files to the current working "
+ "directory. "
+ "For those that do not, this is set to \".\" and used when the "
+ "Fortran_MODULE_DIRECTORY target property is not set.",
+ false,"Variables for Languages");
+
+ cm->DefineProperty(
+ "CMAKE_Fortran_MODOUT_FLAG", cmProperty::VARIABLE,
+ "Fortran flag to enable module output.",
+ "Most Fortran compilers write .mod files out by default. "
+ "For others, this stores the flag needed to enable module output.",
+ false,"Variables for Languages");
+
// variables that are used by cmake but not to be documented
cm->DefineProperty("CMAKE_MATCH_0", cmProperty::VARIABLE,0,0);
cm->DefineProperty("CMAKE_MATCH_1", cmProperty::VARIABLE,0,0);
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 9153f3a..6b290ab 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1723,6 +1723,8 @@ const char* cmMakefileTargetGenerator::GetFortranModuleDirectory()
this->Target->GetProperty("Fortran_MODULE_DIRECTORY");
const char* moddir_flag =
this->Makefile->GetDefinition("CMAKE_Fortran_MODDIR_FLAG");
+ const char* moddir_default =
+ this->Makefile->GetDefinition("CMAKE_Fortran_MODDIR_DEFAULT");
if(target_mod_dir && moddir_flag)
{
// Compute the full path to the module directory.
@@ -1743,6 +1745,10 @@ const char* cmMakefileTargetGenerator::GetFortranModuleDirectory()
// Make sure the module output directory exists.
cmSystemTools::MakeDirectory(this->FortranModuleDirectory.c_str());
}
+ else if(moddir_default && moddir_flag)
+ {
+ this->FortranModuleDirectory = moddir_default;
+ }
this->FortranModuleDirectoryComputed = true;
}
@@ -1760,6 +1766,13 @@ const char* cmMakefileTargetGenerator::GetFortranModuleDirectory()
//----------------------------------------------------------------------------
void cmMakefileTargetGenerator::AddFortranFlags(std::string& flags)
{
+ // Enable module output if necessary.
+ if(const char* modout_flag =
+ this->Makefile->GetDefinition("CMAKE_Fortran_MODOUT_FLAG"))
+ {
+ this->LocalGenerator->AppendFlags(flags, modout_flag);
+ }
+
// Add a module output directory flag if necessary.
if(const char* mod_dir = this->GetFortranModuleDirectory())
{
-----------------------------------------------------------------------
Summary of changes:
Modules/CMakeCCompilerId.c.in | 3 +++
Modules/CMakeCXXCompilerId.cpp.in | 3 +++
Modules/CMakeFortranCompilerId.F.in | 2 ++
Modules/Compiler/Cray-C.cmake | 1 +
Modules/Compiler/Cray-CXX.cmake | 1 +
Modules/Compiler/Cray-Fortran.cmake | 4 ++++
Source/cmDocumentVariables.cxx | 23 +++++++++++++++++++++++
Source/cmMakefileTargetGenerator.cxx | 13 +++++++++++++
8 files changed, 50 insertions(+), 0 deletions(-)
create mode 100644 Modules/Compiler/Cray-C.cmake
create mode 100644 Modules/Compiler/Cray-CXX.cmake
create mode 100644 Modules/Compiler/Cray-Fortran.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list