diff options
21 files changed, 705 insertions, 28 deletions
diff --git a/Help/prop_tgt/UNITY_BUILD.rst b/Help/prop_tgt/UNITY_BUILD.rst index beac5d4..2faad92 100644 --- a/Help/prop_tgt/UNITY_BUILD.rst +++ b/Help/prop_tgt/UNITY_BUILD.rst @@ -5,27 +5,33 @@ Should the target source files be processed into batches for faster compilation. This feature is known as "Unity build", or "Jumbo build". -The `C` and `CXX` source files are grouped separately. +The ``C`` and ``CXX`` source files are grouped separately. This property is initialized by the value of the :variable:`CMAKE_UNITY_BUILD` variable if it is set when a target is created. -.. note :: +.. note:: - It's not recommended to directly set :prop_tgt:`UNITY_BUILD` - to `ON`, but to instead set :variable:`CMAKE_UNITY_BUILD` from - the command line. However, it IS recommended to set - :prop_tgt:`UNITY_BUILD` to `OFF` if you need to ensure that a - target doesn't get a unity build. + It's not recommended to directly set :prop_tgt:`UNITY_BUILD` + to ``ON``, but to instead set :variable:`CMAKE_UNITY_BUILD` from + the command line. However, it IS recommended to set + :prop_tgt:`UNITY_BUILD` to ``OFF`` if you need to ensure that a + target doesn't get a unity build. The batch size can be specified by setting :prop_tgt:`UNITY_BUILD_BATCH_SIZE`. The batching of source files is done by adding new sources files -wich will `#include` the source files, and exclude them from -building by setting :prop_sf:`HEADER_FILE_ONLY` to `ON`. +which will ``#include`` the source files, and exclude them from +building by setting :prop_sf:`HEADER_FILE_ONLY` to ``ON``. +.. note:: + + Marking the original sources with :prop_sf:`HEADER_FILE_ONLY` + is considered an implementation detail that may change in the + future because it does not work well in combination with + the :variable:`CMAKE_EXPORT_COMPILE_COMMANDS` variable. ODR (One definition rule) errors ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -45,11 +51,11 @@ The source files that have :prop_sf:`COMPILE_OPTIONS`, With the :prop_tgt:`UNITY_BUILD_CODE_BEFORE_INCLUDE` and :prop_tgt:`UNITY_BUILD_CODE_AFTER_INCLUDE` one can specify code to be injected in the unity source file before and after every -`#include` statement. +``#include`` statement. -.. note :: +.. note:: - The order of source files defined in the `CMakeLists.txt` will - be preserved into the generated unity source files. This can - be used to manually enforce a specific grouping based on the - :prop_tgt:`UNITY_BUILD_BATCH_SIZE`. + The order of source files defined in the ``CMakeLists.txt`` will + be preserved into the generated unity source files. This can + be used to manually enforce a specific grouping based on the + :prop_tgt:`UNITY_BUILD_BATCH_SIZE` target property. diff --git a/Help/release/3.16.rst b/Help/release/3.16.rst index a14effe..7992f2d 100644 --- a/Help/release/3.16.rst +++ b/Help/release/3.16.rst @@ -115,6 +115,10 @@ Variables specify the resource encoding for the the :generator:`Eclipse CDT4` extra generator. +* The :variable:`CMAKE_UNITY_BUILD` variable was added to initialize the + :prop_tgt:`UNITY_BUILD` target property to tell generators to batch + include source files for faster compilation times. + Properties ---------- diff --git a/Help/variable/CMAKE_EXPORT_COMPILE_COMMANDS.rst b/Help/variable/CMAKE_EXPORT_COMPILE_COMMANDS.rst index 8776279..4548abc 100644 --- a/Help/variable/CMAKE_EXPORT_COMPILE_COMMANDS.rst +++ b/Help/variable/CMAKE_EXPORT_COMPILE_COMMANDS.rst @@ -28,3 +28,7 @@ form. The format of the JSON file looks like: .. note:: This option is implemented only by :ref:`Makefile Generators` and the :generator:`Ninja`. It is ignored on other generators. + + This option currently does not work well in combination with + the :prop_tgt:`UNITY_BUILD` target property or the + :variable:`CMAKE_UNITY_BUILD` variable. diff --git a/Help/variable/CMAKE_UNITY_BUILD.rst b/Help/variable/CMAKE_UNITY_BUILD.rst index 3096954..bbcfd68 100644 --- a/Help/variable/CMAKE_UNITY_BUILD.rst +++ b/Help/variable/CMAKE_UNITY_BUILD.rst @@ -1,6 +1,12 @@ CMAKE_UNITY_BUILD ----------------- -Default value for :prop_tgt:`UNITY_BUILD` of targets. +Initializes the :prop_tgt:`UNITY_BUILD` target property on targets +as they are created. Set to ``ON`` to batch compilation of multiple +sources within each target. This feature is known as "Unity build", +or "Jumbo build". By default this variable is not set and so does +not enable unity builds on targets. -By default ``CMAKE_UNITY_BUILD`` is ``OFF``. +.. note:: + This option currently does not work well in combination with + the :variable:`CMAKE_EXPORT_COMPILE_COMMANDS` variable. diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in index ef65021..efb8abf 100644 --- a/Modules/CMakeCXXCompiler.cmake.in +++ b/Modules/CMakeCXXCompiler.cmake.in @@ -45,7 +45,7 @@ set(CMAKE_CXX_COMPILER_ID_RUN 1) set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP) set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) -foreach (lang OBJC OBJCXX) +foreach (lang C OBJC OBJCXX) if (CMAKE_${lang}_COMPILER_ID_RUN) foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 34639b4..a743ce7 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -27,10 +27,20 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@ @CMAKE_CXX_COMPILER_ID_ERROR_FOR_TEST@ -#if defined(_MSC_VER) && defined(_MSVC_LANG) -#define CXX_STD _MSVC_LANG +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L +# if defined(__INTEL_CXX11_MODE__) +# if defined(__cpp_aggregate_nsdmi) +# define CXX_STD 201402L +# else +# define CXX_STD 201103L +# endif +# else +# define CXX_STD 199711L +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# define CXX_STD _MSVC_LANG #else -#define CXX_STD __cplusplus +# define CXX_STD __cplusplus #endif const char* info_language_dialect_default = "INFO" ":" "dialect_default[" diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in index 95465ce..64a00b3 100644 --- a/Modules/CMakePlatformId.h.in +++ b/Modules/CMakePlatformId.h.in @@ -177,6 +177,9 @@ # elif defined(__ICCV850__) # define ARCHITECTURE_ID "V850" +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + # else /* unknown architecture */ # define ARCHITECTURE_ID "" # endif diff --git a/Modules/Compiler/IAR-ASM.cmake b/Modules/Compiler/IAR-ASM.cmake index 413d9e2..936d4ae 100644 --- a/Modules/Compiler/IAR-ASM.cmake +++ b/Modules/Compiler/IAR-ASM.cmake @@ -40,7 +40,12 @@ elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430") elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>") __compiler_iar_xlink(ASM) - set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS r85;asm;msa) + set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s85;asm;msa) + +elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051") + set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>") + __compiler_iar_xlink(ASM) + set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s51;asm;msa) else() message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID not detected. This should be automatic.") diff --git a/Modules/Compiler/IAR-C.cmake b/Modules/Compiler/IAR-C.cmake index 9ad1ba0..e27fdfc 100644 --- a/Modules/Compiler/IAR-C.cmake +++ b/Modules/Compiler/IAR-C.cmake @@ -65,6 +65,11 @@ elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") __compiler_check_default_language_standard(C 1.10 90 4.10 99) set(CMAKE_C_OUTPUT_EXTENSION ".r85") +elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051") + __compiler_iar_xlink(C) + __compiler_check_default_language_standard(C 6.10 90 8.10 99) + set(CMAKE_C_OUTPUT_EXTENSION ".r51") + else() message(FATAL_ERROR "CMAKE_C_COMPILER_ARCHITECTURE_ID not detected. This should be automatic.") endif() diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake index 549d242..eca89c5 100644 --- a/Modules/Compiler/IAR-CXX.cmake +++ b/Modules/Compiler/IAR-CXX.cmake @@ -72,6 +72,12 @@ elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") __compiler_iar_xlink(CXX) __compiler_check_default_language_standard(CXX 1.10 98) set(CMAKE_C_OUTPUT_EXTENSION ".r85") + +elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051") + __compiler_iar_xlink(CXX) + __compiler_check_default_language_standard(CXX 6.10 98) + set(CMAKE_C_OUTPUT_EXTENSION ".r51") + else() message(FATAL_ERROR "CMAKE_CXX_COMPILER_ARCHITECTURE_ID not detected. This should be automatic." ) endif() diff --git a/Modules/Compiler/IAR-DetermineCompiler.cmake b/Modules/Compiler/IAR-DetermineCompiler.cmake index 7e17778..0a026b2 100644 --- a/Modules/Compiler/IAR-DetermineCompiler.cmake +++ b/Modules/Compiler/IAR-DetermineCompiler.cmake @@ -31,7 +31,7 @@ set(_compiler_id_version_compute " # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(((__VER__) / 1000) % 1000) # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@((__VER__) % 1000) # define @PREFIX@COMPILER_VERSION_INTERNAL @MACRO_DEC@(__IAR_SYSTEMS_ICC__) -# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__)) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__)) # define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@((__VER__) / 100) # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@((__VER__) - (((__VER__) / 100)*100)) # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__SUBVERSION__) diff --git a/Modules/Compiler/IAR-FindBinUtils.cmake b/Modules/Compiler/IAR-FindBinUtils.cmake index 6258cf3..6ef3759 100644 --- a/Modules/Compiler/IAR-FindBinUtils.cmake +++ b/Modules/Compiler/IAR-FindBinUtils.cmake @@ -46,7 +46,8 @@ set(CMAKE_IAR_LINKER \"${CMAKE_IAR_LINKER}\") elseif("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR" OR "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430" OR - "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") + "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850" OR + "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051") # Find the "xlink" linker and "xar" archiver: find_program(CMAKE_IAR_LINKER xlink HINTS ${__iar_hints} diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake index dfece22..cfa4ebc 100644 --- a/Modules/FindPostgreSQL.cmake +++ b/Modules/FindPostgreSQL.cmake @@ -87,7 +87,7 @@ set(PostgreSQL_ROOT_DIR_MESSAGE "Set the PostgreSQL_ROOT system variable to wher set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS} - "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") + "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") # Define additional search paths for root directories. set( PostgreSQL_ROOT_DIRECTORIES @@ -107,8 +107,11 @@ foreach(suffix ${PostgreSQL_KNOWN_VERSIONS}) list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES "pgsql-${suffix}/lib") list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES + "postgresql${suffix}" + "postgresql/${suffix}" "pgsql-${suffix}/include") list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES + "postgresql${suffix}/server" "postgresql/${suffix}/server" "pgsql-${suffix}/include/server") endif() diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index e3eeea4..0e1429d 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/cmVisualStudio10ToolsetOptions.cxx b/Source/cmVisualStudio10ToolsetOptions.cxx index a490e03..7fc33e6 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 0000000..5989aea --- /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/CMakeLists.txt b/Tests/CMakeLists.txt index 32b580b..b29638b 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2353,6 +2353,18 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Objective-C/c-file-extension-test") + add_test(Objective-C.cxx-file-extension-test ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/Objective-C/cxx-file-extension-test" + "${CMake_BINARY_DIR}/Tests/Objective-C/cxx-file-extension-test" + --build-two-config + ${build_generator_args} + --build-project cxx-file-extension-test + --build-options ${build_options} + --test-command cxx-file-extension-test + ) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Objective-C/cxx-file-extension-test") + add_test(Objective-C.objc-file-extension-test ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/Objective-C/objc-file-extension-test" diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index 060fb49..ef9198d 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -130,6 +130,12 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") endif() if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + if (CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC" + AND CMAKE_CXX_SIMULATE_VERSION VERSION_LESS 19.10) + list(REMOVE_ITEM CXX_non_features + cxx_relaxed_constexpr + ) + endif() if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0) if (CMAKE_CXX_COMIPLER_VERSION VERSION_EQUAL 15.0) list(REMOVE_ITEM CXX_non_features diff --git a/Tests/CompileFeatures/default_dialect.cpp b/Tests/CompileFeatures/default_dialect.cpp index 3ee60a6..e6b3ff6 100644 --- a/Tests/CompileFeatures/default_dialect.cpp +++ b/Tests/CompileFeatures/default_dialect.cpp @@ -2,7 +2,17 @@ template <long l> struct Outputter; -#if defined(_MSC_VER) && defined(_MSVC_LANG) +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L +# if defined(__INTEL_CXX11_MODE__) +# if defined(__cpp_aggregate_nsdmi) +# define CXX_STD 201402L +# else +# define CXX_STD 201103L +# endif +# else +# define CXX_STD 199711L +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) # define CXX_STD _MSVC_LANG #else # define CXX_STD __cplusplus diff --git a/Tests/Objective-C/cxx-file-extension-test/CMakeLists.txt b/Tests/Objective-C/cxx-file-extension-test/CMakeLists.txt new file mode 100644 index 0000000..eb065e4 --- /dev/null +++ b/Tests/Objective-C/cxx-file-extension-test/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(cxx-file-extension-test) + +string(APPEND CMAKE_CXX_FLAGS " -std=c++11") +set(CMAKE_CXX_STANDARD 14) + +add_executable(cxx-file-extension-test main.m) diff --git a/Tests/Objective-C/cxx-file-extension-test/main.m b/Tests/Objective-C/cxx-file-extension-test/main.m new file mode 100644 index 0000000..1c159a9 --- /dev/null +++ b/Tests/Objective-C/cxx-file-extension-test/main.m @@ -0,0 +1,8 @@ +#ifndef __OBJC__ +# error "Compiler cannot compile Objective-C" +#endif + +int main() +{ + return 0; +} |