diff options
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 2 | ||||
-rw-r--r-- | Tests/VSResource/CMakeLists.txt | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index a464d6e..5fb4097 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -438,7 +438,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) : mf->GetSafeDefinition("CMAKE_CXX_COMPILER"); cldeps = "\""; cldeps += cmSystemTools::GetCMClDepsCommand(); - cldeps += "\" " + lang + " " + vars.Source + " \"$DEP_FILE\" $out \""; + cldeps += "\" " + lang + " " + vars.Source + " $DEP_FILE $out \""; cldeps += mf->GetSafeDefinition("CMAKE_CL_SHOWINCLUDES_PREFIX"); cldeps += "\" \"" + cl + "\" "; } diff --git a/Tests/VSResource/CMakeLists.txt b/Tests/VSResource/CMakeLists.txt index 718e624..fb47c7e 100644 --- a/Tests/VSResource/CMakeLists.txt +++ b/Tests/VSResource/CMakeLists.txt @@ -56,3 +56,10 @@ endif() set_property(TARGET VSResource PROPERTY VS_GLOBAL_CMakeTestVsGlobalVariable "test val") + +if(CMAKE_GENERATOR MATCHES "Ninja|Visual Studio") + cmake_policy(PUSH) + cmake_policy(SET CMP0037 OLD) + add_library("My ResourceLib" lib.cpp lib.rc) + cmake_policy(POP) +endif() |