summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalCommonGenerator.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2018-09-04 15:08:50 (GMT)
committerBrad King <brad.king@kitware.com>2018-09-05 19:15:55 (GMT)
commit4d89830d7117a6fb68346d4ebe5f2f3c6d3223a0 (patch)
treed7609df1293e9d4af24cb27e5d9f024844ed6144 /Source/cmLocalCommonGenerator.cxx
parent612975c6652c83c29fcfcf56a7b5a0cfe0218c93 (diff)
downloadCMake-4d89830d7117a6fb68346d4ebe5f2f3c6d3223a0.zip
CMake-4d89830d7117a6fb68346d4ebe5f2f3c6d3223a0.tar.gz
CMake-4d89830d7117a6fb68346d4ebe5f2f3c6d3223a0.tar.bz2
cmMakefile: Make GetRequiredDefinition return std::string
In all cases the return value is converted to std::string anyway. Also remove unnecessary `c_str()` calls in arguments to `GetRequiredDefinition`.
Diffstat (limited to 'Source/cmLocalCommonGenerator.cxx')
-rw-r--r--Source/cmLocalCommonGenerator.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx
index 5a43f2e..7ce2c82 100644
--- a/Source/cmLocalCommonGenerator.cxx
+++ b/Source/cmLocalCommonGenerator.cxx
@@ -54,9 +54,8 @@ std::string cmLocalCommonGenerator::GetTargetFortranFlags(
this->Makefile->GetSafeDefinition("CMAKE_Fortran_MODDIR_DEFAULT");
}
if (!mod_dir.empty()) {
- const char* moddir_flag =
+ std::string modflag =
this->Makefile->GetRequiredDefinition("CMAKE_Fortran_MODDIR_FLAG");
- std::string modflag = moddir_flag;
modflag += mod_dir;
this->AppendFlags(flags, modflag);
}