[Cmake-commits] CMake branch, next, updated. v2.8.5-2000-gf091f76
Alexander Neundorf
neundorf at kde.org
Sat Oct 1 13:20:09 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via f091f7647627cdac251a65ea5bb1d582075eb37d (commit)
via 3df49dc7b1517109ef198177f541e24bc61fefea (commit)
via 867b226898fa1dab1001abf7dd18e21d273b259e (commit)
from bd5b17a2a5a97f62840b90f82fb0057bbe8e0efe (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f091f7647627cdac251a65ea5bb1d582075eb37d
commit f091f7647627cdac251a65ea5bb1d582075eb37d
Merge: bd5b17a 3df49dc
Author: Alexander Neundorf <neundorf at kde.org>
AuthorDate: Sat Oct 1 13:20:07 2011 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Oct 1 13:20:07 2011 -0400
Merge topic 'HandleCMAKE_CXX_COMPILER_ARG1InEclipse' into next
3df49dc fix #12392: handle CMAKE_CXX_COMPILER_ARG1 for Eclipse projects
867b226 KWSys Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3df49dc7b1517109ef198177f541e24bc61fefea
commit 3df49dc7b1517109ef198177f541e24bc61fefea
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Sat Oct 1 19:09:24 2011 +0200
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Sat Oct 1 19:09:24 2011 +0200
fix #12392: handle CMAKE_CXX_COMPILER_ARG1 for Eclipse projects
CMAKE_CXX/C_COMPILER_ARG1 have to be used for finding the include
dirs and builtin macros, so Eclipse can do code completion
Alex
diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
index 55c37c2..1b4532d 100644
--- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
+++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
@@ -25,10 +25,12 @@ MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines
IF (${_lang} STREQUAL "c++")
SET(_compilerExecutable "${CMAKE_CXX_COMPILER}")
+ SET(_arg1 "${CMAKE_CXX_COMPILER_ARG1}")
ELSE ()
SET(_compilerExecutable "${CMAKE_C_COMPILER}")
+ SET(_arg1 "${CMAKE_C_COMPILER_ARG1}")
ENDIF ()
- EXECUTE_PROCESS(COMMAND ${_compilerExecutable} -v -E -x ${_lang} -dD dummy
+ EXECUTE_PROCESS(COMMAND ${_compilerExecutable} ${_arg1} -v -E -x ${_lang} -dD dummy
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles
ERROR_VARIABLE _gccOutput
OUTPUT_VARIABLE _gccStdout )
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",
-----------------------------------------------------------------------
Summary of changes:
...atorDetermineCompilerMacrosAndIncludeDirs.cmake | 4 +++-
Source/cmExtraEclipseCDT4Generator.cxx | 13 +++++++++++--
Source/kwsys/kwsysDateStamp.cmake | 4 ++--
3 files changed, 16 insertions(+), 5 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list