forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CMake] Fix ordering problem when checking and setting
cuda
flag
In the ROOT build system, `CheckCompiler` is included before `RootBuildOptions`. The problem with this is that when building with `-Dall=ON`, the `cuda` flag is only set in `RootBuildOptions`, which is too late to find the CUDA compiler in `CheckCompiler`. This results in issues like root-project#15139: ``` CMake Error in roofit/batchcompute/CMakeLists.txt: Exporting the target "RooBatchCompute_CUDA" is not allowed since its linker language cannot be determined ``` This commit suggests a solution to this problem: just always enable the CUDA language in CMake if it is found, and only set the `cuda` flag with `-Dall=ON` if the CUDA language is enabled.
- Loading branch information
1 parent
b137048
commit e188c6b
Showing
2 changed files
with
11 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters