summaryrefslogtreecommitdiffstats
path: root/Source/cmTryCompileCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-08-01 17:53:49 (GMT)
committerBrad King <brad.king@kitware.com>2022-08-02 16:54:56 (GMT)
commit6b427d8da9b5f5db3753c499765b4b62f8e9020d (patch)
tree8c474dee4b3f9fafed9ecd813f3c69aa2603e2d5 /Source/cmTryCompileCommand.cxx
parent067ba3a2bd1ce168b2867de74d2ea6b944a936fc (diff)
downloadCMake-6b427d8da9b5f5db3753c499765b4b62f8e9020d.zip
CMake-6b427d8da9b5f5db3753c499765b4b62f8e9020d.tar.gz
CMake-6b427d8da9b5f5db3753c499765b4b62f8e9020d.tar.bz2
cmCoreTryCompile: Port to cmArgumentParser
Diffstat (limited to 'Source/cmTryCompileCommand.cxx')
-rw-r--r--Source/cmTryCompileCommand.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx
index 971dccb..b59c225 100644
--- a/Source/cmTryCompileCommand.cxx
+++ b/Source/cmTryCompileCommand.cxx
@@ -6,6 +6,7 @@
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
+#include "cmRange.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmStringAlgorithms.h"
@@ -50,7 +51,12 @@ bool cmTryCompileCommand(std::vector<std::string> const& args,
}
cmCoreTryCompile tc(&mf);
- tc.TryCompileCode(args, targetType);
+ cmCoreTryCompile::Arguments arguments =
+ tc.ParseArgs(cmMakeRange(args), false);
+ if (!arguments) {
+ return true;
+ }
+ tc.TryCompileCode(arguments, targetType);
// if They specified clean then we clean up what we can
if (tc.SrcFileSignature) {