|
|
@@ -187,6 +187,27 @@ bool cmVisualStudioGeneratorOptions::UsingSBCS() const
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+cmVisualStudioGeneratorOptions::CudaRuntime
|
|
|
+cmVisualStudioGeneratorOptions::GetCudaRuntime() const
|
|
|
+{
|
|
|
+ std::map<std::string, FlagValue>::const_iterator i =
|
|
|
+ this->FlagMap.find("CudaRuntime");
|
|
|
+ if (i != this->FlagMap.end() && i->second.size() == 1) {
|
|
|
+ std::string const& cudaRuntime = i->second[0];
|
|
|
+ if (cudaRuntime == "Static") {
|
|
|
+ return CudaRuntimeStatic;
|
|
|
+ }
|
|
|
+ if (cudaRuntime == "Shared") {
|
|
|
+ return CudaRuntimeShared;
|
|
|
+ }
|
|
|
+ if (cudaRuntime == "None") {
|
|
|
+ return CudaRuntimeNone;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // nvcc default is static
|
|
|
+ return CudaRuntimeStatic;
|
|
|
+}
|
|
|
+
|
|
|
void cmVisualStudioGeneratorOptions::Parse(const char* flags)
|
|
|
{
|
|
|
// Parse the input string as a windows command line since the string
|
|
|
@@ -220,6 +241,21 @@ void cmVisualStudioGeneratorOptions::ParseFinish()
|
|
|
rl += this->FortranRuntimeDLL ? "DLL" : "";
|
|
|
this->FlagMap["RuntimeLibrary"] = rl;
|
|
|
}
|
|
|
+
|
|
|
+ if (this->CurrentTool == CudaCompiler) {
|
|
|
+ std::map<std::string, FlagValue>::iterator i =
|
|
|
+ this->FlagMap.find("CudaRuntime");
|
|
|
+ if (i != this->FlagMap.end() && i->second.size() == 1) {
|
|
|
+ std::string& cudaRuntime = i->second[0];
|
|
|
+ if (cudaRuntime == "static") {
|
|
|
+ cudaRuntime = "Static";
|
|
|
+ } else if (cudaRuntime == "shared") {
|
|
|
+ cudaRuntime = "Shared";
|
|
|
+ } else if (cudaRuntime == "none") {
|
|
|
+ cudaRuntime = "None";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void cmVisualStudioGeneratorOptions::PrependInheritedString(
|