[Cmake-commits] CMake branch, next, updated. v2.8.9-957-g3f86416
Brad King
brad.king at kitware.com
Tue Oct 2 08:13:54 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 3f86416b220f02071f93ce88b9725315f9959425 (commit)
via 1e47ccb5542954e1258affe36e0089f13618d23d (commit)
via e31df0393973e2995f4543890df31c2b752a8ee1 (commit)
via 8d674e78449d4bcde669ee5c4a6c0809c0ee51a5 (commit)
via dbd99d6fbbdf76181ac01ec9cc32fd3b67a4ce7c (commit)
from 85fc523fa85b7b2937467b0e92c965a1d7bdf6e9 (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=3f86416b220f02071f93ce88b9725315f9959425
commit 3f86416b220f02071f93ce88b9725315f9959425
Merge: 85fc523 1e47ccb
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 2 08:13:52 2012 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Oct 2 08:13:52 2012 -0400
Merge topic 'ninja-LIBPATH' into next
1e47ccb Ninja: add option to enforce usage of response files
e31df03 Ninja: move <OBJECTS> in front of the first linker option
8d674e7 Ninja: move -LIBPATH behind -link option
dbd99d6 Revert "Ninja: don't expand any rsp files"
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e47ccb5542954e1258affe36e0089f13618d23d
commit 1e47ccb5542954e1258affe36e0089f13618d23d
Author: Peter Kümmel <syntheticpp at gmx.net>
AuthorDate: Thu Sep 27 22:29:17 2012 +0200
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 1 17:06:38 2012 -0400
Ninja: add option to enforce usage of response files
If the cmake or environment variable CMAKE_NINJA_FORCE_RESPONSE_FILE
is set then a response file is used regardless the command line length.
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index d42d7f6..6c54ced 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -554,10 +554,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
int linkRuleLength = this->GetGlobalGenerator()->
GetRuleCmdLength(this->LanguageLinkerRule());
- int commandLineLengthLimit;
- if (this->GetMakefile()->IsDefinitionSet("CMAKE_FORCE_RESPONSE_FILE")) {
- commandLineLengthLimit = 1;
- } else {
+ int commandLineLengthLimit = 1;
+ const char* forceRspFile = "CMAKE_NINJA_FORCE_RESPONSE_FILE";
+ if (!this->GetMakefile()->IsDefinitionSet(forceRspFile) &&
+ cmSystemTools::GetEnv(forceRspFile) == 0) {
#ifdef _WIN32
commandLineLengthLimit = 8000 - linkRuleLength;
#elif defined(__linux) || defined(__APPLE__)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e31df0393973e2995f4543890df31c2b752a8ee1
commit e31df0393973e2995f4543890df31c2b752a8ee1
Author: Peter Kümmel <syntheticpp at gmx.net>
AuthorDate: Thu Sep 27 11:45:25 2012 +0200
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 1 17:06:38 2012 -0400
Ninja: move <OBJECTS> in front of the first linker option
In the response file also linker options could be passed,
and because <OBJECTS> is replaced by a response file, it
is necessary that no compiler option follows <OBJECTS>.
diff --git a/Modules/Platform/Windows-Intel.cmake b/Modules/Platform/Windows-Intel.cmake
index 3a30a2e..58da8c5 100644
--- a/Modules/Platform/Windows-Intel.cmake
+++ b/Modules/Platform/Windows-Intel.cmake
@@ -89,8 +89,9 @@ macro(__windows_compiler_intel lang)
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
"xilink ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_CREATE_SHARED_MODULE "${CMAKE_${lang}_CREATE_SHARED_LIBRARY}")
+ set(CMAKE_${lang}_COMPILER_LINKER_OPTION_FLAG_EXECUTABLE "/link")
set(CMAKE_${lang}_LINK_EXECUTABLE
- "<CMAKE_${lang}_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> -link /implib:<TARGET_IMPLIB> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
+ "<CMAKE_${lang}_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> <OBJECTS> /link /implib:<TARGET_IMPLIB> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000${_FLAGS_${lang}}")
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Od /RTC1")
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/DNDEBUG /MD /O1")
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index cc48cfe..1f28c50 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -228,9 +228,10 @@ macro(__windows_compiler_msvc lang)
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE
"<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <FLAGS> <DEFINES> /FoNUL /FAs /Fa<ASSEMBLY_SOURCE> /c <SOURCE>${CMAKE_END_TEMP_FILE}")
+ set(CMAKE_${lang}_COMPILER_LINKER_OPTION_FLAG_EXECUTABLE "/link")
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1)
set(CMAKE_${lang}_LINK_EXECUTABLE
- "${_CMAKE_VS_LINK_EXE}<CMAKE_${lang}_COMPILER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> /Fd<TARGET_PDB> -link /implib:<TARGET_IMPLIB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
+ "${_CMAKE_VS_LINK_EXE}<CMAKE_${lang}_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> /Fd<TARGET_PDB> <OBJECTS> /link /implib:<TARGET_IMPLIB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3 /Zm1000${_FLAGS_${lang}}")
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}")
diff --git a/Modules/Platform/Windows-df.cmake b/Modules/Platform/Windows-df.cmake
index 9a87be1..7e2ac9f 100644
--- a/Modules/Platform/Windows-df.cmake
+++ b/Modules/Platform/Windows-df.cmake
@@ -26,8 +26,9 @@ set(CMAKE_Fortran_COMPILE_OBJECT
set(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
+set(CMAKE_${lang}_COMPILER_LINKER_OPTION_FLAG_EXECUTABLE "/link")
set(CMAKE_Fortran_LINK_EXECUTABLE
- "<CMAKE_Fortran_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /exe:<TARGET> /link <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
+ "<CMAKE_Fortran_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> /exe:<TARGET> <OBJECTS> /link <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
set(CMAKE_CREATE_WIN32_EXE /winapp)
set(CMAKE_CREATE_CONSOLE_EXE )
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 9490658..d42d7f6 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -168,11 +168,13 @@ cmNinjaNormalTargetGenerator
std::string responseFlag;
if (!useResponseFile) {
vars.Objects = "$in";
- vars.LinkLibraries = "$LINK_LIBRARIES";
+ vars.LinkLibraries = "$LINK_PATH $LINK_LIBRARIES";
} else {
- // handle response file
- std::string cmakeLinkVar = std::string("CMAKE_") +
- this->TargetLinkLanguage + "_RESPONSE_FILE_LINK_FLAG";
+ std::string cmakeVarLang = "CMAKE_";
+ cmakeVarLang += this->TargetLinkLanguage;
+
+ // build response file name
+ std::string cmakeLinkVar = cmakeVarLang + "_RESPONSE_FILE_LINK_FLAG";
const char * flag = GetMakefile()->GetDefinition(cmakeLinkVar.c_str());
if(flag) {
responseFlag = flag;
@@ -181,7 +183,14 @@ cmNinjaNormalTargetGenerator
}
rspfile = "$RSP_FILE";
responseFlag += rspfile;
- rspcontent = "$in $LINK_LIBRARIES";
+
+ // build response file content
+ std::string linkOptionVar = cmakeVarLang;
+ linkOptionVar += "_COMPILER_LINKER_OPTION_FLAG_";
+ linkOptionVar += cmTarget::GetTargetTypeName(targetType);
+ const std::string linkOption =
+ GetMakefile()->GetSafeDefinition(linkOptionVar.c_str());
+ rspcontent = "$in " + linkOption + " $LINK_PATH $LINK_LIBRARIES";
vars.Objects = responseFlag.c_str();
vars.LinkLibraries = "";
}
@@ -430,7 +439,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
this->GetGeneratorTarget());
this->AddModuleDefinitionFlag(vars["LINK_FLAGS"]);
- vars["LINK_FLAGS"] += frameworkPath + linkPath;
+ vars["LINK_PATH"] = frameworkPath + linkPath;
// Compute architecture specific link flags. Yes, these go into a different
// variable for executables, probably due to a mistake made when duplicating
@@ -544,15 +553,20 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
int linkRuleLength = this->GetGlobalGenerator()->
GetRuleCmdLength(this->LanguageLinkerRule());
+
+ int commandLineLengthLimit;
+ if (this->GetMakefile()->IsDefinitionSet("CMAKE_FORCE_RESPONSE_FILE")) {
+ commandLineLengthLimit = 1;
+ } else {
#ifdef _WIN32
- int commandLineLengthLimit = 8000 - linkRuleLength;
+ commandLineLengthLimit = 8000 - linkRuleLength;
#elif defined(__linux) || defined(__APPLE__)
- // for instance ARG_MAX is 2096152 on Ubuntu or 262144 on Mac
- int commandLineLengthLimit = ((int)sysconf(_SC_ARG_MAX))
- - linkRuleLength - 1000;
+ // for instance ARG_MAX is 2096152 on Ubuntu or 262144 on Mac
+ commandLineLengthLimit = ((int)sysconf(_SC_ARG_MAX))-linkRuleLength-1000;
#else
- int commandLineLengthLimit = -1;
+ commandLineLengthLimit = -1;
#endif
+ }
const std::string rspfile = std::string
(cmake::GetCMakeFilesDirectoryPostSlash()) +
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d674e78449d4bcde669ee5c4a6c0809c0ee51a5
commit 8d674e78449d4bcde669ee5c4a6c0809c0ee51a5
Author: Peter Kümmel <syntheticpp at gmx.net>
AuthorDate: Wed Sep 26 14:38:15 2012 +0200
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 1 17:06:38 2012 -0400
Ninja: move -LIBPATH behind -link option
Don' pass linker option to the compile
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index d452658..2b36ad0 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -676,9 +676,13 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang,
// Static Library:
// Shared Module:
std::string linkLibs; // should be set
+ std::string frameworkPath;
+ std::string linkPath;
std::string flags; // should be set
std::string linkFlags; // should be set
- this->GetTargetFlags(linkLibs, flags, linkFlags, &target);
+ this->GetTargetFlags(linkLibs, frameworkPath, linkPath, flags, linkFlags,
+ &target);
+ linkLibs = frameworkPath + linkPath + linkLibs;
cmLocalGenerator::RuleVariables vars;
vars.Language = llang;
vars.Objects = objs.c_str();
@@ -1450,6 +1454,8 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
std::string& flags,
std::string& linkFlags,
+ std::string& frameworkPath,
+ std::string& linkPath,
cmGeneratorTarget* target)
{
std::string buildType =
@@ -1531,9 +1537,8 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
linkFlags += " ";
}
}
- cmOStringStream linklibsStr;
- this->OutputLinkLibraries(linklibsStr, *target, false);
- linkLibs = linklibsStr.str();
+ this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath,
+ *target, false);
}
break;
case cmTarget::EXECUTABLE:
@@ -1557,9 +1562,8 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
return;
}
this->AddLanguageFlags(flags, linkLanguage, buildType.c_str());
- cmOStringStream linklibs;
- this->OutputLinkLibraries(linklibs, *target, false);
- linkLibs = linklibs.str();
+ this->OutputLinkLibraries(linkLibs, frameworkPath, linkPath,
+ *target, false);
if(cmSystemTools::IsOn
(this->Makefile->GetDefinition("BUILD_SHARED_LIBS")))
{
@@ -1651,10 +1655,13 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib)
* targetLibrary should be a NULL pointer. For libraries, it should point
* to the name of the library. This will not link a library against itself.
*/
-void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
- cmGeneratorTarget& tgt,
+void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
+ std::string& frameworkPath,
+ std::string& linkPath,
+ cmGeneratorTarget &tgt,
bool relink)
{
+ cmOStringStream fout;
const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
cmComputeLinkInformation* pcli = tgt.GetLinkInformation(config);
if(!pcli)
@@ -1688,9 +1695,9 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
for(std::vector<std::string>::const_iterator fdi = fwDirs.begin();
fdi != fwDirs.end(); ++fdi)
{
- linkLibs += "-F";
- linkLibs += this->Convert(fdi->c_str(), NONE, SHELL, false);
- linkLibs += " ";
+ frameworkPath = " -F";
+ frameworkPath += this->Convert(fdi->c_str(), NONE, SHELL, false);
+ frameworkPath += " ";
}
// Append the library search path flags.
@@ -1699,10 +1706,10 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
libDir != libDirs.end(); ++libDir)
{
std::string libpath = this->ConvertToOutputForExisting(libDir->c_str());
- linkLibs += libPathFlag;
- linkLibs += libpath;
- linkLibs += libPathTerminator;
- linkLibs += " ";
+ linkPath += " " + libPathFlag;
+ linkPath += libpath;
+ linkPath += libPathTerminator;
+ linkPath += " ";
}
// Append the link items.
@@ -1774,6 +1781,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
{
fout << stdLibs << " ";
}
+
+ linkLibraries = fout.str();
}
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 0916d44..51d5924 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -335,11 +335,16 @@ public:
void GetTargetFlags(std::string& linkLibs,
std::string& flags,
std::string& linkFlags,
+ std::string& frameworkPath,
+ std::string& linkPath,
cmGeneratorTarget* target);
protected:
///! put all the libraries for a target on into the given stream
- virtual void OutputLinkLibraries(std::ostream&, cmGeneratorTarget&,
+ virtual void OutputLinkLibraries(std::string& linkLibraries,
+ std::string& frameworkPath,
+ std::string& linkPath,
+ cmGeneratorTarget &,
bool relink);
// Expand rule variables in CMake of the type found in language rules
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index ca5f26a..da66656 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -318,10 +318,13 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
this->LocalGenerator->SetLinkScriptShell(useLinkScript);
// Collect up flags to link in needed libraries.
- cmOStringStream linklibs;
- this->LocalGenerator->OutputLinkLibraries(linklibs, *this->GeneratorTarget,
+ std::string linkLibs;
+ std::string frameworkPath;
+ std::string linkPath;
+ this->LocalGenerator->OutputLinkLibraries(linkLibs, frameworkPath, linkPath,
+ *this->GeneratorTarget,
relink);
-
+ linkLibs = frameworkPath + linkPath + linkLibs;
// Construct object file lists that may be needed to expand the
// rule.
std::string buildObjs;
@@ -360,8 +363,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
vars.TargetVersionMajor = targetVersionMajor.c_str();
vars.TargetVersionMinor = targetVersionMinor.c_str();
- std::string linkString = linklibs.str();
- vars.LinkLibraries = linkString.c_str();
+ vars.LinkLibraries = linkLibs.c_str();
vars.Flags = flags.c_str();
vars.LinkFlags = linkFlags.c_str();
// Expand placeholders in the commands.
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 368d6fc..d39e7fa 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -542,11 +542,15 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
this->LocalGenerator->SetLinkScriptShell(useLinkScript);
// Collect up flags to link in needed libraries.
- cmOStringStream linklibs;
+ std::string linkLibs;
if(this->Target->GetType() != cmTarget::STATIC_LIBRARY)
{
+ std::string frameworkPath;
+ std::string linkPath;
this->LocalGenerator
- ->OutputLinkLibraries(linklibs, *this->GeneratorTarget, relink);
+ ->OutputLinkLibraries(linkLibs, frameworkPath, linkPath,
+ *this->GeneratorTarget, relink);
+ linkLibs = frameworkPath + linkPath + linkLibs;
}
// Construct object file lists that may be needed to expand the
@@ -587,8 +591,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
cmLocalGenerator::SHELL);
vars.ObjectDir = objdir.c_str();
vars.Target = targetOutPathReal.c_str();
- std::string linkString = linklibs.str();
- vars.LinkLibraries = linkString.c_str();
+ vars.LinkLibraries = linkLibs.c_str();
vars.ObjectsQuoted = buildObjs.c_str();
if (this->Target->HasSOName(this->ConfigName))
{
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index a13e1f0..9490658 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -420,12 +420,17 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
cmNinjaDeps explicitDeps = this->GetObjects();
cmNinjaDeps implicitDeps = this->ComputeLinkDeps();
+ std::string frameworkPath;
+ std::string linkPath;
this->GetLocalGenerator()->GetTargetFlags(vars["LINK_LIBRARIES"],
vars["FLAGS"],
vars["LINK_FLAGS"],
+ frameworkPath,
+ linkPath,
this->GetGeneratorTarget());
this->AddModuleDefinitionFlag(vars["LINK_FLAGS"]);
+ vars["LINK_FLAGS"] += frameworkPath + linkPath;
// Compute architecture specific link flags. Yes, these go into a different
// variable for executables, probably due to a mistake made when duplicating
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 745d513..0123427 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -628,10 +628,14 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
std::string linkLibs;
+ std::string frameworkPath;
+ std::string linkPath;
std::string flags;
std::string linkFlags;
cmGeneratorTarget gtgt(tgt);
- lg->GetTargetFlags(linkLibs, flags, linkFlags, >gt);
+ lg->GetTargetFlags(linkLibs, frameworkPath, linkPath, flags, linkFlags,
+ >gt);
+ linkLibs = frameworkPath + linkPath + linkLibs;
printf("%s\n", linkLibs.c_str() );
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbd99d6fbbdf76181ac01ec9cc32fd3b67a4ce7c
commit dbd99d6fbbdf76181ac01ec9cc32fd3b67a4ce7c
Author: Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Mon Oct 1 16:20:42 2012 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 1 17:06:37 2012 -0400
Revert "Ninja: don't expand any rsp files"
This reverts commit 5598d9b2a06d4ec788b5e058435bb3bba99fd517.
Since commit f1670ab1 (Ninja: don't confuse ninja's rsp files with
nmake's, 2012-09-26) Ninja generator response files are placed in
CMakeFiles/ so the previously existing check already avoids expanding
them.
diff --git a/Modules/Platform/Windows-Intel.cmake b/Modules/Platform/Windows-Intel.cmake
index 41e150a..3a30a2e 100644
--- a/Modules/Platform/Windows-Intel.cmake
+++ b/Modules/Platform/Windows-Intel.cmake
@@ -98,14 +98,11 @@ 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${NO_RSP_EXPAND} ${CMAKE_${lang}_LINK_EXECUTABLE}")
+ "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_${lang}_LINK_EXECUTABLE}")
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
- "<CMAKE_COMMAND> -E vs_link_dll${NO_RSP_EXPAND} ${CMAKE_${lang}_CREATE_SHARED_LIBRARY}")
+ "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_${lang}_CREATE_SHARED_LIBRARY}")
set(CMAKE_${lang}_CREATE_SHARED_MODULE
- "<CMAKE_COMMAND> -E vs_link_dll${NO_RSP_EXPAND} ${CMAKE_${lang}_CREATE_SHARED_MODULE}")
+ "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_${lang}_CREATE_SHARED_MODULE}")
endif()
endmacro()
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index da0dba9..cc48cfe 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -212,11 +212,8 @@ 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
- 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} ")
+ set(_CMAKE_VS_LINK_DLL "<CMAKE_COMMAND> -E vs_link_dll ")
+ set(_CMAKE_VS_LINK_EXE "<CMAKE_COMMAND> -E vs_link_exe ")
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 6cb7aa4..745d513 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1683,19 +1683,11 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
}
else if (args[1] == "vs_link_exe")
{
- return cmake::VisualStudioLink(args, 1, false);
+ return cmake::VisualStudioLink(args, 1);
}
else if (args[1] == "vs_link_dll")
{
- 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);
+ return cmake::VisualStudioLink(args, 2);
}
#ifdef CMAKE_BUILD_WITH_CMAKE
// Internal CMake color makefile support.
@@ -4021,8 +4013,7 @@ 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,
- bool no_rsp_expand)
+int cmake::VisualStudioLink(std::vector<std::string>& args, int type)
{
if(args.size() < 2)
{
@@ -4037,12 +4028,13 @@ 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 (there are two rsp files)
- if(!no_rsp_expand && (*i)[0] == '@' && i->find("@CMakeFiles") != 0 )
+ // check for nmake temporary files
+ if((*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 12e5edf..94c6f12 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -447,8 +447,7 @@ 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,
- bool no_rsp_expand);
+ static int VisualStudioLink(std::vector<std::string>& args, int type);
static int VisualStudioLinkIncremental(std::vector<std::string>& args,
int type,
bool verbose);
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list