summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.h
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-09-05 16:40:02 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-24 19:19:54 (GMT)
commitc63fe018353cf6afb30980c4cac7493be7cd0a82 (patch)
tree68d2daf0cd8ab91a9feaa49392607c6cfecd2ac4 /Source/cmMakefileLibraryTargetGenerator.h
parentc98ec731f90eb0180c89108b7d2e42263b66d1ed (diff)
downloadCMake-c63fe018353cf6afb30980c4cac7493be7cd0a82.zip
CMake-c63fe018353cf6afb30980c4cac7493be7cd0a82.tar.gz
CMake-c63fe018353cf6afb30980c4cac7493be7cd0a82.tar.bz2
CUDA: Clang separable compilation
For NVCC the compiler takes care of device linking when passed the "-dlink" flag. Clang doesn't support such magic and requires the buildsystem to do the work that NVCC does behind the scenes. The implementation is based on Bazel's device linking documentation: https://github.com/tensorflow/tensorflow/blob/7cabcdf073abad8c46e9dda62bb8fa4682d2061e/third_party/nccl/build_defs.bzl.tpl#L259 Closes: #20726
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.h')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.h b/Source/cmMakefileLibraryTargetGenerator.h
index 6a38e18..cc989e7 100644
--- a/Source/cmMakefileLibraryTargetGenerator.h
+++ b/Source/cmMakefileLibraryTargetGenerator.h
@@ -5,6 +5,7 @@
#include "cmConfigure.h" // IWYU pragma: keep
#include <string>
+#include <vector>
#include "cmMakefileTargetGenerator.h"
@@ -27,6 +28,10 @@ protected:
void WriteModuleLibraryRules(bool relink);
void WriteDeviceLibraryRules(const std::string& linkRule, bool relink);
+ void WriteNvidiaDeviceLibraryRules(const std::string& linkRuleVar,
+ bool relink,
+ std::vector<std::string>& commands,
+ const std::string& targetOutput);
void WriteLibraryRules(const std::string& linkRule,
const std::string& extraFlags, bool relink);
// MacOSX Framework support methods