Merge topic 'ninja-no-rsp-for-rc'
15b3f6f0
ninja, rc: ignore CMAKE_NINJA_FORCE_RESPONSE_FILE for RC files
This commit is contained in:
commit
1b021a64f8
|
@ -321,7 +321,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
|
||||||
std::string rspcontent;
|
std::string rspcontent;
|
||||||
std::string responseFlag;
|
std::string responseFlag;
|
||||||
|
|
||||||
if (this->ForceResponseFile()) {
|
if (lang != "RC" && this->ForceResponseFile()) {
|
||||||
rspfile = "$RSP_FILE";
|
rspfile = "$RSP_FILE";
|
||||||
responseFlag = "@" + rspfile;
|
responseFlag = "@" + rspfile;
|
||||||
rspcontent = " $DEFINES $INCLUDES $FLAGS";
|
rspcontent = " $DEFINES $INCLUDES $FLAGS";
|
||||||
|
@ -603,7 +603,9 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
|
||||||
|
|
||||||
this->SetMsvcTargetPdbVariable(vars);
|
this->SetMsvcTargetPdbVariable(vars);
|
||||||
|
|
||||||
int const commandLineLengthLimit = this->ForceResponseFile() ? -1 : 0;
|
bool const isRC = (language == "RC");
|
||||||
|
int const commandLineLengthLimit =
|
||||||
|
((!isRC && this->ForceResponseFile())) ? -1 : 0;
|
||||||
std::string const rspfile = objectFileName + ".rsp";
|
std::string const rspfile = objectFileName + ".rsp";
|
||||||
|
|
||||||
this->GetGlobalGenerator()->WriteBuild(
|
this->GetGlobalGenerator()->WriteBuild(
|
||||||
|
|
|
@ -274,6 +274,9 @@ if(BUILD_TESTING)
|
||||||
endif()
|
endif()
|
||||||
if(TEST_RESOURCES)
|
if(TEST_RESOURCES)
|
||||||
ADD_TEST_MACRO(VSResource VSResource)
|
ADD_TEST_MACRO(VSResource VSResource)
|
||||||
|
if (CMAKE_GENERATOR MATCHES "Ninja")
|
||||||
|
add_test_macro(VSResourceNinjaForceRSP VSResourceNinjaForceRSP)
|
||||||
|
endif ()
|
||||||
endif()
|
endif()
|
||||||
ADD_TEST_MACRO(MSManifest MSManifest)
|
ADD_TEST_MACRO(MSManifest MSManifest)
|
||||||
ADD_TEST_MACRO(Simple Simple)
|
ADD_TEST_MACRO(Simple Simple)
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
cmake_minimum_required(VERSION 2.8.4)
|
||||||
|
project(VSResourceNinjaForceRSP)
|
||||||
|
|
||||||
|
set(CMAKE_NINJA_FORCE_RESPONSE_FILE TRUE)
|
||||||
|
|
||||||
|
add_library(ResourceLib lib.cpp test.rc)
|
||||||
|
add_executable(VSResourceNinjaForceRSP main.cpp test.rc)
|
|
@ -0,0 +1,4 @@
|
||||||
|
int lib()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
STRINGTABLE
|
||||||
|
BEGIN
|
||||||
|
1234 "5"
|
||||||
|
END
|
Loading…
Reference in New Issue