[Cmake-commits] CMake branch, next, updated. v3.3.2-3246-g527deef
Brad King
brad.king at kitware.com
Thu Sep 24 15:30:17 EDT 2015
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 527deefa0a4bede3d45edd867afe2a1a5eb8a7bd (commit)
via 710bde43aa5ed1ccfbcffa01d3d86a4eecbbe849 (commit)
from e165b1250c78a907fd1162aa68f334a96ddceb93 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=527deefa0a4bede3d45edd867afe2a1a5eb8a7bd
commit 527deefa0a4bede3d45edd867afe2a1a5eb8a7bd
Merge: e165b12 710bde4
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 24 15:30:16 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Sep 24 15:30:16 2015 -0400
Merge topic 'fix-try_compile-internal-argv' into next
710bde43 cmCoreTryCompile: Fix internal argument vector construction
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=710bde43aa5ed1ccfbcffa01d3d86a4eecbbe849
commit 710bde43aa5ed1ccfbcffa01d3d86a4eecbbe849
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 24 15:21:32 2015 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Sep 24 15:26:32 2015 -0400
cmCoreTryCompile: Fix internal argument vector construction
In TryCompileCode we construct an internal argv[] vector that needs to
have a fake argv[0] so our internal cmake command line looks like a real
command line. Fix construction of the fake argv[0] when try_compile is
called without the CMAKE_FLAGS argument. Otherwise the first internal
-DVAR=val argument that we use to pass information like
CMAKE_OSX_SYSROOT is ignored.
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index e489ad2..3d9c4bf 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -29,7 +29,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
const char* sourceDirectory = argv[2].c_str();
const char* projectName = 0;
std::string targetName;
- std::vector<std::string> cmakeFlags;
+ std::vector<std::string> cmakeFlags(1, "CMAKE_FLAGS"); // fake argv[0]
std::vector<std::string> compileDefs;
std::string outputVariable;
std::string copyFile;
@@ -53,10 +53,6 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
if(argv[i] == "CMAKE_FLAGS")
{
doing = DoingCMakeFlags;
- // CMAKE_FLAGS is the first argument because we need an argv[0] that
- // is not used, so it matches regular command line parsing which has
- // the program name as arg 0
- cmakeFlags.push_back(argv[i]);
}
else if(argv[i] == "COMPILE_DEFINITIONS")
{
-----------------------------------------------------------------------
Summary of changes:
Source/cmCoreTryCompile.cxx | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list