summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-10-11 18:45:09 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-10-11 18:45:09 (GMT)
commit3ece15b8f97d060f2fd9b9d38f03ade65b29d73b (patch)
tree9e8c9b102dbf2b61b33dae8da7a465948c219aae /Source
parent4daef775f5a1faf33404d99591670394977658e6 (diff)
parent3df49dc7b1517109ef198177f541e24bc61fefea (diff)
downloadCMake-3ece15b8f97d060f2fd9b9d38f03ade65b29d73b.zip
CMake-3ece15b8f97d060f2fd9b9d38f03ade65b29d73b.tar.gz
CMake-3ece15b8f97d060f2fd9b9d38f03ade65b29d73b.tar.bz2
Merge topic 'HandleCMAKE_CXX_COMPILER_ARG1InEclipse'
3df49dc fix #12392: handle CMAKE_CXX_COMPILER_ARG1 for Eclipse projects
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 1dd9bf3..7beffdc 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -987,17 +987,26 @@ void cmExtraEclipseCDT4Generator
// we need the "make" and the C (or C++) compiler which are used, Alex
std::string make = makefile.GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
std::string compiler = makefile.GetSafeDefinition("CMAKE_C_COMPILER");
+ std::string arg1 = makefile.GetSafeDefinition("CMAKE_C_COMPILER_ARG1");
if (compiler.empty())
{
compiler = makefile.GetSafeDefinition("CMAKE_CXX_COMPILER");
+ arg1 = makefile.GetSafeDefinition("CMAKE_CXX_COMPILER_ARG1");
}
if (compiler.empty()) //Hmm, what to do now ?
{
compiler = "gcc";
}
-
// the following right now hardcodes gcc behaviour :-/
+ std::string compilerArgs =
+ "-E -P -v -dD ${plugin_state_location}/${specs_file}";
+ if (!arg1.empty())
+ {
+ arg1 += " ";
+ compilerArgs = arg1 + compilerArgs;
+ }
+
fout <<
"<storageModule moduleId=\"scannerConfiguration\">\n"
"<autodiscovery enabled=\"true\" problemReportingEnabled=\"true\""
@@ -1007,7 +1016,7 @@ void cmExtraEclipseCDT4Generator
cmExtraEclipseCDT4Generator::AppendScannerProfile(fout,
"org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile",
true, "", true, "specsFile",
- "-E -P -v -dD ${plugin_state_location}/${specs_file}",
+ compilerArgs,
compiler, true, true);
cmExtraEclipseCDT4Generator::AppendScannerProfile(fout,
"org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile",