summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:14:16 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:14:16 +0900
commitc5223aaf98b2d10aee32aa614519ee7a23698998 (patch)
treeeecf071a613334f3cf49c9345393cbd500e999df
parentfa4077b016648a9fd90c99fdb782124a9097df71 (diff)
downloadcmake-c5223aaf98b2d10aee32aa614519ee7a23698998.tar.gz
cmake-c5223aaf98b2d10aee32aa614519ee7a23698998.tar.bz2
cmake-c5223aaf98b2d10aee32aa614519ee7a23698998.zip
Imported Upstream version 3.15.7upstream/3.15.7
-rw-r--r--Modules/CMakeASM_MASMInformation.cmake6
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake26
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmLinkLineDeviceComputer.cxx36
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx8
-rw-r--r--Tests/Cuda/CMakeLists.txt1
-rw-r--r--Tests/Cuda/SeparableCompCXXOnly/CMakeLists.txt3
-rw-r--r--Tests/Cuda/SeparableCompCXXOnly/main.cpp5
-rw-r--r--Tests/RunCMake/CTestCommandLine/show_only_json_check.pycbin1829 -> 1829 bytes
-rw-r--r--Tests/RunCMake/FileAPI/check_index.pycbin8146 -> 8146 bytes
10 files changed, 61 insertions, 26 deletions
diff --git a/Modules/CMakeASM_MASMInformation.cmake b/Modules/CMakeASM_MASMInformation.cmake
index a38c1140c..9f7e93412 100644
--- a/Modules/CMakeASM_MASMInformation.cmake
+++ b/Modules/CMakeASM_MASMInformation.cmake
@@ -10,5 +10,11 @@ set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> /c /Fo <OBJECT> <SOURCE>")
+# The ASM_MASM compiler id for this compiler is "MSVC", so fill out the runtime library table.
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded "")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL "")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug "")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL "")
+
include(CMakeASMInformation)
set(ASM_DIALECT)
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 0e1429d74..04687b9ea 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -288,9 +288,16 @@ if(MSVC)
"${MSVC_CRT_DIR}/msvcp${v}.dll"
)
if(NOT vs VERSION_LESS 14)
- if(EXISTS "${MSVC_CRT_DIR}/vcruntime${v}_1.dll")
- list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}_1.dll")
- endif()
+ foreach(crt
+ "${MSVC_CRT_DIR}/msvcp${v}_1.dll"
+ "${MSVC_CRT_DIR}/msvcp${v}_2.dll"
+ "${MSVC_CRT_DIR}/msvcp${v}_codecvt_ids.dll"
+ "${MSVC_CRT_DIR}/vcruntime${v}_1.dll"
+ )
+ if(EXISTS "${crt}")
+ list(APPEND __install__libs "${crt}")
+ endif()
+ endforeach()
list(APPEND __install__libs
"${MSVC_CRT_DIR}/vcruntime${v}.dll"
"${MSVC_CRT_DIR}/concrt${v}.dll"
@@ -309,9 +316,16 @@ if(MSVC)
"${MSVC_CRT_DIR}/msvcp${v}d.dll"
)
if(NOT vs VERSION_LESS 14)
- if(EXISTS "${MSVC_CRT_DIR}/vcruntime${v}_1d.dll")
- list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}_1d.dll")
- endif()
+ foreach(crt
+ "${MSVC_CRT_DIR}/msvcp${v}_1d.dll"
+ "${MSVC_CRT_DIR}/msvcp${v}_2d.dll"
+ "${MSVC_CRT_DIR}/msvcp${v}d_codecvt_ids.dll"
+ "${MSVC_CRT_DIR}/vcruntime${v}_1d.dll"
+ )
+ if(EXISTS "${crt}")
+ list(APPEND __install__libs "${crt}")
+ endif()
+ endforeach()
list(APPEND __install__libs
"${MSVC_CRT_DIR}/vcruntime${v}d.dll"
"${MSVC_CRT_DIR}/concrt${v}d.dll"
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index ba06c4f7e..c4c477929 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 15)
-set(CMake_VERSION_PATCH 6)
+set(CMake_VERSION_PATCH 7)
#set(CMake_VERSION_RC 0)
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx
index 8d2add635..2cb2fd635 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -163,33 +163,33 @@ bool requireDeviceLinking(cmGeneratorTarget& target, cmLocalGenerator& lg,
return cmSystemTools::IsOn(resolveDeviceSymbols);
}
- if (const char* separableCompilation =
- target.GetProperty("CUDA_SEPARABLE_COMPILATION")) {
- if (cmSystemTools::IsOn(separableCompilation)) {
- bool doDeviceLinking = false;
- switch (target.GetType()) {
- case cmStateEnums::SHARED_LIBRARY:
- case cmStateEnums::MODULE_LIBRARY:
- case cmStateEnums::EXECUTABLE:
- doDeviceLinking = true;
- break;
- default:
- break;
- }
- return doDeviceLinking;
- }
- }
-
// 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 (const char* separableCompilation =
+ target.GetProperty("CUDA_SEPARABLE_COMPILATION")) {
+ if (cmSystemTools::IsOn(separableCompilation)) {
+ bool doDeviceLinking = false;
+ switch (target.GetType()) {
+ case cmStateEnums::SHARED_LIBRARY:
+ case cmStateEnums::MODULE_LIBRARY:
+ case cmStateEnums::EXECUTABLE:
+ doDeviceLinking = true;
+ break;
+ default:
+ break;
+ }
+ return doDeviceLinking;
+ }
+ }
+
cmComputeLinkInformation* pcli = target.GetLinkInformation(config);
if (pcli) {
cmLinkLineDeviceComputer deviceLinkComputer(
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 7a901763e..fa102f882 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1404,6 +1404,7 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
std::string comment = lg->ConstructComment(ccg);
comment = cmVS10EscapeComment(comment);
std::string script = lg->ConstructScript(ccg);
+ bool symbolic = false;
// input files for custom command
std::stringstream additional_inputs;
{
@@ -1430,6 +1431,12 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
ConvertToWindowsSlash(dep);
additional_inputs << sep << dep;
sep = ";";
+ if (!symbolic) {
+ if (cmSourceFile* sf = this->Makefile->GetSource(
+ dep, cmSourceFileLocationKind::Known)) {
+ symbolic = sf->GetPropertyAsBool("SYMBOLIC");
+ }
+ }
}
}
if (this->ProjectType != csproj) {
@@ -1438,7 +1445,6 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
}
// output files for custom command
std::stringstream outputs;
- bool symbolic = false;
{
const char* sep = "";
for (std::string const& o : ccg.GetOutputs()) {
diff --git a/Tests/Cuda/CMakeLists.txt b/Tests/Cuda/CMakeLists.txt
index a30071fd3..44c60052f 100644
--- a/Tests/Cuda/CMakeLists.txt
+++ b/Tests/Cuda/CMakeLists.txt
@@ -4,6 +4,7 @@ ADD_TEST_MACRO(Cuda.ConsumeCompileFeatures CudaConsumeCompileFeatures)
ADD_TEST_MACRO(Cuda.ObjectLibrary CudaObjectLibrary)
ADD_TEST_MACRO(Cuda.MixedStandardLevels MixedStandardLevels)
ADD_TEST_MACRO(Cuda.NotEnabled CudaNotEnabled)
+ADD_TEST_MACRO(Cuda.SeparableCompCXXOnly SeparableCompCXXOnly)
ADD_TEST_MACRO(Cuda.ToolkitInclude CudaToolkitInclude)
ADD_TEST_MACRO(Cuda.ProperDeviceLibraries ProperDeviceLibraries)
ADD_TEST_MACRO(Cuda.ProperLinkFlags ProperLinkFlags)
diff --git a/Tests/Cuda/SeparableCompCXXOnly/CMakeLists.txt b/Tests/Cuda/SeparableCompCXXOnly/CMakeLists.txt
new file mode 100644
index 000000000..97670e392
--- /dev/null
+++ b/Tests/Cuda/SeparableCompCXXOnly/CMakeLists.txt
@@ -0,0 +1,3 @@
+project(SeparableCompCXXOnly LANGUAGES CXX CUDA)
+set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)
+add_executable(SeparableCompCXXOnly main.cpp)
diff --git a/Tests/Cuda/SeparableCompCXXOnly/main.cpp b/Tests/Cuda/SeparableCompCXXOnly/main.cpp
new file mode 100644
index 000000000..813524614
--- /dev/null
+++ b/Tests/Cuda/SeparableCompCXXOnly/main.cpp
@@ -0,0 +1,5 @@
+
+int main(int, char const* [])
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc b/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc
index 4983bf4cc..3b6cb1db9 100644
--- a/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc
+++ b/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc
Binary files differ
diff --git a/Tests/RunCMake/FileAPI/check_index.pyc b/Tests/RunCMake/FileAPI/check_index.pyc
index 2ab78376a..1abd6c2a9 100644
--- a/Tests/RunCMake/FileAPI/check_index.pyc
+++ b/Tests/RunCMake/FileAPI/check_index.pyc
Binary files differ