[Cmake-commits] CMake branch, next, updated. v2.8.9-796-gab91bf8
Peter Kuemmel
syntheticpp at gmx.net
Thu Sep 27 06:56:06 EDT 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via ab91bf873b83a89d249326a68d3330002eba85ca (commit)
via dbd46e86273100879e95d2354e1a2fd5d154a9a5 (commit)
via 7d44df3e11237c1a06d489cf1b627e1e487f78cb (commit)
from ddd14f2c8852c38e5fd2681391d2b6b7d742c9a5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab91bf873b83a89d249326a68d3330002eba85ca
commit ab91bf873b83a89d249326a68d3330002eba85ca
Merge: ddd14f2 dbd46e8
Author: Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Thu Sep 27 06:56:04 2012 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Sep 27 06:56:04 2012 -0400
Merge topic 'ninja-link-rsp-expand' into next
dbd46e8 Don't pick this branch for master.
7d44df3 Revert "Ninja: don't confuse ninja's rsp files with nmake's"
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbd46e86273100879e95d2354e1a2fd5d154a9a5
commit dbd46e86273100879e95d2354e1a2fd5d154a9a5
Author: Peter Kümmel <syntheticpp at gmx.net>
AuthorDate: Thu Sep 27 12:53:49 2012 +0200
Commit: Peter Kümmel <syntheticpp at gmx.net>
CommitDate: Thu Sep 27 12:54:21 2012 +0200
Don't pick this branch for master.
Revert "Revert "Ninja: don't expand any rsp files""
This reverts commit 883881d228c5369831f5a430009cca492893ea55.
diff --git a/Modules/Platform/Windows-Intel.cmake b/Modules/Platform/Windows-Intel.cmake
index 3a30a2e..41e150a 100644
--- a/Modules/Platform/Windows-Intel.cmake
+++ b/Modules/Platform/Windows-Intel.cmake
@@ -98,11 +98,14 @@ macro(__windows_compiler_intel lang)
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/DNDEBUG /MD /Zi /O2")
if(_INTEL_COMPILER_SUPPORTS_MANIFEST)
+ if(CMAKE_GENERATOR MATCHES "Ninja")
+ set(NO_RSP_EXPAND _no_rsp_expand)
+ endif()
set(CMAKE_${lang}_LINK_EXECUTABLE
- "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_${lang}_LINK_EXECUTABLE}")
+ "<CMAKE_COMMAND> -E vs_link_exe${NO_RSP_EXPAND} ${CMAKE_${lang}_LINK_EXECUTABLE}")
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
- "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_${lang}_CREATE_SHARED_LIBRARY}")
+ "<CMAKE_COMMAND> -E vs_link_dll${NO_RSP_EXPAND} ${CMAKE_${lang}_CREATE_SHARED_LIBRARY}")
set(CMAKE_${lang}_CREATE_SHARED_MODULE
- "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_${lang}_CREATE_SHARED_MODULE}")
+ "<CMAKE_COMMAND> -E vs_link_dll${NO_RSP_EXPAND} ${CMAKE_${lang}_CREATE_SHARED_MODULE}")
endif()
endmacro()
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index cc48cfe..da0dba9 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -212,8 +212,11 @@ set (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZER
macro(__windows_compiler_msvc lang)
if(NOT "${CMAKE_${lang}_COMPILER_VERSION}" VERSION_LESS 14)
# for 2005 make sure the manifest is put in the dll with mt
- set(_CMAKE_VS_LINK_DLL "<CMAKE_COMMAND> -E vs_link_dll ")
- set(_CMAKE_VS_LINK_EXE "<CMAKE_COMMAND> -E vs_link_exe ")
+ if(CMAKE_GENERATOR MATCHES "Ninja")
+ set(NO_RSP_EXPAND _no_rsp_expand)
+ endif()
+ set(_CMAKE_VS_LINK_DLL "<CMAKE_COMMAND> -E vs_link_dll${NO_RSP_EXPAND} ")
+ set(_CMAKE_VS_LINK_EXE "<CMAKE_COMMAND> -E vs_link_exe${NO_RSP_EXPAND} ")
endif()
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
"${_CMAKE_VS_LINK_DLL}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /dll /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <LINK_FLAGS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 745d513..6cb7aa4 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1683,11 +1683,19 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
}
else if (args[1] == "vs_link_exe")
{
- return cmake::VisualStudioLink(args, 1);
+ return cmake::VisualStudioLink(args, 1, false);
}
else if (args[1] == "vs_link_dll")
{
- return cmake::VisualStudioLink(args, 2);
+ return cmake::VisualStudioLink(args, 2, false);
+ }
+ else if (args[1] == "vs_link_exe_no_rsp_expand")
+ {
+ return cmake::VisualStudioLink(args, 1, true);
+ }
+ else if (args[1] == "vs_link_dll_no_rsp_expand")
+ {
+ return cmake::VisualStudioLink(args, 2, true);
}
#ifdef CMAKE_BUILD_WITH_CMAKE
// Internal CMake color makefile support.
@@ -4013,7 +4021,8 @@ static bool cmakeCheckStampList(const char* stampList)
// For visual studio 2005 and newer manifest files need to be embeded into
// exe and dll's. This code does that in such a way that incremental linking
// still works.
-int cmake::VisualStudioLink(std::vector<std::string>& args, int type)
+int cmake::VisualStudioLink(std::vector<std::string>& args, int type,
+ bool no_rsp_expand)
{
if(args.size() < 2)
{
@@ -4028,13 +4037,12 @@ int cmake::VisualStudioLink(std::vector<std::string>& args, int type)
for(std::vector<std::string>::iterator i = args.begin();
i != args.end(); ++i)
{
- // check for nmake temporary files
- if((*i)[0] == '@' && i->find("@CMakeFiles") != 0 )
+ // check for nmake temporary files (there are two rsp files)
+ if(!no_rsp_expand && (*i)[0] == '@' && i->find("@CMakeFiles") != 0 )
{
std::ifstream fin(i->substr(1).c_str());
std::string line;
- while(cmSystemTools::GetLineFromStream(fin,
- line))
+ while(cmSystemTools::GetLineFromStream(fin, line))
{
cmSystemTools::ParseWindowsCommandLine(line.c_str(), expandedArgs);
}
diff --git a/Source/cmake.h b/Source/cmake.h
index 94c6f12..12e5edf 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -447,7 +447,8 @@ protected:
std::string const& link);
static int ExecuteEchoColor(std::vector<std::string>& args);
static int ExecuteLinkScript(std::vector<std::string>& args);
- static int VisualStudioLink(std::vector<std::string>& args, int type);
+ static int VisualStudioLink(std::vector<std::string>& args, int type,
+ bool no_rsp_expand);
static int VisualStudioLinkIncremental(std::vector<std::string>& args,
int type,
bool verbose);
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d44df3e11237c1a06d489cf1b627e1e487f78cb
commit 7d44df3e11237c1a06d489cf1b627e1e487f78cb
Author: Peter Kümmel <syntheticpp at gmx.net>
AuthorDate: Thu Sep 27 12:52:55 2012 +0200
Commit: Peter Kümmel <syntheticpp at gmx.net>
CommitDate: Thu Sep 27 12:52:55 2012 +0200
Revert "Ninja: don't confuse ninja's rsp files with nmake's"
This reverts commit 558881d6dfafe0ef98e3407d09a893c4773dffac.
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index d9ef3f9..3f3cfbb 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -106,7 +106,6 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
const cmNinjaDeps& implicitDeps,
const cmNinjaDeps& orderOnlyDeps,
const cmNinjaVars& variables,
- const std::string& rspfile,
int cmdLineLimit)
{
// Make sure there is a rule.
@@ -182,17 +181,12 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
// check if a response file rule should be used
std::string buildstr = build.str();
- std::string assignments = variable_assignments.str();
+ const std::string assignments = variable_assignments.str();
const std::string args = arguments.str();
if (cmdLineLimit > 0
&& args.size() + buildstr.size() + assignments.size()
- > (size_t) cmdLineLimit) {
+ > (size_t) cmdLineLimit)
buildstr += "_RSPFILE";
- variable_assignments.clear();
- cmGlobalNinjaGenerator::WriteVariable(variable_assignments,
- "RSP_FILE", rspfile, "", 1);
- assignments += variable_assignments.str();
- }
os << buildstr << args << assignments;
}
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 0df450e..b2fe243 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -84,7 +84,6 @@ public:
const cmNinjaDeps& implicitDeps,
const cmNinjaDeps& orderOnlyDeps,
const cmNinjaVars& variables,
- const std::string &rspfile = std::string(),
int cmdLineLimit = -1);
/**
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 3cd3e4d..6f991e2 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -179,7 +179,7 @@ cmNinjaNormalTargetGenerator
} else {
responseFlag = "@";
}
- rspfile = "$RSP_FILE";
+ rspfile = "$out.rsp";
responseFlag += rspfile;
rspcontent = "$in $LINK_LIBRARIES";
vars.Objects = responseFlag.c_str();
@@ -549,9 +549,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
int commandLineLengthLimit = -1;
#endif
- std::string rspfile = std::string("CMakeFiles/") +
- this->GetTarget()->GetName() + ".rsp";
-
// Write the build statement for this target.
cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),
comment.str(),
@@ -561,7 +558,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
implicitDeps,
emptyDeps,
vars,
- rspfile,
commandLineLengthLimit);
if (targetOutput != targetOutputReal) {
-----------------------------------------------------------------------
Summary of changes:
Modules/Platform/Windows-Intel.cmake | 9 ++++++---
Modules/Platform/Windows-MSVC.cmake | 7 +++++--
Source/cmGlobalNinjaGenerator.cxx | 10 ++--------
Source/cmGlobalNinjaGenerator.h | 1 -
Source/cmNinjaNormalTargetGenerator.cxx | 6 +-----
Source/cmake.cxx | 22 +++++++++++++++-------
Source/cmake.h | 3 ++-
7 files changed, 31 insertions(+), 27 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list