summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.h
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-07-23 17:36:53 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-08-16 14:40:11 (GMT)
commit1690e451f7a640fbdd7bc693ea8010ebc52639bc (patch)
tree93b167a29787193276cb97146b889920ebc11fc0 /Source/cmGeneratorTarget.h
parent58d27dc6dbdc1cd2dcc537c95b2810528228d754 (diff)
downloadCMake-1690e451f7a640fbdd7bc693ea8010ebc52639bc.zip
CMake-1690e451f7a640fbdd7bc693ea8010ebc52639bc.tar.gz
CMake-1690e451f7a640fbdd7bc693ea8010ebc52639bc.tar.bz2
cmGeneratorTarget: support better errors when checking for C++20 modules
Some callers have their own error reporting mechanisms which give more context. Support handing off the error string for these use cases.
Diffstat (limited to 'Source/cmGeneratorTarget.h')
-rw-r--r--Source/cmGeneratorTarget.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index a32e742..844454f 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -1264,8 +1264,11 @@ public:
*
* This will inspect the target itself to see if C++20 module
* support is expected to work based on its sources.
+ *
+ * If `errorMessage` is given a non-`nullptr`, any error message will be
+ * stored in it, otherwise the error will be reported directly.
*/
- bool HaveCxx20ModuleSources() const;
+ bool HaveCxx20ModuleSources(std::string* errorMessage = nullptr) const;
enum class Cxx20SupportLevel
{