diff options
author | Brad King <brad.king@kitware.com> | 2015-10-21 13:16:53 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-10-21 13:16:53 (GMT) |
commit | 8bcf2c81fc2a2bc458d54f9d5dbd40b49e5b993e (patch) | |
tree | 1d9d8e090df3173516903387ab7d6dba49fe4fd2 /Source | |
parent | 196de9d14d281103e0ee5c36e9dfd39504804aeb (diff) | |
parent | 123de1914c7e7d53d1e295c73994b2780041b8fc (diff) | |
download | CMake-8bcf2c81fc2a2bc458d54f9d5dbd40b49e5b993e.zip CMake-8bcf2c81fc2a2bc458d54f9d5dbd40b49e5b993e.tar.gz CMake-8bcf2c81fc2a2bc458d54f9d5dbd40b49e5b993e.tar.bz2 |
Merge topic 'ninja-refactor-deptype-selection'
123de191 Ninja: Refactor selection of 'deps = ' value for MS-compatible toolchains
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index cb1122c..b018005 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -148,17 +148,9 @@ void cmNinjaTargetGenerator::AddIncludeFlags(std::string& languageFlags, bool cmNinjaTargetGenerator::NeedDepTypeMSVC(const std::string& lang) const { - if (lang == "C" || lang == "CXX") - { - cmMakefile* mf = this->GetMakefile(); - return ( - strcmp(mf->GetSafeDefinition("CMAKE_C_COMPILER_ID"), "MSVC") == 0 || - strcmp(mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID"), "MSVC") == 0 || - strcmp(mf->GetSafeDefinition("CMAKE_C_SIMULATE_ID"), "MSVC") == 0 || - strcmp(mf->GetSafeDefinition("CMAKE_CXX_SIMULATE_ID"), "MSVC") == 0 - ); - } - return false; + return strcmp( + this->GetMakefile()->GetSafeDefinition("CMAKE_NINJA_DEPTYPE_" + lang), + "msvc") == 0; } // TODO: Refactor with @@ -359,7 +351,7 @@ cmNinjaTargetGenerator depfile = ""; flags += " /showIncludes"; } - else if (lang == "RC" && this->NeedDepTypeMSVC("C")) + else if (mf->IsOn("CMAKE_NINJA_CMCLDEPS_"+lang)) { // For the MS resource compiler we need cmcldeps, but skip dependencies // for source-file try_compile cases because they are always fresh. |