From 13433b135759edaa65bd1cb31c3b124c244866d7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 7 Mar 2017 15:44:43 -0500 Subject: VS: Record in global generator whether CUDA is enabled --- Source/cmGlobalVisualStudio10Generator.cxx | 4 ++++ Source/cmGlobalVisualStudio10Generator.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 2cea693..27bd352 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -103,6 +103,7 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0\\Setup\\VC;" "ProductDir", vc10Express, cmSystemTools::KeyWOW64_32); + this->CudaEnabled = false; this->SystemIsWindowsCE = false; this->SystemIsWindowsPhone = false; this->SystemIsWindowsStore = false; @@ -459,6 +460,9 @@ void cmGlobalVisualStudio10Generator::EnableLanguage( if (*it == "ASM_NASM") { this->NasmEnabled = true; } + if (*it == "CUDA") { + this->CudaEnabled = true; + } } this->AddPlatformDefinitions(mf); cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional); diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 581ad11..fdeb381 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -42,6 +42,8 @@ public: cmMakefile*, bool optional); virtual void WriteSLNHeader(std::ostream& fout); + bool IsCudaEnabled() const { return this->CudaEnabled; } + /** Generating for Nsight Tegra VS plugin? */ bool IsNsightTegra() const; std::string GetNsightTegraVersion() const; @@ -168,6 +170,8 @@ private: std::string VCTargetsPath; bool FindVCTargetsPath(cmMakefile* mf); + bool CudaEnabled; + // We do not use the reload macros for VS >= 10. virtual std::string GetUserMacrosDirectory() { return ""; } }; -- cgit v0.12