FASTBuild: Explicitly disallow CUDA language since it is not implemented

Issue: #27318
This commit is contained in:
Eduard Voronkin
2025-10-22 10:28:40 -04:00
committed by Brad King
parent e00b84ec13
commit 7953214454
6 changed files with 22 additions and 0 deletions
+12
View File
@@ -297,6 +297,18 @@ cmGlobalFastbuildGenerator::NewFactory()
new cmGlobalGeneratorSimpleFactory<cmGlobalFastbuildGenerator>());
}
bool cmGlobalFastbuildGenerator::CheckLanguages(
std::vector<std::string> const& languages, cmMakefile* mf) const
{
if (std::find(languages.begin(), languages.end(), "CUDA") !=
languages.end()) {
mf->IssueMessage(MessageType::FATAL_ERROR,
"The FASTBuild generator does not support CUDA yet.");
return false;
}
return true;
}
void cmGlobalFastbuildGenerator::EnableLanguage(
std::vector<std::string> const& lang, cmMakefile* mf, bool optional)
{
+2
View File
@@ -355,6 +355,8 @@ public:
bool FindMakeProgram(cmMakefile* mf) override;
bool CheckLanguages(std::vector<std::string> const& languages,
cmMakefile* mf) const override;
void EnableLanguage(std::vector<std::string> const& lang, cmMakefile* mf,
bool optional) override;
+1
View File
@@ -0,0 +1 @@
1
+4
View File
@@ -0,0 +1,4 @@
^CMake Error at CUDA\.cmake:1 \(enable_language\):
The FASTBuild generator does not support CUDA yet\.
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)
+1
View File
@@ -0,0 +1 @@
enable_language(CUDA)
@@ -1,5 +1,7 @@
include(RunCMake)
run_cmake(CUDA)
# Unity of size 1 doesn't make sense and shouldn't be created.
run_cmake(Unity1)
run_cmake(Unity2)