diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:14:12 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:14:12 +0900 |
commit | 8eb3b8def198a4eb4f0c63ebebdb5b1a59455f50 (patch) | |
tree | 1a9effcb231f47b41166ab0826096d2df736a334 | |
parent | 5aa55a660fd80edb95920f87ea5fe903d0907fd7 (diff) | |
download | cmake-8eb3b8def198a4eb4f0c63ebebdb5b1a59455f50.tar.gz cmake-8eb3b8def198a4eb4f0c63ebebdb5b1a59455f50.tar.bz2 cmake-8eb3b8def198a4eb4f0c63ebebdb5b1a59455f50.zip |
Imported Upstream version 3.15.5upstream/3.15.5
-rw-r--r-- | Help/manual/cmake-generator-expressions.7.rst | 2 | ||||
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 8 | ||||
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 7 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioVersionedGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 4 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 7 | ||||
-rw-r--r-- | Source/cmVisualStudio10ToolsetOptions.cxx | 3 | ||||
-rw-r--r-- | Templates/MSBuild/FlagTables/v142_CSharp.json | 574 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc | bin | 1829 -> 1829 bytes | |||
-rw-r--r-- | Tests/RunCMake/FileAPI/check_index.pyc | bin | 8146 -> 8146 bytes | |||
-rw-r--r-- | Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake | 10 | ||||
-rw-r--r-- | Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake | 2 |
13 files changed, 616 insertions, 7 deletions
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index c0449fb4a..e970379fa 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -195,7 +195,7 @@ Variable Queries .. code-block:: cmake target_compile_definitions(myapp - PRIVATE $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:Clang>>:COMPILING_CXX_WITH_CLANG> + PRIVATE $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:AppleClang,Clang>>:COMPILING_CXX_WITH_CLANG> $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:Intel>>:COMPILING_CXX_WITH_INTEL> $<$<AND:$<COMPILE_LANGUAGE:C>,$<C_COMPILER_ID:Clang>>:COMPILING_C_WITH_CLANG> ) diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 02bc14bd9..d9002fb0e 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -284,7 +284,13 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} set(id_cl icl.exe) endif() if(CMAKE_VS_PLATFORM_TOOLSET_VERSION) - set(id_toolset_version_props "<Import Project=\"${CMAKE_GENERATOR_INSTANCE}\\VC\\Auxiliary\\Build\\${CMAKE_VS_PLATFORM_TOOLSET_VERSION}\\Microsoft.VCToolsVersion.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}.props\" />") + if(CMAKE_VS_PLATFORM_TOOLSET_VERSION VERSION_GREATER_EQUAL "14.20") + set(id_sep ".") + else() + set(id_sep "\\") + endif() + set(id_toolset_version_props "<Import Project=\"${CMAKE_GENERATOR_INSTANCE}\\VC\\Auxiliary\\Build${id_sep}${CMAKE_VS_PLATFORM_TOOLSET_VERSION}\\Microsoft.VCToolsVersion.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}.props\" />") + unset(id_sep) endif() endif() else() diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index e3eeea46c..0e1429d74 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -258,6 +258,7 @@ if(MSVC) cmake_host_system_information(RESULT _vs_dir QUERY VS_${_vs_ver}_DIR) # undocumented query if(IS_DIRECTORY "${_vs_dir}") file(GLOB _vs_glob_redist_paths "${_vs_dir}/VC/Redist/MSVC/*") + list(REVERSE _vs_glob_redist_paths) list(APPEND _vs_redist_paths ${_vs_glob_redist_paths}) endif() unset(_vs_glob_redist_paths) @@ -287,6 +288,9 @@ 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() list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}.dll" "${MSVC_CRT_DIR}/concrt${v}.dll" @@ -305,6 +309,9 @@ 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() 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 6a6415382..3bb8cc37f 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 4) +set(CMake_VERSION_PATCH 5) #set(CMake_VERSION_RC 0) diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx index 2ba1affde..1eca1f600 100644 --- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx +++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx @@ -390,7 +390,9 @@ std::string cmGlobalVisualStudioVersionedGenerator::GetAuxiliaryToolset() const GetVSInstance(instancePath); std::stringstream path; path << instancePath; - path << "/VC/Auxiliary/Build/"; + path << "/VC/Auxiliary/Build"; + path << (cmSystemTools::VersionCompareGreaterEq(version, "14.20") ? '.' + : '/'); path << version; path << "/Microsoft.VCToolsVersion." << version << ".props"; diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 8154f3e1c..82a117060 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -102,6 +102,10 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets() force += "/"; force += l->GetName(); force += "_force"; + if (cmSourceFile* sf = this->Makefile->GetOrCreateSource( + force, true, cmSourceFileLocationKind::Known)) { + sf->SetProperty("SYMBOLIC", "1"); + } if (cmSourceFile* file = this->Makefile->AddCustomCommandToOutput( force.c_str(), no_depends, no_main_dependency, force_commands, " ", 0, true)) { diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index a67122c54..98c66da2c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -334,7 +334,6 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, InitProperty("VS_JUST_MY_CODE_DEBUGGING", nullptr); #ifdef __APPLE__ if (this->GetGlobalGenerator()->IsXcode()) { - InitProperty("XCODE_GENERATE_SCHEME", nullptr); InitProperty("XCODE_SCHEME_ADDRESS_SANITIZER", nullptr); InitProperty("XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN", nullptr); InitProperty("XCODE_SCHEME_THREAD_SANITIZER", nullptr); @@ -354,6 +353,12 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, #endif } + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY) { + if (this->GetGlobalGenerator()->IsXcode()) { + InitProperty("XCODE_GENERATE_SCHEME", nullptr); + } + } + // Setup per-configuration property default values. if (this->GetType() != cmStateEnums::UTILITY) { static const auto configProps = { diff --git a/Source/cmVisualStudio10ToolsetOptions.cxx b/Source/cmVisualStudio10ToolsetOptions.cxx index a490e03df..7fc33e63e 100644 --- a/Source/cmVisualStudio10ToolsetOptions.cxx +++ b/Source/cmVisualStudio10ToolsetOptions.cxx @@ -34,8 +34,7 @@ std::string cmVisualStudio10ToolsetOptions::GetCSharpFlagTableName( std::string const useToolset = this->GetToolsetName(name, toolset); if (useToolset == "v142") { - // FIXME: Add CSharp flag table for v142. - return "v141"; + return "v142"; } else if (useToolset == "v141") { return "v141"; } else if (useToolset == "v140") { diff --git a/Templates/MSBuild/FlagTables/v142_CSharp.json b/Templates/MSBuild/FlagTables/v142_CSharp.json new file mode 100644 index 000000000..5989aea1e --- /dev/null +++ b/Templates/MSBuild/FlagTables/v142_CSharp.json @@ -0,0 +1,574 @@ +[ + { + "name": "ProjectName", + "switch": "out:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "OutputType", + "switch": "target:exe", + "comment": "", + "value": "Exe", + "flags": [] + }, + { + "name": "OutputType", + "switch": "target:winexe", + "comment": "", + "value": "Winexe", + "flags": [] + }, + { + "name": "OutputType", + "switch": "target:library", + "comment": "", + "value": "Library", + "flags": [] + }, + { + "name": "OutputType", + "switch": "target:module", + "comment": "", + "value": "Module", + "flags": [] + }, + { + "name": "DocumentationFile", + "switch": "doc", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "Platform", + "switch": "platform:x86", + "comment": "", + "value": "x86", + "flags": [] + }, + { + "name": "Platform", + "switch": "platform:Itanium", + "comment": "", + "value": "Itanium", + "flags": [] + }, + { + "name": "Platform", + "switch": "platform:x64", + "comment": "", + "value": "x64", + "flags": [] + }, + { + "name": "Platform", + "switch": "platform:arm", + "comment": "", + "value": "arm", + "flags": [] + }, + { + "name": "Platform", + "switch": "platform:anycpu32bitpreferred", + "comment": "", + "value": "anycpu32bitpreferred", + "flags": [] + }, + { + "name": "Platform", + "switch": "platform:anycpu", + "comment": "", + "value": "anycpu", + "flags": [] + }, + { + "name": "References", + "switch": "reference:", + "comment": "mit alias", + "value": "", + "flags": [] + }, + { + "name": "References", + "switch": "reference:", + "comment": "dateiliste", + "value": "", + "flags": [] + }, + { + "name": "AddModules", + "switch": "addmodule:", + "comment": "", + "value": "", + "flags": [ + "SemicolonAppendable" + ] + }, + { + "name": "Win32Resource", + "switch": "win32res:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "ApplicationIcon", + "switch": "win32icon:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "ApplicationManifest", + "switch": "win32manifest:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "NoWin32Manifest", + "switch": "nowin32manifest", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "DefineDebug", + "switch": "debug", + "comment": "", + "value": "true", + "flags": [ + "Continue" + ] + }, + { + "name": "DebugSymbols", + "switch": "debug", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "DebugSymbols", + "switch": "debug-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "DebugSymbols", + "switch": "debug+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "DebugType", + "switch": "debug:none", + "comment": "", + "value": "none", + "flags": [] + }, + { + "name": "DebugType", + "switch": "debug:full", + "comment": "", + "value": "full", + "flags": [] + }, + { + "name": "DebugType", + "switch": "debug:pdbonly", + "comment": "", + "value": "pdbonly", + "flags": [] + }, + { + "name": "Optimize", + "switch": "optimize", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "Optimize", + "switch": "optimize-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "Optimize", + "switch": "optimize+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "TreatWarningsAsErrors", + "switch": "warnaserror", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "TreatWarningsAsErrors", + "switch": "warnaserror-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "TreatWarningsAsErrors", + "switch": "warnaserror+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "WarningsAsErrors", + "switch": "warnaserror", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "WarningsAsErrors", + "switch": "warnaserror-", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "WarningsAsErrors", + "switch": "warnaserror+", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "warn:0", + "comment": "", + "value": "0", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "warn:1", + "comment": "", + "value": "1", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "warn:2", + "comment": "", + "value": "2", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "warn:3", + "comment": "", + "value": "3", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "warn:4", + "comment": "", + "value": "4", + "flags": [] + }, + { + "name": "NoWarn", + "switch": "nowarn:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired", + "CommaAppendable" + ] + }, + { + "name": "CheckForOverflowUnderflow", + "switch": "checked", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "CheckForOverflowUnderflow", + "switch": "checked-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "CheckForOverflowUnderflow", + "switch": "checked+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "AllowUnsafeBlocks", + "switch": "unsafe", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "AllowUnsafeBlocks", + "switch": "unsafe-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "AllowUnsafeBlocks", + "switch": "unsafe+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "DefineConstants", + "switch": "define:", + "comment": "", + "value": "", + "flags": [ + "SemicolonAppendable", + "UserValue" + ] + }, + { + "name": "LangVersion", + "switch": "langversion:ISO-1", + "comment": "", + "value": "ISO-1", + "flags": [] + }, + { + "name": "LangVersion", + "switch": "langversion:ISO-2", + "comment": "", + "value": "ISO-2", + "flags": [] + }, + { + "name": "LangVersion", + "switch": "langversion:3", + "comment": "", + "value": "3", + "flags": [] + }, + { + "name": "LangVersion", + "switch": "langversion:4", + "comment": "", + "value": "4", + "flags": [] + }, + { + "name": "LangVersion", + "switch": "langversion:5", + "comment": "", + "value": "5", + "flags": [] + }, + { + "name": "LangVersion", + "switch": "langversion:6", + "comment": "", + "value": "6", + "flags": [] + }, + { + "name": "LangVersion", + "switch": "langversion:default", + "comment": "", + "value": "default", + "flags": [] + }, + { + "name": "DelaySign", + "switch": "delaysign", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "DelaySign", + "switch": "delaysign-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "DelaySign", + "switch": "delaysign+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "AssemblyOriginatorKeyFile", + "switch": "keyfile", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "KeyContainerName", + "switch": "keycontainer", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "NoLogo", + "switch": "nologo", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "NoConfig", + "switch": "noconfig", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "BaseAddress", + "switch": "baseaddress:", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "CodePage", + "switch": "codepage", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "Utf8Output", + "switch": "utf8output", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "MainEntryPoint", + "switch": "main:", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "GenerateFullPaths", + "switch": "fullpaths", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "FileAlignment", + "switch": "filealign", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "PdbFile", + "switch": "pdb:", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "NoStandardLib", + "switch": "nostdlib", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "NoStandardLib", + "switch": "nostdlib-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "NoStandardLib", + "switch": "nostdlib+", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "SubsystemVersion", + "switch": "subsystemversion", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "AdditionalLibPaths", + "switch": "lib:", + "comment": "", + "value": "", + "flags": [] + }, + { + "name": "ErrorReport", + "switch": "errorreport:none", + "comment": "Do Not Send Report", + "value": "none", + "flags": [] + }, + { + "name": "ErrorReport", + "switch": "errorreport:prompt", + "comment": "Prompt Immediately", + "value": "prompt", + "flags": [] + }, + { + "name": "ErrorReport", + "switch": "errorreport:queue", + "comment": "Queue For Next Login", + "value": "queue", + "flags": [] + }, + { + "name": "ErrorReport", + "switch": "errorreport:send", + "comment": "Send Automatically", + "value": "send", + "flags": [] + } +] diff --git a/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc b/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc Binary files differindex 81963a75a..1c49c51c0 100644 --- a/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc +++ b/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc diff --git a/Tests/RunCMake/FileAPI/check_index.pyc b/Tests/RunCMake/FileAPI/check_index.pyc Binary files differindex 657d1b8fd..b1d5882fa 100644 --- a/Tests/RunCMake/FileAPI/check_index.pyc +++ b/Tests/RunCMake/FileAPI/check_index.pyc diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake index 88077b3b5..7d83a7034 100644 --- a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake @@ -7,6 +7,13 @@ function(check_property property matcher) endif() endfunction() +function(expect_schema target) + set(schema "${RunCMake_TEST_BINARY_DIR}/XcodeSchemaProperty.xcodeproj/xcshareddata/xcschemes/${target}.xcscheme") + if(NOT EXISTS ${schema}) + message(SEND_ERROR "Missing schema for target ${target}") + endif() +endfunction() + function(expect_no_schema target) set(schema "${RunCMake_TEST_BINARY_DIR}/XcodeSchemaProperty.xcodeproj/xcshareddata/xcschemes/${target}.xcscheme") if(EXISTS ${schema}) @@ -40,3 +47,6 @@ check_property("ENVIRONMENT" [=[key="BAR"]=]) check_property("ENVIRONMENT" [=[value="bar"]=]) expect_no_schema("NoSchema") + +expect_schema("CustomTarget") +expect_schema("ALL_BUILD") diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake index 73ef5caaf..be219f411 100644 --- a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake @@ -38,3 +38,5 @@ create_scheme_for_property(ENVIRONMENT "FOO=foo;BAR=bar") add_executable(NoSchema main.cpp) set_target_properties(NoSchema PROPERTIES XCODE_GENERATE_SCHEME OFF) + +add_custom_target(CustomTarget) |