mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
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
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user