Merge topic 'cray-compiler'

ab9ebb0 Fix Fortran .mod timestamps with Cray compiler
This commit is contained in:
Brad King 2010-12-16 13:59:57 -05:00 committed by CMake Topic Stage
commit 4f769d18d1
1 changed files with 6 additions and 7 deletions

View File

@ -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");