summaryrefslogtreecommitdiffstats
path: root/Source/cmTryCompileCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-12-11 15:11:36 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-12-11 15:11:36 (GMT)
commitdf32e28b1d4c9750eeeddf8035ecc3d543edd6cc (patch)
tree362980b7ba01e62a9f18a63296a2d6c6ce044343 /Source/cmTryCompileCommand.cxx
parentbaaf5eae7d4439d1a678869d0936b4007972ed9b (diff)
downloadCMake-df32e28b1d4c9750eeeddf8035ecc3d543edd6cc.zip
CMake-df32e28b1d4c9750eeeddf8035ecc3d543edd6cc.tar.gz
CMake-df32e28b1d4c9750eeeddf8035ecc3d543edd6cc.tar.bz2
BUG: need a dummy first argument to cmake
Diffstat (limited to 'Source/cmTryCompileCommand.cxx')
-rw-r--r--Source/cmTryCompileCommand.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx
index 53f633c..6bea62d 100644
--- a/Source/cmTryCompileCommand.cxx
+++ b/Source/cmTryCompileCommand.cxx
@@ -41,8 +41,9 @@ int cmTryCompileCommand::CoreTryCompileCode(
{
if (argv[i] == "CMAKE_FLAGS")
{
- extraArgs++;
- ++i;
+ // 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
for (; i < argv.size() && argv[i] != "COMPILE_DEFINITIONS" &&
argv[i] != "OUTPUT_VARIABLE";
++i)