Merge topic 'fbuild_disable_cuda_support' into release-4.2

7953214454 FASTBuild: Explicitly disallow CUDA language since it is not implemented

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11334
This commit is contained in:
Brad King
2025-10-23 11:17:54 -04:00
committed by Kitware Robot
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)