summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.h
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-07-19 23:00:05 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-07-31 15:59:47 (GMT)
commitb768d293c5c358dd734234cacab7c34e61c88c54 (patch)
treec509fe68fab1661f978acd7a07b0aa3132c0d20c /Source/cmCoreTryCompile.h
parent93993c7ad4f634451fb1c8f67f00d4d959d199ac (diff)
downloadCMake-b768d293c5c358dd734234cacab7c34e61c88c54.zip
CMake-b768d293c5c358dd734234cacab7c34e61c88c54.tar.gz
CMake-b768d293c5c358dd734234cacab7c34e61c88c54.tar.bz2
cmCoreTryCompile: use the source type context for source files
Also add a test to `RunCMake/CXXModules` to test `try_compile` with C++ modules. Fixes: #25097
Diffstat (limited to 'Source/cmCoreTryCompile.h')
-rw-r--r--Source/cmCoreTryCompile.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmCoreTryCompile.h b/Source/cmCoreTryCompile.h
index 7d5a4f8..3217a1b 100644
--- a/Source/cmCoreTryCompile.h
+++ b/Source/cmCoreTryCompile.h
@@ -6,6 +6,7 @@
#include <map>
#include <string>
+#include <utility>
#include <vector>
#include <cm/optional>
@@ -71,12 +72,17 @@ public:
cm::optional<std::string> SourceDirectoryOrFile;
cm::optional<std::string> ProjectName;
cm::optional<std::string> TargetName;
- cm::optional<ArgumentParser::NonEmpty<std::vector<std::string>>> Sources;
- cm::optional<ArgumentParser::NonEmpty<std::vector<std::string>>>
+ cm::optional<ArgumentParser::NonEmpty<
+ std::vector<std::pair<std::string, SourceType>>>>
+ Sources;
+ cm::optional<ArgumentParser::NonEmpty<
+ std::vector<std::pair<std::string, SourceType>>>>
SourceFromContent;
- cm::optional<ArgumentParser::NonEmpty<std::vector<std::string>>>
+ cm::optional<ArgumentParser::NonEmpty<
+ std::vector<std::pair<std::string, SourceType>>>>
SourceFromVar;
- cm::optional<ArgumentParser::NonEmpty<std::vector<std::string>>>
+ cm::optional<ArgumentParser::NonEmpty<
+ std::vector<std::pair<std::string, SourceType>>>>
SourceFromFile;
ArgumentParser::MaybeEmpty<std::vector<std::string>> CMakeFlags{
1, "CMAKE_FLAGS"