summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-06 15:35:25 (GMT)
committerBrad King <brad.king@kitware.com>2010-12-06 15:35:25 (GMT)
commitab9ebb017e2ca30ff350bc6ab1bf5992c66b1716 (patch)
tree161338af8c23f57524834d7660474eb8cb580fe3 /Source/cmMakefileTargetGenerator.cxx
parent53e76c8f126fd2480c560cf2bb46a93eabbc91fa (diff)
downloadCMake-ab9ebb017e2ca30ff350bc6ab1bf5992c66b1716.zip
CMake-ab9ebb017e2ca30ff350bc6ab1bf5992c66b1716.tar.gz
CMake-ab9ebb017e2ca30ff350bc6ab1bf5992c66b1716.tar.bz2
Fix Fortran .mod timestamps with Cray compiler
Commit 34e1ac24 (Create Fortran info variables for .mod behavior, 2010-11-12) incorrectly taught GetFortranModuleDirectory to return a relative path. We really want to use "." as the module directory only as a workaround for compilers that do not do so by default. Therefore we need this default only when generating the compiler command line and not when scanning dependencies. Revert the previous change to GetFortranModuleDirectory and apply the change only at one of its call sites.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 6b290ab..ae62ac2 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1723,8 +1723,6 @@ 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.
@@ -1745,10 +1743,6 @@ 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;
}
@@ -1774,7 +1768,12 @@ void cmMakefileTargetGenerator::AddFortranFlags(std::string& flags)
}
// Add a module output directory flag if necessary.
- if(const char* mod_dir = this->GetFortranModuleDirectory())
+ const char* mod_dir = this->GetFortranModuleDirectory();
+ if(!mod_dir)
+ {
+ mod_dir = this->Makefile->GetDefinition("CMAKE_Fortran_MODDIR_DEFAULT");
+ }
+ if(mod_dir)
{
const char* moddir_flag =
this->Makefile->GetRequiredDefinition("CMAKE_Fortran_MODDIR_FLAG");