summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cpack.cxx10
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx4
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx4
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx3
4 files changed, 20 insertions, 1 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index c083945..623cdcd 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -88,6 +88,15 @@ int cpackDefinitionArgument(const char* argument, const char* cValue,
return 1;
}
+static void cpackProgressCallback(const char* message, float progress,
+ void* clientdata)
+{
+ (void)progress;
+ (void)clientdata;
+
+ std::cout << "-- " << message << std::endl;
+}
+
// this is CPack.
int main(int argc, char const* const* argv)
{
@@ -201,6 +210,7 @@ int main(int argc, char const* const* argv)
cmake cminst(cmake::RoleScript);
cminst.SetHomeDirectory("");
cminst.SetHomeOutputDirectory("");
+ cminst.SetProgressCallback(cpackProgressCallback, nullptr);
cminst.GetCurrentSnapshot().SetDefaultDefinitions();
cmGlobalGenerator cmgg(&cminst);
cmMakefile globalMF(&cmgg, cminst.GetCurrentSnapshot());
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 08bb2ce..846b12c 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -84,6 +84,10 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule(
bool relink)
{
#ifdef CMAKE_BUILD_WITH_CMAKE
+ if (!this->GlobalGenerator->GetLanguageEnabled("CUDA")) {
+ return;
+ }
+
const std::string cuda_lang("CUDA");
cmGeneratorTarget::LinkClosure const* closure =
this->GeneratorTarget->GetLinkClosure(this->ConfigName);
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 6436969..8909e06 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -558,6 +558,10 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd()
void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
{
+ if (!this->GetGlobalGenerator()->GetLanguageEnabled("CUDA")) {
+ return;
+ }
+
cmGeneratorTarget& genTarget = *this->GetGeneratorTarget();
// determine if we need to do any device linking for this target
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 334c15b..d5e834b 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3331,7 +3331,8 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
std::vector<std::string> vsTargetVec;
this->AddLibraries(cli, libVec, vsTargetVec, config);
if (std::find(linkClosure->Languages.begin(), linkClosure->Languages.end(),
- "CUDA") != linkClosure->Languages.end()) {
+ "CUDA") != linkClosure->Languages.end() &&
+ this->CudaOptions[config] != nullptr) {
switch (this->CudaOptions[config]->GetCudaRuntime()) {
case cmVisualStudioGeneratorOptions::CudaRuntimeStatic:
libVec.push_back("cudadevrt.lib");