summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkLineDeviceComputer.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-21 15:51:55 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-21 15:52:06 (GMT)
commitbfe0ea2d98944e3668439b6fb2b05e82a5dca60e (patch)
treea00b27258b23a20c13a81d9525843af2d95faf0d /Source/cmLinkLineDeviceComputer.cxx
parent2ad09c5ddd133bc4e543b15eb5e75b6e0aaaf197 (diff)
parent2dfc52675c3ea732bd389852675e680e296415cb (diff)
downloadCMake-bfe0ea2d98944e3668439b6fb2b05e82a5dca60e.zip
CMake-bfe0ea2d98944e3668439b6fb2b05e82a5dca60e.tar.gz
CMake-bfe0ea2d98944e3668439b6fb2b05e82a5dca60e.tar.bz2
Merge topic 'cm-contains'
2dfc52675c cmAlgorithms: Add cmContains Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Sebastian Holtermann <sebholt@web.de> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Merge-request: !3700
Diffstat (limited to 'Source/cmLinkLineDeviceComputer.cxx')
-rw-r--r--Source/cmLinkLineDeviceComputer.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx
index 53b68eb..96af388 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -3,12 +3,11 @@
#include "cmLinkLineDeviceComputer.h"
-#include <algorithm>
#include <set>
#include <sstream>
#include <utility>
-#include <vector>
+#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
@@ -186,14 +185,10 @@ bool requireDeviceLinking(cmGeneratorTarget& target, cmLocalGenerator& lg,
// Determine if we have any dependencies that require
// us to do a device link step
- const std::string cuda_lang("CUDA");
cmGeneratorTarget::LinkClosure const* closure =
target.GetLinkClosure(config);
- bool closureHasCUDA =
- (std::find(closure->Languages.begin(), closure->Languages.end(),
- cuda_lang) != closure->Languages.end());
- if (closureHasCUDA) {
+ if (cmContains(closure->Languages, "CUDA")) {
cmComputeLinkInformation* pcli = target.GetLinkInformation(config);
if (pcli) {
cmLinkLineDeviceComputer deviceLinkComputer(