Imported Upstream version 3.15.5 upstream/3.15.5
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:14:12 +0000 (09:14 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:14:12 +0000 (09:14 +0900)
13 files changed:
Help/manual/cmake-generator-expressions.7.rst
Modules/CMakeDetermineCompilerId.cmake
Modules/InstallRequiredSystemLibraries.cmake
Source/CMakeVersion.cmake
Source/cmGlobalVisualStudioVersionedGenerator.cxx
Source/cmLocalVisualStudio7Generator.cxx
Source/cmTarget.cxx
Source/cmVisualStudio10ToolsetOptions.cxx
Templates/MSBuild/FlagTables/v142_CSharp.json [new file with mode: 0644]
Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc
Tests/RunCMake/FileAPI/check_index.pyc
Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake
Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake

index c0449fb..e970379 100644 (file)
@@ -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>
     )
index 02bc14b..d9002fb 100644 (file)
@@ -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()
index e3eeea4..0e1429d 100644 (file)
@@ -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"
index 6a64153..3bb8cc3 100644 (file)
@@ -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)
index 2ba1aff..1eca1f6 100644 (file)
@@ -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";
 
index 8154f3e..82a1170 100644 (file)
@@ -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)) {
index a67122c..98c66da 100644 (file)
@@ -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 = {
index a490e03..7fc33e6 100644 (file)
@@ -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 (file)
index 0000000..5989aea
--- /dev/null
@@ -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": []
+  }
+]
index 81963a7..1c49c51 100644 (file)
Binary files a/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc and b/Tests/RunCMake/CTestCommandLine/show_only_json_check.pyc differ
index 657d1b8..b1d5882 100644 (file)
Binary files a/Tests/RunCMake/FileAPI/check_index.pyc and b/Tests/RunCMake/FileAPI/check_index.pyc differ
index 88077b3..7d83a70 100644 (file)
@@ -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")
index 73ef5ca..be219f4 100644 (file)
@@ -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)