diff options
-rw-r--r-- | Modules/Platform/Linux-Intel-C.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/Linux-Intel-CXX.cmake | 1 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestReadCustomFilesCommand.cxx | 1 | ||||
-rw-r--r-- | Source/cmExtraKateGenerator.cxx | 18 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 91 | ||||
-rw-r--r-- | Source/cmNinjaTargetGenerator.h | 3 |
8 files changed, 64 insertions, 55 deletions
diff --git a/Modules/Platform/Linux-Intel-C.cmake b/Modules/Platform/Linux-Intel-C.cmake index d1694d6..449493a 100644 --- a/Modules/Platform/Linux-Intel-C.cmake +++ b/Modules/Platform/Linux-Intel-C.cmake @@ -1,2 +1,3 @@ include(Platform/Linux-Intel) __linux_compiler_intel(C) +set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ") diff --git a/Modules/Platform/Linux-Intel-CXX.cmake b/Modules/Platform/Linux-Intel-CXX.cmake index 66df3ac..142b6cf 100644 --- a/Modules/Platform/Linux-Intel-CXX.cmake +++ b/Modules/Platform/Linux-Intel-CXX.cmake @@ -1,2 +1,3 @@ include(Platform/Linux-Intel) __linux_compiler_intel(CXX) +set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ") diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c3a319a..a8f7aa4 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ set(CMake_VERSION_MAJOR 2) set(CMake_VERSION_MINOR 8) set(CMake_VERSION_PATCH 12) -set(CMake_VERSION_TWEAK 20140213) +set(CMake_VERSION_TWEAK 20140217) #set(CMake_VERSION_RC 1) diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.cxx b/Source/CTest/cmCTestReadCustomFilesCommand.cxx index 5db01f9..3b9d552 100644 --- a/Source/CTest/cmCTestReadCustomFilesCommand.cxx +++ b/Source/CTest/cmCTestReadCustomFilesCommand.cxx @@ -10,7 +10,6 @@ See the License for more information. ============================================================================*/ #include "cmCTestReadCustomFilesCommand.h" - #include "cmCTest.h" bool cmCTestReadCustomFilesCommand diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index d0f83b2..a0d37d4 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -98,12 +98,12 @@ cmExtraKateGenerator::WriteTargets(const cmMakefile* mf, "\t\t\"clean_target\": \"clean\",\n"; // build, clean and quick are for the build plugin kate <= 4.12: - fout << "\t\t\"build\": \"" << make << " -C " << homeOutputDir - << " " << makeArgs << " " << "all\",\n"; - fout << "\t\t\"clean\": \"" << make << " -C " << homeOutputDir - << " " << makeArgs << " " << "clean\",\n"; - fout << "\t\t\"quick\": \"" << make << " -C " << homeOutputDir - << " " << makeArgs << " " << "install\",\n"; + fout << "\t\t\"build\": \"" << make << " -C \\\"" << homeOutputDir + << "\\\" " << makeArgs << " " << "all\",\n"; + fout << "\t\t\"clean\": \"" << make << " -C \\\"" << homeOutputDir + << "\\\" " << makeArgs << " " << "clean\",\n"; + fout << "\t\t\"quick\": \"" << make << " -C \\\"" << homeOutputDir + << "\\\" " << makeArgs << " " << "install\",\n"; // this is for kate >= 4.13: fout << @@ -225,9 +225,9 @@ cmExtraKateGenerator::AppendTarget(cmGeneratedFileStream& fout, fout << "\t\t\t" << JsonSep << "{\"name\":\"" << target << "\", " "\"build_cmd\":\"" << make - << " -C " << (this->UseNinja ? homeOutputDir : path.c_str()) - << " " << makeArgs << " " - << target << "\"}\n"; + << " -C \\\"" << (this->UseNinja ? homeOutputDir : path.c_str()) + << "\\\" " << makeArgs << " " + << target << "\"}\n"; JsonSep = ','; } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index b8b7035..aca195c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1972,7 +1972,7 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags, flags += " "; flags += sysrootFlag; flags += " "; - flags += sysroot; + flags += this->Convert(sysroot, NONE, SHELL); } if (deploymentTargetFlag && *deploymentTargetFlag && diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 82f8d1b..900af8d 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -129,15 +129,6 @@ std::string cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile *source, const std::string& language) { - std::string flags; - - this->AddFeatureFlags(flags, language.c_str()); - - this->GetLocalGenerator()->AddArchitectureFlags(flags, - this->GeneratorTarget, - language.c_str(), - this->GetConfigName()); - // TODO: Fortran support. // // Fortran-specific flags computed for this target. // if(*l == "Fortran") @@ -145,42 +136,56 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile *source, // this->AddFortranFlags(flags); // } - // Add shared-library flags if needed. - this->LocalGenerator->AddCMP0018Flags(flags, this->Target, - language.c_str(), - this->GetConfigName()); - - this->LocalGenerator->AddVisibilityPresetFlags(flags, this->Target, - language.c_str()); - - // Add include directory flags. - const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"); - { - std::vector<std::string> includes; - this->LocalGenerator->GetIncludeDirectories(includes, - this->GeneratorTarget, - language.c_str(), config); - std::string includeFlags = - this->LocalGenerator->GetIncludeFlags(includes, this->GeneratorTarget, - language.c_str(), - language == "RC" ? true : false); // full include paths for RC - // needed by cmcldeps - if(cmGlobalNinjaGenerator::IsMinGW()) - cmSystemTools::ReplaceString(includeFlags, "\\", "/"); - - this->LocalGenerator->AppendFlags(flags, includeFlags.c_str()); - } - - // Append old-style preprocessor definition flags. - this->LocalGenerator->AppendFlags(flags, this->Makefile->GetDefineFlags()); + bool hasLangCached = this->LanguageFlags.count(language) != 0; + std::string& languageFlags = this->LanguageFlags[language]; + if(!hasLangCached) + { + this->AddFeatureFlags(languageFlags, language.c_str()); + + this->GetLocalGenerator()->AddArchitectureFlags(languageFlags, + this->GeneratorTarget, + language.c_str(), + this->GetConfigName()); + + // Add shared-library flags if needed. + this->LocalGenerator->AddCMP0018Flags(languageFlags, this->Target, + language, + this->GetConfigName()); + + this->LocalGenerator->AddVisibilityPresetFlags(languageFlags, this->Target, + language.c_str()); + + std::vector<std::string> includes; + this->LocalGenerator->GetIncludeDirectories(includes, + this->GeneratorTarget, + language.c_str(), + this->GetConfigName()); + // Add include directory flags. + std::string includeFlags = + this->LocalGenerator->GetIncludeFlags(includes, this->GeneratorTarget, + language.c_str(), + language == "RC" ? true : false); // full include paths for RC + // needed by cmcldeps + if(cmGlobalNinjaGenerator::IsMinGW()) + cmSystemTools::ReplaceString(includeFlags, "\\", "/"); + + this->LocalGenerator->AppendFlags(languageFlags, includeFlags.c_str()); + + // Append old-style preprocessor definition flags. + this->LocalGenerator->AppendFlags(languageFlags, + this->Makefile->GetDefineFlags()); + + // Add target-specific flags. + this->LocalGenerator->AddCompileOptions(languageFlags, this->Target, + language.c_str(), + this->GetConfigName()); + } - // Add target-specific flags. - this->LocalGenerator->AddCompileOptions(flags, this->Target, - language.c_str(), config); + std::string flags = languageFlags; - // Add source file specific flags. - this->LocalGenerator->AppendFlags(flags, - source->GetProperty("COMPILE_FLAGS")); + // Add source file specific flags. + this->LocalGenerator->AppendFlags(flags, + source->GetProperty("COMPILE_FLAGS")); // TODO: Handle Apple frameworks. diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h index 2ce1ed7..43f2279 100644 --- a/Source/cmNinjaTargetGenerator.h +++ b/Source/cmNinjaTargetGenerator.h @@ -154,6 +154,9 @@ private: /// List of object files for this target. cmNinjaDeps Objects; + typedef std::map<std::string, std::string> LanguageFlagMap; + LanguageFlagMap LanguageFlags; + // The windows module definition source file (.def), if any. std::string ModuleDefinitionFile; }; |