summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-25 14:12:42 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-09-25 14:12:42 (GMT)
commit02f95f9b7cc56aee8e4d73ea951bad34b622ec9b (patch)
tree8b081cc5bd688a613e341f6825c887ed6029d779
parent5a83303f50e7eadddae9bad0d13a7f751f733136 (diff)
parent710bde43aa5ed1ccfbcffa01d3d86a4eecbbe849 (diff)
downloadCMake-02f95f9b7cc56aee8e4d73ea951bad34b622ec9b.zip
CMake-02f95f9b7cc56aee8e4d73ea951bad34b622ec9b.tar.gz
CMake-02f95f9b7cc56aee8e4d73ea951bad34b622ec9b.tar.bz2
Merge topic 'fix-try_compile-internal-argv'
710bde43 cmCoreTryCompile: Fix internal argument vector construction
-rw-r--r--Source/cmCoreTryCompile.cxx6
1 files changed, 1 insertions, 5 deletions
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")
{