summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsFortran.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-29 15:44:25 (GMT)
committerBrad King <brad.king@kitware.com>2015-07-29 15:48:58 (GMT)
commit613bc08ac15b74a395ef0eca7668f7192b438204 (patch)
tree1eb0c904486d58cf5ebdcb377788ec74b78cb3e9 /Source/cmDependsFortran.cxx
parent6d79eda769a5693ed4657f50c97ef5a0c9ba2e1b (diff)
downloadCMake-613bc08ac15b74a395ef0eca7668f7192b438204.zip
CMake-613bc08ac15b74a395ef0eca7668f7192b438204.tar.gz
CMake-613bc08ac15b74a395ef0eca7668f7192b438204.tar.bz2
cmDependsFortran: Use string to store module directory
Diffstat (limited to 'Source/cmDependsFortran.cxx')
-rw-r--r--Source/cmDependsFortran.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index 13c6409..856dcd4 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -154,14 +154,10 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
const char* stamp_dir = this->TargetDirectory.c_str();
// Get the directory in which module files will be created.
- const char* mod_dir;
cmMakefile* mf = this->LocalGenerator->GetMakefile();
- if(const char* target_mod_dir =
- mf->GetDefinition("CMAKE_Fortran_TARGET_MODULE_DIR"))
- {
- mod_dir = target_mod_dir;
- }
- else
+ std::string mod_dir =
+ mf->GetSafeDefinition("CMAKE_Fortran_TARGET_MODULE_DIR");
+ if (mod_dir.empty())
{
mod_dir =
this->LocalGenerator->GetMakefile()->GetCurrentBinaryDirectory();
@@ -356,7 +352,8 @@ bool
cmDependsFortran
::WriteDependenciesReal(const char *obj,
cmFortranSourceInfo const& info,
- const char* mod_dir, const char* stamp_dir,
+ std::string const& mod_dir,
+ const char* stamp_dir,
std::ostream& makeDepends,
std::ostream& internalDepends)
{