diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-19 23:00:05 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-31 15:59:47 (GMT) |
commit | b768d293c5c358dd734234cacab7c34e61c88c54 (patch) | |
tree | c509fe68fab1661f978acd7a07b0aa3132c0d20c /Source/cmCoreTryCompile.h | |
parent | 93993c7ad4f634451fb1c8f67f00d4d959d199ac (diff) | |
download | CMake-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.h | 14 |
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" |