diff options
-rw-r--r-- | Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake | 4 | ||||
-rw-r--r-- | Modules/Qt4Macros.cmake | 19 | ||||
-rw-r--r-- | Source/cmExtraCodeBlocksGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 13 | ||||
-rw-r--r-- | Source/cmFindBase.cxx | 6 | ||||
-rw-r--r-- | Source/cmFindCommon.cxx | 7 | ||||
-rw-r--r-- | Source/cmFindCommon.h | 4 | ||||
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 14 | ||||
-rw-r--r-- | Source/cmFindPackageCommand.h | 1 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 2 | ||||
-rw-r--r-- | Source/kwsys/kwsysDateStamp.cmake | 2 | ||||
-rw-r--r-- | Utilities/cmlibarchive/build/cmake/CheckFileOffsetBits.cmake | 6 |
12 files changed, 48 insertions, 34 deletions
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/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 6d7a3ec..630a0ba 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -216,9 +216,22 @@ MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename) SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) - # handling more arguments (as in FindQt4.cmake from KDE4) will come soon, then - # _params will be used for more than just -m - SET(_params -m) + GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE) + IF(_nonamespace) + SET(_params -N -m) + ELSE(_nonamespace) + SET(_params -m) + ENDIF(_nonamespace) + + GET_SOURCE_FILE_PROPERTY(_classname ${_interface} CLASSNAME) + IF(_classname) + SET(_params ${_params} -c ${_classname}) + ENDIF(_classname) + + GET_SOURCE_FILE_PROPERTY(_include ${_interface} INCLUDE) + IF(_include) + SET(_params ${_params} -i ${_include}) + ENDIF(_include) ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile} diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 92dee5a..38002ec 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -19,6 +19,7 @@ #include "cmGeneratedFileStream.h" #include "cmTarget.h" #include "cmSystemTools.h" +#include "cmXMLSafe.h" #include <cmsys/SystemTools.hxx> @@ -592,7 +593,8 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, for(std::vector<std::string>::const_iterator di = defs.begin(); di != defs.end(); ++di) { - fout <<" <Add option=\"-D" << di->c_str() << "\" />\n"; + cmXMLSafe safedef(di->c_str()); + fout <<" <Add option=\"-D" << safedef.str() << "\" />\n"; } } 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", diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index ce9deb1..183da4a 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -299,11 +299,7 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn) this->GetIgnoredPaths(ignored); this->FilterPaths(this->SearchPaths, ignored); - // Handle search root stuff. - this->RerootPaths(this->SearchPaths); - - // Add a trailing slash to all prefixes to aid the search process. - this->AddTrailingSlashes(this->SearchPaths); + this->ComputeFinalPaths(); return true; } diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index a05e337..b44864e 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -471,8 +471,13 @@ void cmFindCommon::AddPathInternal(std::string const& in_path, } //---------------------------------------------------------------------------- -void cmFindCommon::AddTrailingSlashes(std::vector<std::string>& paths) +void cmFindCommon::ComputeFinalPaths() { + std::vector<std::string>& paths = this->SearchPaths; + + // Expand list of paths inside all search roots. + this->RerootPaths(paths); + // Add a trailing slash to all paths to aid the search process. for(std::vector<std::string>::iterator i = paths.begin(); i != paths.end(); ++i) diff --git a/Source/cmFindCommon.h b/Source/cmFindCommon.h index 875c223..542805f 100644 --- a/Source/cmFindCommon.h +++ b/Source/cmFindCommon.h @@ -47,8 +47,8 @@ protected: void FilterPaths(std::vector<std::string>& paths, const std::set<std::string>& ignore); - /** Add trailing slashes to all search paths. */ - void AddTrailingSlashes(std::vector<std::string>& paths); + /** Compute final search path list (reroot + trailing slash). */ + void ComputeFinalPaths(); /** Compute the current default root path mode. */ void SelectDefaultRootPathMode(); diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 2e72b58..7d3f09b 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -1243,7 +1243,7 @@ void cmFindPackageCommand::ComputePrefixes() this->AddPrefixesCMakeSystemVariable(); this->AddPrefixesSystemRegistry(); this->AddPrefixesUserGuess(); - this->ComputeFinalPrefixes(); + this->ComputeFinalPaths(); } //---------------------------------------------------------------------------- @@ -1574,18 +1574,6 @@ void cmFindPackageCommand::AddPrefixesUserHints() } //---------------------------------------------------------------------------- -void cmFindPackageCommand::ComputeFinalPrefixes() -{ - std::vector<std::string>& prefixes = this->SearchPaths; - - // Construct the final set of prefixes. - this->RerootPaths(prefixes); - - // Add a trailing slash to all prefixes to aid the search process. - this->AddTrailingSlashes(prefixes); -} - -//---------------------------------------------------------------------------- bool cmFindPackageCommand::SearchDirectory(std::string const& dir) { assert(!dir.empty() && dir[dir.size()-1] == '/'); diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 2b2e1da..e736352 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -93,7 +93,6 @@ private: void AddPrefixesCMakeSystemVariable(); void AddPrefixesUserGuess(); void AddPrefixesUserHints(); - void ComputeFinalPrefixes(); void LoadPackageRegistryDir(std::string const& dir); void LoadPackageRegistryWinUser(); void LoadPackageRegistryWinSystem(); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 2eae9d0..da6a1c6 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1559,7 +1559,7 @@ cmLocalUnixMakefileGenerator3 // Create the scanner for this language cmDepends *scanner = 0; - if(lang == "C" || lang == "CXX" || lang == "RC") + if(lang == "C" || lang == "CXX" || lang == "RC" || lang == "ASM") { // TODO: Handle RC (resource files) dependencies correctly. scanner = new cmDependsC(this, targetDir, lang.c_str(), &validDeps); diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index f15993a..434e6af 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2011) SET(KWSYS_DATE_STAMP_MONTH 10) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 08) +SET(KWSYS_DATE_STAMP_DAY 11) diff --git a/Utilities/cmlibarchive/build/cmake/CheckFileOffsetBits.cmake b/Utilities/cmlibarchive/build/cmake/CheckFileOffsetBits.cmake index 5f4e053..472b80d 100644 --- a/Utilities/cmlibarchive/build/cmake/CheckFileOffsetBits.cmake +++ b/Utilities/cmlibarchive/build/cmake/CheckFileOffsetBits.cmake @@ -18,7 +18,7 @@ MACRO (CHECK_FILE_OFFSET_BITS) IF(NOT DEFINED _FILE_OFFSET_BITS) - MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files") + MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files") TRY_COMPILE(__WITHOUT_FILE_OFFSET_BITS_64 ${CMAKE_BINARY_DIR} ${libarchive_SOURCE_DIR}/build/cmake/CheckFileOffsetBits.c @@ -32,10 +32,10 @@ MACRO (CHECK_FILE_OFFSET_BITS) IF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64) SET(_FILE_OFFSET_BITS 64 CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files") - MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files - needed") + MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files - needed") ELSE(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64) SET(_FILE_OFFSET_BITS "" CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files") - MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files - not needed") + MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files - not needed") ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64) ENDIF(NOT DEFINED _FILE_OFFSET_BITS) |