Merge topic 'patch-CMakeDependentOption-script-mode' 8b25e11fed CMakeDependentOption: Document project and script mode Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !11192
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e24078..3c7758d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml
@@ -478,6 +478,16 @@ variables: CMAKE_CI_JOB_NIGHTLY: "true" +t:linux-gcc-cxx-modules-reloc-ninja: + extends: + - .gcc_cxx_modules_reloc_ninja + - .cmake_test_linux_release + - .linux_x86_64_tags + - .run_dependent + - .needs_centos7_x86_64 + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + t:linux-gcc-cxx-modules-ninja: extends: - .gcc_cxx_modules_ninja
diff --git a/.gitlab/ci/configure_linux_gcc_cxx_modules_reloc_ninja.cmake b/.gitlab/ci/configure_linux_gcc_cxx_modules_reloc_ninja.cmake new file mode 100644 index 0000000..75e94df --- /dev/null +++ b/.gitlab/ci/configure_linux_gcc_cxx_modules_reloc_ninja.cmake
@@ -0,0 +1,13 @@ +# "Misplace" the `libstdc++.modules.json` file so that +# `CMAKE_CXX_STDLIB_MODULES_JSON` is needed to use `import std`. +set(gcc_prefix "/opt/gcc-importstd") +set(CMake_TEST_CXX_STDLIB_MODULES_JSON + "${gcc_prefix}/lib64/libstdc++.modules.json" + CACHE FILEPATH "") +file(MAKE_DIRECTORY + "${gcc_prefix}/lib64.reloc") +file(RENAME + "${gcc_prefix}/lib64/libstdc++.modules.json" + "${CMake_TEST_CXX_STDLIB_MODULES_JSON}") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")
diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index c262945..a076df3 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml
@@ -524,6 +524,13 @@ variables: CMAKE_CONFIGURATION: linux_gcc_cxx_modules_ninja +.gcc_cxx_modules_reloc_ninja: + extends: .gcc_cxx_modules_x86_64 + + variables: + CMAKE_CONFIGURATION: linux_gcc_cxx_modules_reloc_ninja + CTEST_LABELS: "CXXModules" + .gcc_cxx_modules_ninja_multi: extends: .gcc_cxx_modules_x86_64
diff --git a/Help/generator/Visual Studio 18 2026.rst b/Help/generator/Visual Studio 18 2026.rst new file mode 100644 index 0000000..80127d0 --- /dev/null +++ b/Help/generator/Visual Studio 18 2026.rst
@@ -0,0 +1,47 @@ +Visual Studio 18 2026 +--------------------- + +.. versionadded:: 4.2 + +Generates Visual Studio 18 (VS 2026) project files. + +Project Types +^^^^^^^^^^^^^ + +Only Visual C++ and C# projects may be generated (and Fortran with +Intel compiler integration). Other types of projects (JavaScript, +Powershell, Python, etc.) are not supported. + +Instance Selection +^^^^^^^^^^^^^^^^^^ + +VS 2026 supports multiple installations on the same machine. The +:variable:`CMAKE_GENERATOR_INSTANCE` variable may be used to select one. + +Platform Selection +^^^^^^^^^^^^^^^^^^ + +The default target platform name (architecture) is that of the host +and is provided in the :variable:`CMAKE_VS_PLATFORM_NAME_DEFAULT` variable. + +The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps +via the :option:`cmake -A` option, to specify a target platform +name (architecture). For example: + +* ``cmake -G "Visual Studio 18 2026" -A Win32`` +* ``cmake -G "Visual Studio 18 2026" -A x64`` +* ``cmake -G "Visual Studio 18 2026" -A ARM`` +* ``cmake -G "Visual Studio 18 2026" -A ARM64`` + +Toolset Selection +^^^^^^^^^^^^^^^^^ + +The ``v145`` toolset that comes with VS 18 2026 is selected by default. +The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps +via the :option:`cmake -T` option, to specify another toolset. + +.. |VS_TOOLSET_HOST_ARCH_DEFAULT| replace:: + By default this generator uses the 64-bit variant on x64 hosts and + the 32-bit variant otherwise. + +.. include:: include/VS_TOOLSET_HOST_ARCH.rst
diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst index 9c52a06..a68a1f7 100644 --- a/Help/manual/cmake-generators.7.rst +++ b/Help/manual/cmake-generators.7.rst
@@ -100,6 +100,7 @@ /generator/Visual Studio 15 2017 /generator/Visual Studio 16 2019 /generator/Visual Studio 17 2022 + /generator/Visual Studio 18 2026 Other Generators ^^^^^^^^^^^^^^^^
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index aabf613..989246e 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst
@@ -45,6 +45,7 @@ /variable/CMAKE_CURRENT_LIST_FILE /variable/CMAKE_CURRENT_LIST_LINE /variable/CMAKE_CURRENT_SOURCE_DIR + /variable/CMAKE_CXX_STDLIB_MODULES_JSON /variable/CMAKE_DEBUG_TARGET_PROPERTIES /variable/CMAKE_DIRECTORY_LABELS /variable/CMAKE_DL_LIBS
diff --git a/Help/release/dev/cxxmodules-custom-import-std-metadata-file.rst b/Help/release/dev/cxxmodules-custom-import-std-metadata-file.rst new file mode 100644 index 0000000..104f917 --- /dev/null +++ b/Help/release/dev/cxxmodules-custom-import-std-metadata-file.rst
@@ -0,0 +1,7 @@ +cxxmodules-custom-import-std-metadata-file +------------------------------------------ + +* The ``import std`` support learned to use the + :variable:`CMAKE_CXX_STDLIB_MODULES_JSON` variable to set the path to the + metadata file for the standard library rather than using the compiler to + discover its location.
diff --git a/Help/release/dev/find-modules.rst b/Help/release/dev/find-modules.rst index 4feb634..2bb1217 100644 --- a/Help/release/dev/find-modules.rst +++ b/Help/release/dev/find-modules.rst
@@ -43,6 +43,10 @@ * The :module:`FindIcotool` module now provides a ``Icotool_VERSION`` result variable. The ``ICOTOOL_VERSION_STRING`` result variable is deprecated. +* The :module:`FindImageMagick` module now provides an ``ImageMagick_VERSION`` + result variable. The ``ImageMagick_VERSION_STRING`` result variable is + deprecated. + * The :module:`FindJasper` module now provides a ``Jasper_VERSION`` result variable. The ``JASPER_VERSION_STRING`` result variable is deprecated.
diff --git a/Help/release/dev/vs2026.rst b/Help/release/dev/vs2026.rst new file mode 100644 index 0000000..0bf1641 --- /dev/null +++ b/Help/release/dev/vs2026.rst
@@ -0,0 +1,6 @@ +vs2026 +------ + +* The :generator:`Visual Studio 18 2026` generator was added. This is + experimental and based on "Visual Studio 2026 Insiders" because this + version of VS has not been released.
diff --git a/Help/variable/CMAKE_CXX_STDLIB_MODULES_JSON.rst b/Help/variable/CMAKE_CXX_STDLIB_MODULES_JSON.rst new file mode 100644 index 0000000..134e8d6 --- /dev/null +++ b/Help/variable/CMAKE_CXX_STDLIB_MODULES_JSON.rst
@@ -0,0 +1,11 @@ +CMAKE_CXX_STDLIB_MODULES_JSON +----------------------------- + +.. versionadded:: 4.2 + +This variable may be used to set the path to a metadata file for CMake to +understand how the ``import std`` target for the active CXX compiler should be +constructed. + +This should only be used when the compiler does not know how to discover the +relevant module metadata file without such assistance.
diff --git a/Help/variable/MSVC_TOOLSET_VERSION.rst b/Help/variable/MSVC_TOOLSET_VERSION.rst index 84a6f33..cfd24ab 100644 --- a/Help/variable/MSVC_TOOLSET_VERSION.rst +++ b/Help/variable/MSVC_TOOLSET_VERSION.rst
@@ -24,6 +24,7 @@ 141 VS 2017 (15.0) 142 VS 2019 (16.0) 143 VS 2022 (17.0) + 145 VS 2026 (18.0) ===== ============== Compiler versions newer than those known to CMake will be reported
diff --git a/Help/variable/MSVC_VERSION.rst b/Help/variable/MSVC_VERSION.rst index 4d87a03..e3140a9 100644 --- a/Help/variable/MSVC_VERSION.rst +++ b/Help/variable/MSVC_VERSION.rst
@@ -26,6 +26,7 @@ 1910-1919 VS 15.0 (v141 toolset) 1920-1929 VS 16.0 (v142 toolset) 1930-1949 VS 17.0 (v143 toolset) + 1950-1959 VS 18.0 (v145 toolset) ========= ============== See also the :variable:`CMAKE_<LANG>_COMPILER_VERSION` and
diff --git a/Modules/CMakeCSharpCompilerId.cs.in b/Modules/CMakeCSharpCompilerId.cs.in index b43ec04..7a9011b 100644 --- a/Modules/CMakeCSharpCompilerId.cs.in +++ b/Modules/CMakeCSharpCompilerId.cs.in
@@ -19,6 +19,8 @@ + "Visual Studio" #elif PlatformToolsetv143 + "Visual Studio" +#elif PlatformToolsetv145 + + "Visual Studio" #else + "unknown" #endif @@ -53,6 +55,8 @@ + "2019" #elif PlatformToolsetv143 + "2022" +#elif PlatformToolsetv145 + + "2026" #else + "9999" #endif
diff --git a/Modules/Compiler/Clang-CXX-CXXImportStd.cmake b/Modules/Compiler/Clang-CXX-CXXImportStd.cmake index 5330eb1..9061e00 100644 --- a/Modules/Compiler/Clang-CXX-CXXImportStd.cmake +++ b/Modules/Compiler/Clang-CXX-CXXImportStd.cmake
@@ -10,21 +10,25 @@ return () endif () - execute_process( - COMMAND - "${CMAKE_CXX_COMPILER}" - ${CMAKE_CXX_COMPILER_ID_ARG1} - "-print-file-name=${_clang_modules_json_impl}.modules.json" - OUTPUT_VARIABLE _clang_libcxx_modules_json_file - ERROR_VARIABLE _clang_libcxx_modules_json_file_err - RESULT_VARIABLE _clang_libcxx_modules_json_file_res - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_STRIP_TRAILING_WHITESPACE) - if (_clang_libcxx_modules_json_file_res) - set("${variable}" - "set(CMAKE_CXX${std}_COMPILER_IMPORT_STD_NOT_FOUND_MESSAGE \"Could not find `${_clang_modules_json_impl}.modules.json` resource\")\n" - PARENT_SCOPE) - return () + if (CMAKE_CXX_STDLIB_MODULES_JSON) + set(_clang_libcxx_modules_json_file "${CMAKE_CXX_STDLIB_MODULES_JSON}") + else () + execute_process( + COMMAND + "${CMAKE_CXX_COMPILER}" + ${CMAKE_CXX_COMPILER_ID_ARG1} + "-print-file-name=${_clang_modules_json_impl}.modules.json" + OUTPUT_VARIABLE _clang_libcxx_modules_json_file + ERROR_VARIABLE _clang_libcxx_modules_json_file_err + RESULT_VARIABLE _clang_libcxx_modules_json_file_res + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE) + if (_clang_libcxx_modules_json_file_res) + set("${variable}" + "set(CMAKE_CXX${std}_COMPILER_IMPORT_STD_NOT_FOUND_MESSAGE \"Could not find `${_clang_modules_json_impl}.modules.json` resource\")\n" + PARENT_SCOPE) + return () + endif () endif () # Without this file, we do not have modules installed.
diff --git a/Modules/Compiler/GNU-CXX-CXXImportStd.cmake b/Modules/Compiler/GNU-CXX-CXXImportStd.cmake index 965e25a..834e999 100644 --- a/Modules/Compiler/GNU-CXX-CXXImportStd.cmake +++ b/Modules/Compiler/GNU-CXX-CXXImportStd.cmake
@@ -6,21 +6,25 @@ return () endif () - execute_process( - COMMAND - "${CMAKE_CXX_COMPILER}" - ${CMAKE_CXX_COMPILER_ID_ARG1} - -print-file-name=libstdc++.modules.json - OUTPUT_VARIABLE _gnu_libstdcxx_modules_json_file - ERROR_VARIABLE _gnu_libstdcxx_modules_json_file_err - RESULT_VARIABLE _gnu_libstdcxx_modules_json_file_res - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_STRIP_TRAILING_WHITESPACE) - if (_gnu_libstdcxx_modules_json_file_res) - set("${variable}" - "set(CMAKE_CXX${std}_COMPILER_IMPORT_STD_NOT_FOUND_MESSAGE \"Could not find `libstdc++.modules.json` resource\")\n" - PARENT_SCOPE) - return () + if (CMAKE_CXX_STDLIB_MODULES_JSON) + set(_gnu_libstdcxx_modules_json_file "${CMAKE_CXX_STDLIB_MODULES_JSON}") + else () + execute_process( + COMMAND + "${CMAKE_CXX_COMPILER}" + ${CMAKE_CXX_COMPILER_ID_ARG1} + -print-file-name=libstdc++.modules.json + OUTPUT_VARIABLE _gnu_libstdcxx_modules_json_file + ERROR_VARIABLE _gnu_libstdcxx_modules_json_file_err + RESULT_VARIABLE _gnu_libstdcxx_modules_json_file_res + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE) + if (_gnu_libstdcxx_modules_json_file_res) + set("${variable}" + "set(CMAKE_CXX${std}_COMPILER_IMPORT_STD_NOT_FOUND_MESSAGE \"Could not find `libstdc++.modules.json` resource\")\n" + PARENT_SCOPE) + return () + endif () endif () # Without this file, we do not have modules installed.
diff --git a/Modules/Compiler/MSVC-CXX-CXXImportStd.cmake b/Modules/Compiler/MSVC-CXX-CXXImportStd.cmake index 08199f7..ff01263 100644 --- a/Modules/Compiler/MSVC-CXX-CXXImportStd.cmake +++ b/Modules/Compiler/MSVC-CXX-CXXImportStd.cmake
@@ -1,21 +1,25 @@ function (_cmake_cxx_import_std std variable) - find_file(_msvc_modules_json_file - NAME modules.json - HINTS - "$ENV{VCToolsInstallDir}/modules" - PATHS - "$ENV{INCLUDE}" - "${CMAKE_CXX_COMPILER}/../../.." - "${CMAKE_CXX_COMPILER}/../.." # msvc-wine layout - PATH_SUFFIXES - ../modules - NO_CACHE) - # Without this file, we do not have modules installed. - if (NOT EXISTS "${_msvc_modules_json_file}") - set("${variable}" - "set(CMAKE_CXX${std}_COMPILER_IMPORT_STD_NOT_FOUND_MESSAGE \"Could not find `modules.json` resource\")\n" - PARENT_SCOPE) - return () + if (CMAKE_CXX_STDLIB_MODULES_JSON) + set(_msvc_modules_json_file "${CMAKE_CXX_STDLIB_MODULES_JSON}") + else () + find_file(_msvc_modules_json_file + NAME modules.json + HINTS + "$ENV{VCToolsInstallDir}/modules" + PATHS + "$ENV{INCLUDE}" + "${CMAKE_CXX_COMPILER}/../../.." + "${CMAKE_CXX_COMPILER}/../.." # msvc-wine layout + PATH_SUFFIXES + ../modules + NO_CACHE) + # Without this file, we do not have modules installed. + if (NOT EXISTS "${_msvc_modules_json_file}") + set("${variable}" + "set(CMAKE_CXX${std}_COMPILER_IMPORT_STD_NOT_FOUND_MESSAGE \"Could not find `modules.json` resource\")\n" + PARENT_SCOPE) + return () + endif () endif () file(READ "${_msvc_modules_json_file}" _msvc_modules_json)
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index dae3fd4..c2e8dbd 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake
@@ -14,7 +14,7 @@ This module provides commands to download and build external projects as part of CMake build phase. -Load this module in CMake with: +Load this module in a CMake project with: .. code-block:: cmake
diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake index 0f3d7b0..b72755b 100644 --- a/Modules/FindImageMagick.cmake +++ b/Modules/FindImageMagick.cmake
@@ -82,11 +82,15 @@ This module defines the following variables: ``ImageMagick_FOUND`` - Boolean indicating whether ImageMagick and all its requested components are - found. + Boolean indicating whether (the requested version of) ImageMagick and all + its requested components are found. -``ImageMagick_VERSION_STRING`` - The version of ImageMagick found. +``ImageMagick_VERSION`` + .. versionadded:: 4.2 + + The version of ImageMagick found in form of + ``<major>.<minor>.<patch>-<addendum>`` (e.g., ``6.9.12-98``, where ``98`` + is the addendum release number). .. note:: @@ -131,6 +135,17 @@ ``ImageMagick_EXECUTABLE_DIR`` The full path to directory containing ImageMagick executables. +Deprecated Variables +^^^^^^^^^^^^^^^^^^^^ + +The following variables are provided for backward compatibility: + +``ImageMagick_VERSION_STRING`` + .. deprecated:: 4.2 + Use ``ImageMagick_VERSION``, which has the same value. + + The version of ImageMagick found. + Examples ^^^^^^^^ @@ -143,6 +158,10 @@ target_link_libraries(example PRIVATE ImageMagick::Magick++) #]=======================================================================] +cmake_policy(PUSH) +cmake_policy(SET CMP0140 NEW) +cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_<n> + find_package(PkgConfig QUIET) #--------------------------------------------------------------------- @@ -257,6 +276,60 @@ endif() endfunction() +function(_ImageMagick_GetVersion) + unset(version) + + if(ImageMagick_mogrify_EXECUTABLE) + execute_process( + COMMAND ${ImageMagick_mogrify_EXECUTABLE} -version + OUTPUT_VARIABLE version + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + if(version MATCHES "^Version: ImageMagick ([-0-9.]+)") + set(version "${CMAKE_MATCH_1}") + endif() + elseif(ImageMagick_INCLUDE_DIRS) + # MagickLibSubversion was used in ImageMagick <= 6.5. + set( + regex + "^[\t ]*#[\t ]*define[\t ]+(MagickLibVersionText|MagickLibAddendum|MagickLibSubversion)[\t ]+\"([-0-9.]+)\"" + ) + + foreach(dir IN LISTS ImageMagick_INCLUDE_DIRS) + if(EXISTS ${dir}/magick/version.h) + file(STRINGS "${dir}/magick/version.h" results REGEX "${regex}") + + foreach(line ${results}) + if(line MATCHES "${regex}") + if(DEFINED version) + string(APPEND version "${CMAKE_MATCH_2}") + else() + set(version "${CMAKE_MATCH_2}") + endif() + + if(CMAKE_MATCH_1 STREQUAL "MagickLibAddendum") + break() + endif() + endif() + endforeach() + endif() + + if(DEFINED version) + break() + endif() + endforeach() + endif() + + if(DEFINED version) + set(ImageMagick_VERSION "${version}") + set(ImageMagick_VERSION_STRING "${ImageMagick_VERSION}") + endif() + + return(PROPAGATE ImageMagick_VERSION ImageMagick_VERSION_STRING) +endfunction() + #--------------------------------------------------------------------- # Start Actual Work #--------------------------------------------------------------------- @@ -344,16 +417,7 @@ set(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS}) set(ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES}) -if(ImageMagick_mogrify_EXECUTABLE) - execute_process(COMMAND ${ImageMagick_mogrify_EXECUTABLE} -version - OUTPUT_VARIABLE imagemagick_version - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(imagemagick_version MATCHES "^Version: ImageMagick ([-0-9\\.]+)") - set(ImageMagick_VERSION_STRING "${CMAKE_MATCH_1}") - endif() - unset(imagemagick_version) -endif() +_ImageMagick_GetVersion() #--------------------------------------------------------------------- # Standard Package Output @@ -361,7 +425,7 @@ include(FindPackageHandleStandardArgs) find_package_handle_standard_args(ImageMagick REQUIRED_VARS ${ImageMagick_REQUIRED_VARS} - VERSION_VAR ImageMagick_VERSION_STRING + VERSION_VAR ImageMagick_VERSION ) #--------------------------------------------------------------------- @@ -387,3 +451,5 @@ IMAGEMAGICK_MONTAGE_EXECUTABLE IMAGEMAGICK_COMPOSITE_EXECUTABLE ) + +cmake_policy(POP)
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index 4a8a4f0..c659576 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake
@@ -1519,13 +1519,13 @@ unset (_${_PYTHON_PREFIX}_FIND_DEVELOPMENT_SABIMODULE_ARTIFACTS) unset (_${_PYTHON_PREFIX}_FIND_DEVELOPMENT_EMBED_ARTIFACTS) if ("Development.Module" IN_LIST ${_PYTHON_BASE}_FIND_COMPONENTS) - if (CMAKE_SYSTEM_NAME MATCHES "^(Windows.*|CYGWIN|MSYS)$") + if (CMAKE_SYSTEM_NAME MATCHES "^(Windows.*|CYGWIN|MSYS|Android)$") list (APPEND _${_PYTHON_PREFIX}_FIND_DEVELOPMENT_MODULE_ARTIFACTS "LIBRARY") endif() list (APPEND _${_PYTHON_PREFIX}_FIND_DEVELOPMENT_MODULE_ARTIFACTS "INCLUDE_DIR") endif() if ("Development.SABIModule" IN_LIST ${_PYTHON_BASE}_FIND_COMPONENTS) - if (CMAKE_SYSTEM_NAME MATCHES "^(Windows.*|CYGWIN|MSYS)$") + if (CMAKE_SYSTEM_NAME MATCHES "^(Windows.*|CYGWIN|MSYS|Android)$") list (APPEND _${_PYTHON_PREFIX}_FIND_DEVELOPMENT_SABIMODULE_ARTIFACTS "SABI_LIBRARY") endif() list (APPEND _${_PYTHON_PREFIX}_FIND_DEVELOPMENT_SABIMODULE_ARTIFACTS "INCLUDE_DIR") @@ -4351,7 +4351,7 @@ if (${_PYTHON_PREFIX}_Development.Module_FOUND) if ("LIBRARY" IN_LIST _${_PYTHON_PREFIX}_FIND_DEVELOPMENT_MODULE_ARTIFACTS) - # On Windows/CYGWIN/MSYS, Python::Module is the same as Python::Python + # On Windows/CYGWIN/MSYS/Android, Python::Module is the same as Python::Python # but ALIAS cannot be used because the imported library is not GLOBAL. __python_import_library (${_PYTHON_PREFIX}::Module) else()
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index 733c5b2..ae1203b 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake
@@ -157,7 +157,7 @@ ``wxWidgets_EXCLUDE_COMMON_LIBRARIES`` Set to TRUE to exclude linking of commonly required libs (e.g., png, tiff, - jpeg, zlib, regex, expat, scintilla, lexilla, etc.). + jpeg, zlib, webp, regex, expat, scintilla, lexilla, etc.). For Unix style this module uses the ``wx-config`` utility. Selecting between debug/release, unicode/ansi, universal/non-universal, and @@ -412,7 +412,8 @@ #===================================================================== if(wxWidgets_FIND_STYLE STREQUAL "win32") # Useful common wx libs needed by almost all components. - set(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat) + set(wxWidgets_WEBP_LIBRARIES webp webpdemux sharpyuv) + set(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib ${wxWidgets_WEBP_LIBRARIES} regex expat) # Libraries needed by stc component set(wxWidgets_STC_LIBRARIES scintilla lexilla) @@ -607,7 +608,30 @@ list(APPEND wxWidgets_LIBRARIES imm32) endif() - list(APPEND wxWidgets_LIBRARIES gdiplus msimg32 winmm comctl32 uuid oleacc uxtheme rpcrt4 shlwapi version wsock32) + list(APPEND wxWidgets_LIBRARIES + kernel32 + user32 + gdi32 + gdiplus + msimg32 + comdlg32 + winspool + winmm + shell32 + shlwapi + comctl32 + ole32 + oleaut32 + uuid + rpcrt4 + advapi32 + version + ws2_32 + wininet + oleacc + uxtheme + wsock32 + ) endmacro() #-------------------------------------------------------------------
diff --git a/Modules/FortranCInterface/CMakeLists.txt b/Modules/FortranCInterface/CMakeLists.txt index af7d32d..cabbb32 100644 --- a/Modules/FortranCInterface/CMakeLists.txt +++ b/Modules/FortranCInterface/CMakeLists.txt
@@ -104,7 +104,12 @@ set_property(TARGET symbols PROPERTY POSITION_INDEPENDENT_CODE 1) if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran") - add_compile_options(--implicit-interface --generate-object-code) + if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "0.55") + set(_LFORTRAN_SC_FLAG --separate-compilation) + else() + set(_LFORTRAN_SC_FLAG --generate-object-code) + endif() + add_compile_options(--implicit-interface ${_LFORTRAN_SC_FLAG}) endif() # Require symbols through Fortran.
diff --git a/Modules/FortranCInterface/Verify/CMakeLists.txt b/Modules/FortranCInterface/Verify/CMakeLists.txt index 7367968..04fa6aa 100644 --- a/Modules/FortranCInterface/Verify/CMakeLists.txt +++ b/Modules/FortranCInterface/Verify/CMakeLists.txt
@@ -5,7 +5,12 @@ project(VerifyFortranC C Fortran) if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran") - add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:--generate-object-code>") + if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "0.55") + set(_LFORTRAN_SC_FLAG --separate-compilation) + else() + set(_LFORTRAN_SC_FLAG --generate-object-code) + endif() + add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:${_LFORTRAN_SC_FLAG}>") endif() option(VERIFY_CXX "Whether to verify C++ and Fortran" OFF)
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index ad54a9e..8f1543b 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -247,8 +247,12 @@ set(_MSVC_IDE_VERSION "") if(MSVC_VERSION GREATER_EQUAL 2000) message(WARNING "MSVC ${MSVC_VERSION} not yet supported.") - elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 144) + elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 146) message(WARNING "MSVC toolset v${MSVC_TOOLSET_VERSION} not yet supported.") + elseif(MSVC_TOOLSET_VERSION EQUAL 145) + set(MSVC_REDIST_NAME VC145) + set(_MSVC_DLL_VERSION 140) + set(_MSVC_IDE_VERSION 18) elseif(MSVC_TOOLSET_VERSION EQUAL 143) set(MSVC_REDIST_NAME VC143) set(_MSVC_DLL_VERSION 140) @@ -293,7 +297,7 @@ if(NOT vs VERSION_LESS 15) set(_vs_redist_paths "") # The toolset and its redistributables may come with any VS version 15 or newer. - set(_MSVC_IDE_VERSIONS 17 16 15) + set(_MSVC_IDE_VERSIONS 18 17 16 15) foreach(_vs_ver ${_MSVC_IDE_VERSIONS}) set(_vs_glob_redist_paths "") cmake_host_system_information(RESULT _vs_dir QUERY VS_${_vs_ver}_DIR) # undocumented query
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake index 37d5cf1..962b57a 100644 --- a/Modules/Platform/Windows-GNU.cmake +++ b/Modules/Platform/Windows-GNU.cmake
@@ -181,7 +181,7 @@ # Query the VS Installer tool for locations of VS 2017 and above. set(_vs_installer_paths "") - foreach(vs RANGE 17 15 -1) # change the first number to the largest supported version + foreach(vs RANGE 18 15 -1) # change the first number to the largest supported version cmake_host_system_information(RESULT _vs_dir QUERY VS_${vs}_DIR) if(_vs_dir) list(APPEND _vs_installer_paths "${_vs_dir}/VC/Auxiliary/Build")
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 6c5a2be..d179bc1 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake
@@ -61,7 +61,10 @@ message(FATAL_ERROR "MSVC compiler version not detected properly: ${_compiler_version}") endif() - if(MSVC_VERSION GREATER_EQUAL 1930) + if(MSVC_VERSION GREATER_EQUAL 1950) + # VS 2026 or greater + set(MSVC_TOOLSET_VERSION 145) + elseif(MSVC_VERSION GREATER_EQUAL 1930) # VS 2022 or greater set(MSVC_TOOLSET_VERSION 143) elseif(MSVC_VERSION GREATER_EQUAL 1920)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 11df40b..5810b6f 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 4) set(CMake_VERSION_MINOR 1) -set(CMake_VERSION_PATCH 20250914) +set(CMake_VERSION_PATCH 20250916) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/LexerParser/cmListFileLexer.c b/Source/LexerParser/cmListFileLexer.c index 08fd0a9..e945afc 100644 --- a/Source/LexerParser/cmListFileLexer.c +++ b/Source/LexerParser/cmListFileLexer.c
@@ -576,16 +576,16 @@ flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[79] = +static const flex_int16_t yy_accept[77] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 25, 13, 22, 1, 16, 3, 13, 5, 6, 7, - 15, 23, 23, 17, 19, 20, 21, 24, 10, 11, - 8, 12, 9, 4, 13, 0, 13, 0, 22, 0, - 0, 7, 13, 0, 13, 0, 2, 0, 13, 17, - 0, 18, 10, 8, 4, 0, 14, 0, 0, 0, - 0, 14, 0, 0, 14, 0, 0, 0, 2, 14, - 0, 0, 0, 0, 0, 0, 0, 0 + 15, 23, 17, 19, 20, 21, 10, 11, 8, 12, + 9, 4, 13, 0, 13, 0, 22, 0, 0, 7, + 13, 0, 13, 0, 2, 0, 13, 17, 0, 18, + 10, 8, 4, 0, 14, 0, 0, 0, 0, 14, + 0, 0, 14, 0, 0, 0, 2, 14, 0, 0, + 0, 0, 0, 0, 0, 0 } ; static const YY_CHAR yy_ec[256] = @@ -620,118 +620,104 @@ 1, 1, 1, 1, 1 } ; -static const YY_CHAR yy_meta[17] = +static const YY_CHAR yy_meta[16] = { 0, 1, 1, 2, 3, 4, 3, 1, 3, 5, 6, - 1, 6, 1, 1, 7, 2 + 1, 6, 1, 1, 7 } ; -static const flex_int16_t yy_base[97] = +static const flex_int16_t yy_base[95] = { 0, - 0, 0, 14, 28, 42, 56, 70, 84, 18, 19, - 68, 100, 16, 298, 298, 54, 58, 298, 298, 13, - 115, 0, 298, 51, 298, 298, 21, 298, 0, 298, - 53, 298, 298, 0, 0, 126, 55, 0, 25, 25, - 53, 0, 0, 136, 53, 0, 57, 0, 0, 42, - 50, 298, 0, 43, 0, 146, 160, 45, 172, 43, - 26, 0, 42, 177, 0, 42, 188, 40, 298, 40, - 0, 38, 37, 34, 32, 31, 23, 298, 197, 204, - 211, 218, 225, 232, 239, 245, 252, 259, 262, 268, - 275, 278, 280, 286, 289, 291 + 0, 0, 13, 25, 14, 16, 17, 18, 90, 88, + 88, 39, 20, 237, 237, 74, 78, 237, 237, 13, + 54, 0, 71, 237, 237, 31, 0, 237, 73, 237, + 237, 0, 0, 65, 75, 0, 33, 30, 72, 0, + 0, 75, 70, 0, 74, 0, 0, 62, 70, 237, + 0, 63, 0, 85, 99, 65, 111, 62, 34, 0, + 54, 116, 0, 54, 127, 51, 237, 50, 0, 48, + 47, 39, 33, 29, 17, 237, 136, 143, 150, 157, + 164, 171, 178, 184, 191, 198, 201, 207, 214, 217, + 219, 225, 228, 230 } ; -static const flex_int16_t yy_def[97] = +static const flex_int16_t yy_def[95] = { 0, - 78, 1, 79, 79, 80, 80, 81, 81, 82, 82, - 78, 78, 78, 78, 78, 78, 12, 78, 78, 12, - 78, 83, 78, 84, 78, 78, 84, 78, 85, 78, - 78, 78, 78, 86, 12, 87, 12, 88, 78, 78, - 89, 20, 12, 90, 12, 21, 78, 91, 12, 84, - 84, 78, 85, 78, 86, 87, 78, 56, 87, 92, - 78, 57, 89, 90, 57, 64, 90, 93, 78, 57, - 94, 95, 92, 96, 93, 95, 96, 0, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78 + 76, 1, 77, 77, 78, 78, 79, 79, 80, 80, + 76, 76, 76, 76, 76, 76, 12, 76, 76, 12, + 76, 81, 82, 76, 76, 82, 83, 76, 76, 76, + 76, 84, 12, 85, 12, 86, 76, 76, 87, 20, + 12, 88, 12, 21, 76, 89, 12, 82, 82, 76, + 83, 76, 84, 85, 76, 54, 85, 90, 76, 55, + 87, 88, 55, 62, 88, 91, 76, 55, 92, 93, + 90, 94, 91, 93, 94, 0, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76 } ; -static const flex_int16_t yy_nxt[315] = +static const flex_int16_t yy_nxt[253] = { 0, 12, 13, 14, 13, 15, 16, 17, 18, 19, 12, - 12, 20, 21, 22, 12, 23, 25, 39, 26, 39, - 14, 14, 42, 52, 42, 50, 39, 27, 39, 28, - 25, 64, 26, 28, 28, 61, 61, 47, 47, 56, - 65, 27, 64, 28, 30, 57, 56, 60, 65, 74, - 62, 57, 72, 54, 50, 51, 31, 28, 30, 69, - 68, 62, 60, 54, 51, 41, 40, 78, 78, 78, - 31, 28, 30, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 33, 28, 30, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 33, 28, + 12, 20, 21, 22, 12, 24, 28, 25, 28, 28, + 28, 37, 40, 37, 40, 62, 26, 24, 29, 25, + 29, 31, 31, 50, 37, 48, 37, 54, 26, 33, + 59, 63, 45, 34, 59, 35, 45, 62, 33, 33, + 33, 33, 36, 33, 41, 55, 54, 58, 42, 63, + 43, 72, 60, 41, 44, 41, 45, 46, 41, 55, + 55, 56, 70, 52, 48, 49, 67, 66, 57, 63, + 60, 64, 58, 52, 49, 39, 38, 76, 65, 55, + 14, 56, 14, 76, 76, 76, 76, 76, 57, 55, - 35, 78, 78, 78, 36, 78, 37, 78, 78, 35, - 35, 35, 35, 38, 35, 43, 78, 78, 78, 44, - 78, 45, 78, 78, 43, 46, 43, 47, 48, 43, - 57, 78, 58, 78, 78, 78, 78, 78, 78, 59, - 65, 78, 66, 78, 78, 78, 78, 78, 78, 67, - 57, 78, 58, 78, 78, 78, 78, 78, 78, 59, - 57, 78, 78, 78, 36, 78, 70, 78, 78, 57, - 57, 57, 57, 71, 57, 56, 78, 56, 78, 56, - 56, 65, 78, 66, 78, 78, 78, 78, 78, 78, - 67, 64, 78, 64, 78, 64, 64, 24, 24, 24, + 76, 76, 76, 34, 76, 68, 76, 76, 55, 55, + 55, 55, 69, 55, 54, 76, 54, 76, 54, 54, + 63, 76, 64, 76, 76, 76, 76, 76, 76, 65, + 62, 76, 62, 76, 62, 62, 23, 23, 23, 23, + 23, 23, 23, 27, 27, 27, 27, 27, 27, 27, + 30, 30, 30, 30, 30, 30, 30, 32, 32, 32, + 32, 32, 32, 32, 47, 76, 47, 47, 47, 47, + 47, 48, 76, 48, 76, 48, 48, 48, 51, 76, + 51, 51, 51, 51, 53, 76, 53, 53, 53, 53, + 53, 54, 76, 76, 54, 76, 54, 54, 33, 76, - 24, 24, 24, 24, 29, 29, 29, 29, 29, 29, - 29, 32, 32, 32, 32, 32, 32, 32, 34, 34, - 34, 34, 34, 34, 34, 49, 78, 49, 49, 49, - 49, 49, 50, 78, 50, 78, 50, 50, 50, 53, - 78, 53, 53, 53, 53, 55, 78, 55, 55, 55, - 55, 55, 56, 78, 78, 56, 78, 56, 56, 35, - 78, 35, 35, 35, 35, 35, 63, 63, 64, 78, - 78, 64, 78, 64, 64, 43, 78, 43, 43, 43, - 43, 43, 73, 73, 75, 75, 57, 78, 57, 57, - 57, 57, 57, 76, 76, 77, 77, 11, 78, 78, - - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78 + 33, 33, 33, 33, 33, 61, 61, 62, 76, 76, + 62, 76, 62, 62, 41, 76, 41, 41, 41, 41, + 41, 71, 71, 73, 73, 55, 76, 55, 55, 55, + 55, 55, 74, 74, 75, 75, 11, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76 } ; -static const flex_int16_t yy_chk[315] = +static const flex_int16_t yy_chk[253] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 13, 3, 13, - 9, 10, 20, 27, 20, 27, 39, 3, 39, 3, - 4, 77, 4, 9, 10, 40, 61, 40, 61, 76, - 75, 4, 74, 4, 5, 73, 72, 70, 68, 66, - 63, 60, 58, 54, 51, 50, 5, 5, 6, 47, - 45, 41, 37, 31, 24, 17, 16, 11, 0, 0, - 6, 6, 7, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 7, 8, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, + 1, 1, 1, 1, 1, 3, 5, 3, 6, 7, + 8, 13, 20, 13, 20, 75, 3, 4, 5, 4, + 6, 7, 8, 26, 37, 26, 37, 74, 4, 12, + 38, 73, 38, 12, 59, 12, 59, 72, 12, 12, + 12, 12, 12, 12, 21, 71, 70, 68, 21, 66, + 21, 64, 61, 21, 21, 21, 21, 21, 21, 34, + 58, 34, 56, 52, 49, 48, 45, 43, 34, 42, + 39, 42, 35, 29, 23, 17, 16, 11, 42, 54, + 10, 54, 9, 0, 0, 0, 0, 0, 54, 55, - 12, 0, 0, 0, 12, 0, 12, 0, 0, 12, - 12, 12, 12, 12, 12, 21, 0, 0, 0, 21, - 0, 21, 0, 0, 21, 21, 21, 21, 21, 21, - 36, 0, 36, 0, 0, 0, 0, 0, 0, 36, - 44, 0, 44, 0, 0, 0, 0, 0, 0, 44, - 56, 0, 56, 0, 0, 0, 0, 0, 0, 56, - 57, 0, 0, 0, 57, 0, 57, 0, 0, 57, - 57, 57, 57, 57, 57, 59, 0, 59, 0, 59, - 59, 64, 0, 64, 0, 0, 0, 0, 0, 0, - 64, 67, 0, 67, 0, 67, 67, 79, 79, 79, + 0, 0, 0, 55, 0, 55, 0, 0, 55, 55, + 55, 55, 55, 55, 57, 0, 57, 0, 57, 57, + 62, 0, 62, 0, 0, 0, 0, 0, 0, 62, + 65, 0, 65, 0, 65, 65, 77, 77, 77, 77, + 77, 77, 77, 78, 78, 78, 78, 78, 78, 78, + 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, + 80, 80, 80, 80, 81, 0, 81, 81, 81, 81, + 81, 82, 0, 82, 0, 82, 82, 82, 83, 0, + 83, 83, 83, 83, 84, 0, 84, 84, 84, 84, + 84, 85, 0, 0, 85, 0, 85, 85, 86, 0, - 79, 79, 79, 79, 80, 80, 80, 80, 80, 80, - 80, 81, 81, 81, 81, 81, 81, 81, 82, 82, - 82, 82, 82, 82, 82, 83, 0, 83, 83, 83, - 83, 83, 84, 0, 84, 0, 84, 84, 84, 85, - 0, 85, 85, 85, 85, 86, 0, 86, 86, 86, - 86, 86, 87, 0, 0, 87, 0, 87, 87, 88, - 0, 88, 88, 88, 88, 88, 89, 89, 90, 0, - 0, 90, 0, 90, 90, 91, 0, 91, 91, 91, - 91, 91, 92, 92, 93, 93, 94, 0, 94, 94, - 94, 94, 94, 95, 95, 96, 96, 78, 78, 78, - - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78 + 86, 86, 86, 86, 86, 87, 87, 88, 0, 0, + 88, 0, 88, 88, 89, 0, 89, 89, 89, 89, + 89, 90, 90, 91, 91, 92, 0, 92, 92, 92, + 92, 92, 93, 93, 94, 94, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76 } ; /* Table of booleans, true if rule could match eol. */ @@ -784,19 +770,19 @@ int comment; int line; int column; - int size; + size_t size; FILE* file; size_t cr; char* string_buffer; char* string_position; - int string_left; + size_t string_left; yyscan_t scanner; }; static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, - int length); + size_t length); static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, - int length); + size_t length); static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, size_t bufferSize); static void cmListFileLexerInit(cmListFileLexer* lexer); @@ -1089,13 +1075,13 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 79 ) + if ( yy_current_state >= 77 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 298 ); + while ( yy_base[yy_current_state] != 237 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1148,15 +1134,17 @@ YY_RULE_SETUP { const char* bracket = yytext; + size_t length = yyleng; lexer->comment = yytext[0] == '#'; if (lexer->comment) { lexer->token.type = cmListFileLexer_Token_CommentBracket; bracket += 1; + --length; } else { lexer->token.type = cmListFileLexer_Token_ArgumentBracket; } cmListFileLexerSetToken(lexer, "", 0); - lexer->bracket = strchr(bracket+1, '[') - bracket; + lexer->bracket = (char*)memchr(bracket + 1, '[', length - 1) - bracket; if (yytext[yyleng-1] == '\n') { ++lexer->line; lexer->column = 1; @@ -1176,6 +1164,9 @@ case 4: YY_RULE_SETUP { + if (memchr(yytext, '\0', yyleng) != NULL) { + lexer->token.type = cmListFileLexer_Token_BadCharacter; + } lexer->column += yyleng; } YY_BREAK @@ -1223,7 +1214,6 @@ lexer->column += yyleng; /* Erase the partial bracket from the token. */ lexer->token.length -= lexer->bracket; - lexer->token.text[lexer->token.length] = 0; BEGIN(INITIAL); return 1; } @@ -1231,6 +1221,9 @@ case 10: YY_RULE_SETUP { + if (memchr(yytext, '\0', yyleng) != NULL) { + lexer->token.type = cmListFileLexer_Token_BadCharacter; + } cmListFileLexerAppend(lexer, yytext, yyleng); lexer->column += yyleng; } @@ -1248,6 +1241,9 @@ case 12: YY_RULE_SETUP { + if (memchr(yytext, '\0', yyleng) != NULL) { + lexer->token.type = cmListFileLexer_Token_BadCharacter; + } cmListFileLexerAppend(lexer, yytext, yyleng); lexer->column += yyleng; BEGIN(BRACKET); @@ -1264,7 +1260,12 @@ case 13: YY_RULE_SETUP { - lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + if (memchr(yytext, '\0', yyleng) != NULL) { + /* An unquoted argument that contains a null character. */ + lexer->token.type = cmListFileLexer_Token_BadCharacter; + } else { + lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + } cmListFileLexerSetToken(lexer, yytext, yyleng); lexer->column += yyleng; return 1; @@ -1300,6 +1301,9 @@ case 17: YY_RULE_SETUP { + if (memchr(yytext, '\0', yyleng) != NULL) { + lexer->token.type = cmListFileLexer_Token_BadCharacter; + } cmListFileLexerAppend(lexer, yytext, yyleng); lexer->column += yyleng; } @@ -1333,6 +1337,9 @@ case 21: YY_RULE_SETUP { + if (memchr(yytext, '\0', yyleng) != NULL) { + lexer->token.type = cmListFileLexer_Token_BadCharacter; + } cmListFileLexerAppend(lexer, yytext, yyleng); lexer->column += yyleng; } @@ -1661,7 +1668,7 @@ for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 16); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1670,7 +1677,7 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 79 ) + if ( yy_current_state >= 77 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1690,7 +1697,7 @@ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ char *yy_cp = yyg->yy_c_buf_p; - YY_CHAR yy_c = 16; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1699,11 +1706,11 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 79 ) + if ( yy_current_state >= 77 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 78); + yy_is_jam = (yy_current_state == 76); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2553,7 +2560,7 @@ /*--------------------------------------------------------------------------*/ static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, - int length) + size_t length) { /* Set the token line and column number. */ lexer->token.line = lexer->line; @@ -2562,7 +2569,7 @@ /* Use the same buffer if possible. */ if (lexer->token.text) { if (text && length < lexer->size) { - strcpy(lexer->token.text, text); + memcpy(lexer->token.text, text, length); lexer->token.length = length; return; } @@ -2572,10 +2579,11 @@ } /* Need to extend the buffer. */ - if (text) { - lexer->token.text = strdup(text); + if (length > 0) { + lexer->token.text = (char*)malloc(length); + memcpy(lexer->token.text, text, length); lexer->token.length = length; - lexer->size = length + 1; + lexer->size = length; } else { lexer->token.length = 0; } @@ -2583,15 +2591,15 @@ /*--------------------------------------------------------------------------*/ static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, - int length) + size_t length) { char* temp; - int newSize; + size_t newSize; /* If the appended text will fit in the buffer, do not reallocate. */ - newSize = lexer->token.length + length + 1; + newSize = lexer->token.length + length; if (lexer->token.text && newSize <= lexer->size) { - strcpy(lexer->token.text + lexer->token.length, text); + memcpy(lexer->token.text + lexer->token.length, text, length); lexer->token.length += length; return; } @@ -2603,7 +2611,6 @@ free(lexer->token.text); } memcpy(temp + lexer->token.length, text, length); - temp[lexer->token.length + length] = 0; lexer->token.text = temp; lexer->token.length += length; lexer->size = newSize; @@ -2643,9 +2650,9 @@ lexer->cr = cr; return n; } else if (lexer->string_left) { - int length = lexer->string_left; - if ((int)bufferSize < length) { - length = (int)bufferSize; + size_t length = lexer->string_left; + if (bufferSize < length) { + length = bufferSize; } memcpy(buffer, lexer->string_position, length); lexer->string_position += length; @@ -2708,6 +2715,7 @@ static cmListFileLexer_BOM cmListFileLexer_ReadBOM(FILE* f) { unsigned char b[2]; + size_t n; if (fread(b, 1, 2, f) == 2) { if (b[0] == 0xEF && b[1] == 0xBB) { if (fread(b, 1, 1, f) == 1 && b[0] == 0xBF) { @@ -2723,13 +2731,21 @@ } else if (b[0] == 0xFF && b[1] == 0xFE) { fpos_t p; fgetpos(f, &p); - if (fread(b, 1, 2, f) == 2 && b[0] == 0 && b[1] == 0) { + n = fread(b, 1, 2, f); + if (n == 2 && b[0] == 0 && b[1] == 0) { return cmListFileLexer_BOM_UTF32LE; } if (fsetpos(f, &p) != 0) { return cmListFileLexer_BOM_Broken; } - return cmListFileLexer_BOM_UTF16LE; + /* In case we were able to subsequently read only a single byte out of two + (i.e., three in total), the file must be corrupt and the BOM cannot + represent a UTF-16-LE BOM since each code unit must consist of two + bytes. This avoids incorrectly detecting an incomplete UTF-32-LE BOM as + UTF-16-LE input. */ + if (n % 2 == 0) { + return cmListFileLexer_BOM_UTF16LE; + } } } if (fseek(f, 0, SEEK_SET) != 0) { @@ -2765,15 +2781,18 @@ } /*--------------------------------------------------------------------------*/ -int cmListFileLexer_SetString(cmListFileLexer* lexer, const char* text) +int cmListFileLexer_SetString(cmListFileLexer* lexer, char const* text, + size_t length) { int result = 1; cmListFileLexerDestroy(lexer); - if (text) { - int length = (int)strlen(text); - lexer->string_buffer = (char*)malloc(length + 1); + /* text might be not NULL while length is 0. However, on some platforms + malloc(0) will return NULL. To avoid signaling an error to the caller in + such cases, ensure nonzero length. */ + if (length > 0) { + lexer->string_buffer = (char*)malloc(length); if (lexer->string_buffer) { - strcpy(lexer->string_buffer, text); + memcpy(lexer->string_buffer, text, length); lexer->string_position = lexer->string_buffer; lexer->string_left = length; } else {
diff --git a/Source/LexerParser/cmListFileLexer.in.l b/Source/LexerParser/cmListFileLexer.in.l index 623a36b..4ae18aa 100644 --- a/Source/LexerParser/cmListFileLexer.in.l +++ b/Source/LexerParser/cmListFileLexer.in.l
@@ -36,19 +36,19 @@ int comment; int line; int column; - int size; + size_t size; FILE* file; size_t cr; char* string_buffer; char* string_position; - int string_left; + size_t string_left; yyscan_t scanner; }; static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, - int length); + size_t length); static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, - int length); + size_t length); static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, size_t bufferSize); static void cmListFileLexerInit(cmListFileLexer* lexer); @@ -74,7 +74,7 @@ %x COMMENT MAKEVAR \$\([A-Za-z0-9_]*\) -UNQUOTED ([^ \0\t\r\n\(\)#\\\"[=]|\\[^\0\n]) +UNQUOTED ([^ \t\r\n\(\)#\\\"[=]|\\[^\n]) LEGACY {MAKEVAR}|{UNQUOTED}|\"({MAKEVAR}|{UNQUOTED}|[ \t[=])*\" %% @@ -90,15 +90,17 @@ #?\[=*\[\n? { const char* bracket = yytext; + size_t length = yyleng; lexer->comment = yytext[0] == '#'; if (lexer->comment) { lexer->token.type = cmListFileLexer_Token_CommentBracket; bracket += 1; + --length; } else { lexer->token.type = cmListFileLexer_Token_ArgumentBracket; } cmListFileLexerSetToken(lexer, "", 0); - lexer->bracket = strchr(bracket+1, '[') - bracket; + lexer->bracket = (char*)memchr(bracket + 1, '[', length - 1) - bracket; if (yytext[yyleng-1] == '\n') { ++lexer->line; lexer->column = 1; @@ -113,7 +115,10 @@ BEGIN(COMMENT); } -<COMMENT>[^\0\n]* { +<COMMENT>[^\n]* { + if (memchr(yytext, '\0', yyleng) != NULL) { + lexer->token.type = cmListFileLexer_Token_BadCharacter; + } lexer->column += yyleng; } @@ -151,12 +156,14 @@ lexer->column += yyleng; /* Erase the partial bracket from the token. */ lexer->token.length -= lexer->bracket; - lexer->token.text[lexer->token.length] = 0; BEGIN(INITIAL); return 1; } -<BRACKET>([^]\0\n])+ { +<BRACKET>([^]\n])+ { + if (memchr(yytext, '\0', yyleng) != NULL) { + lexer->token.type = cmListFileLexer_Token_BadCharacter; + } cmListFileLexerAppend(lexer, yytext, yyleng); lexer->column += yyleng; } @@ -168,7 +175,10 @@ BEGIN(BRACKET); } -<BRACKET,BRACKETEND>[^\0\n] { +<BRACKET,BRACKETEND>[^\n] { + if (memchr(yytext, '\0', yyleng) != NULL) { + lexer->token.type = cmListFileLexer_Token_BadCharacter; + } cmListFileLexerAppend(lexer, yytext, yyleng); lexer->column += yyleng; BEGIN(BRACKET); @@ -181,7 +191,12 @@ } ({UNQUOTED}|=|\[=*{UNQUOTED})({UNQUOTED}|[[=])* { - lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + if (memchr(yytext, '\0', yyleng) != NULL) { + /* An unquoted argument that contains a null character. */ + lexer->token.type = cmListFileLexer_Token_BadCharacter; + } else { + lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + } cmListFileLexerSetToken(lexer, yytext, yyleng); lexer->column += yyleng; return 1; @@ -208,7 +223,10 @@ BEGIN(STRING); } -<STRING>([^\\\0\n\"]|\\[^\0\n])+ { +<STRING>([^\\\n\"]|\\[^\n])+ { + if (memchr(yytext, '\0', yyleng) != NULL) { + lexer->token.type = cmListFileLexer_Token_BadCharacter; + } cmListFileLexerAppend(lexer, yytext, yyleng); lexer->column += yyleng; } @@ -231,7 +249,10 @@ return 1; } -<STRING>[^\0\n] { +<STRING>[^\n] { + if (memchr(yytext, '\0', yyleng) != NULL) { + lexer->token.type = cmListFileLexer_Token_BadCharacter; + } cmListFileLexerAppend(lexer, yytext, yyleng); lexer->column += yyleng; } @@ -266,7 +287,7 @@ /*--------------------------------------------------------------------------*/ static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, - int length) + size_t length) { /* Set the token line and column number. */ lexer->token.line = lexer->line; @@ -275,7 +296,7 @@ /* Use the same buffer if possible. */ if (lexer->token.text) { if (text && length < lexer->size) { - strcpy(lexer->token.text, text); + memcpy(lexer->token.text, text, length); lexer->token.length = length; return; } @@ -285,10 +306,11 @@ } /* Need to extend the buffer. */ - if (text) { - lexer->token.text = strdup(text); + if (length > 0) { + lexer->token.text = (char*)malloc(length); + memcpy(lexer->token.text, text, length); lexer->token.length = length; - lexer->size = length + 1; + lexer->size = length; } else { lexer->token.length = 0; } @@ -296,15 +318,15 @@ /*--------------------------------------------------------------------------*/ static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, - int length) + size_t length) { char* temp; - int newSize; + size_t newSize; /* If the appended text will fit in the buffer, do not reallocate. */ - newSize = lexer->token.length + length + 1; + newSize = lexer->token.length + length; if (lexer->token.text && newSize <= lexer->size) { - strcpy(lexer->token.text + lexer->token.length, text); + memcpy(lexer->token.text + lexer->token.length, text, length); lexer->token.length += length; return; } @@ -316,7 +338,6 @@ free(lexer->token.text); } memcpy(temp + lexer->token.length, text, length); - temp[lexer->token.length + length] = 0; lexer->token.text = temp; lexer->token.length += length; lexer->size = newSize; @@ -356,9 +377,9 @@ lexer->cr = cr; return n; } else if (lexer->string_left) { - int length = lexer->string_left; - if ((int)bufferSize < length) { - length = (int)bufferSize; + size_t length = lexer->string_left; + if (bufferSize < length) { + length = bufferSize; } memcpy(buffer, lexer->string_position, length); lexer->string_position += length; @@ -421,6 +442,7 @@ static cmListFileLexer_BOM cmListFileLexer_ReadBOM(FILE* f) { unsigned char b[2]; + size_t n; if (fread(b, 1, 2, f) == 2) { if (b[0] == 0xEF && b[1] == 0xBB) { if (fread(b, 1, 1, f) == 1 && b[0] == 0xBF) { @@ -436,13 +458,21 @@ } else if (b[0] == 0xFF && b[1] == 0xFE) { fpos_t p; fgetpos(f, &p); - if (fread(b, 1, 2, f) == 2 && b[0] == 0 && b[1] == 0) { + n = fread(b, 1, 2, f); + if (n == 2 && b[0] == 0 && b[1] == 0) { return cmListFileLexer_BOM_UTF32LE; } if (fsetpos(f, &p) != 0) { return cmListFileLexer_BOM_Broken; } - return cmListFileLexer_BOM_UTF16LE; + /* In case we were able to subsequently read only a single byte out of two + (i.e., three in total), the file must be corrupt and the BOM cannot + represent a UTF-16-LE BOM since each code unit must consist of two + bytes. This avoids incorrectly detecting an incomplete UTF-32-LE BOM as + UTF-16-LE input. */ + if (n % 2 == 0) { + return cmListFileLexer_BOM_UTF16LE; + } } } if (fseek(f, 0, SEEK_SET) != 0) { @@ -478,15 +508,18 @@ } /*--------------------------------------------------------------------------*/ -int cmListFileLexer_SetString(cmListFileLexer* lexer, const char* text) +int cmListFileLexer_SetString(cmListFileLexer* lexer, char const* text, + size_t length) { int result = 1; cmListFileLexerDestroy(lexer); - if (text) { - int length = (int)strlen(text); - lexer->string_buffer = (char*)malloc(length + 1); + /* text might be not NULL while length is 0. However, on some platforms + malloc(0) will return NULL. To avoid signaling an error to the caller in + such cases, ensure nonzero length. */ + if (length > 0) { + lexer->string_buffer = (char*)malloc(length); if (lexer->string_buffer) { - strcpy(lexer->string_buffer, text); + memcpy(lexer->string_buffer, text, length); lexer->string_position = lexer->string_buffer; lexer->string_left = length; } else {
diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx index 51b7c30..642cc91 100644 --- a/Source/cmCMakeHostSystemInformationCommand.cxx +++ b/Source/cmCMakeHostSystemInformationCommand.cxx
@@ -498,7 +498,7 @@ std::string const& key) { auto* const gg = status.GetMakefile().GetGlobalGenerator(); - for (auto vs : { 15, 16, 17 }) { + for (auto vs : { 15, 16, 17, 18 }) { if (key == cmStrCat("VS_"_s, vs, "_DIR"_s)) { std::string value; // If generating for the VS nn IDE, use the same instance.
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index f6c4b14..29ff305 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx
@@ -724,8 +724,8 @@ this->SetTimeLimit(mf.GetDefinition("CTEST_TIME_LIMIT")); this->SetCMakeVariables(mf); std::vector<cmListFileArgument> args{ - cmListFileArgument("RETURN_VALUE", cmListFileArgument::Unquoted, 0), - cmListFileArgument("return_value", cmListFileArgument::Unquoted, 0), + cmListFileArgument("RETURN_VALUE"_s, cmListFileArgument::Unquoted, 0), + cmListFileArgument("return_value"_s, cmListFileArgument::Unquoted, 0), }; if (this->Impl->Parts[PartStart]) { @@ -843,12 +843,12 @@ auto const func = cmListFileFunction( "ctest_submit", 0, 0, { - cmListFileArgument("RETRY_COUNT", cmListFileArgument::Unquoted, 0), + cmListFileArgument("RETRY_COUNT"_s, cmListFileArgument::Unquoted, 0), cmListFileArgument(count, cmListFileArgument::Quoted, 0), - cmListFileArgument("RETRY_DELAY", cmListFileArgument::Unquoted, 0), + cmListFileArgument("RETRY_DELAY"_s, cmListFileArgument::Unquoted, 0), cmListFileArgument(delay, cmListFileArgument::Quoted, 0), - cmListFileArgument("RETURN_VALUE", cmListFileArgument::Unquoted, 0), - cmListFileArgument("return_value", cmListFileArgument::Unquoted, 0), + cmListFileArgument("RETURN_VALUE"_s, cmListFileArgument::Unquoted, 0), + cmListFileArgument("return_value"_s, cmListFileArgument::Unquoted, 0), }); auto status = cmExecutionStatus(mf); if (!mf.ExecuteCommand(func, status) ||
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 721f29f..eab2ad3 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx
@@ -1095,6 +1095,7 @@ vars.emplace("CMAKE_MSVC_RUNTIME_CHECKS"_s); vars.emplace("CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS"_s); vars.emplace("CMAKE_VS_USE_DEBUG_LIBRARIES"_s); + vars.emplace("CMAKE_CXX_STDLIB_MODULES_JSON"_s); if (cmValue varListStr = this->Makefile->GetDefinition( kCMAKE_TRY_COMPILE_PLATFORM_VARIABLES)) {
diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx index ea644d9..15d3aa5 100644 --- a/Source/cmDocumentationFormatter.cxx +++ b/Source/cmDocumentationFormatter.cxx
@@ -80,7 +80,7 @@ } } // anonymous namespace -std::string cmDocumentationFormatter::Format(std::string text) const +std::string cmDocumentationFormatter::Format(cm::string_view text) const { // Exit early on empty text if (text.empty()) { @@ -107,9 +107,8 @@ ) // clang-format on { auto const isLastLine = end == std::string::npos; - auto const line = isLastLine - ? cm::string_view{ text.c_str() + start } - : cm::string_view{ text.c_str() + start, end - start }; + auto const line = + isLastLine ? text.substr(start) : text.substr(start, end - start); if (!line.empty() && line.front() == ' ') { // Preformatted lines go as is w/ a leading padding
diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h index 22b9c47..780f193 100644 --- a/Source/cmDocumentationFormatter.h +++ b/Source/cmDocumentationFormatter.h
@@ -8,13 +8,15 @@ #include <iosfwd> #include <string> +#include <cm/string_view> + class cmDocumentationSection; /** Print documentation in a simple text format. */ class cmDocumentationFormatter { public: - std::string Format(std::string text) const; + std::string Format(cm::string_view text) const; void PrintSection(std::ostream& os, cmDocumentationSection const& section); void PrintFormatted(std::ostream& os, std::string const& text) const {
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index adabf40..c5af352 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx
@@ -1171,7 +1171,7 @@ } std::vector<cmListFileArgument> listFileArgs(argsForProvider.size() + 1); listFileArgs[0] = - cmListFileArgument("FIND_PACKAGE", cmListFileArgument::Unquoted, 0); + cmListFileArgument("FIND_PACKAGE"_s, cmListFileArgument::Unquoted, 0); std::transform(argsForProvider.begin(), argsForProvider.end(), listFileArgs.begin() + 1, [](std::string const& arg) { return cmListFileArgument(arg,
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 412aa04..d395599 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx
@@ -1444,6 +1444,7 @@ if (cmValue v = this->CMakeInstance->GetCacheDefinition( "CMAKE_INTERMEDIATE_DIR_STRATEGY")) { + this->GetCMakeInstance()->MarkCliAsUsed("CMAKE_INTERMEDIATE_DIR_STRATEGY"); if (*v == "FULL") { this->IntDirStrategy = IntermediateDirStrategy::Full; } else if (*v == "SHORT") { @@ -1457,6 +1458,8 @@ } if (cmValue v = this->CMakeInstance->GetCacheDefinition( "CMAKE_AUTOGEN_INTERMEDIATE_DIR_STRATEGY")) { + this->GetCMakeInstance()->MarkCliAsUsed( + "CMAKE_AUTOGEN_INTERMEDIATE_DIR_STRATEGY"); if (*v == "FULL") { this->QtAutogenIntDirStrategy = IntermediateDirStrategy::Full; } else if (*v == "SHORT") {
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 70003fb..1598956 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -1275,6 +1275,8 @@ return "16.0"; case cmGlobalVisualStudioGenerator::VSVersion::VS17: return "17.0"; + case cmGlobalVisualStudioGenerator::VSVersion::VS18: + return "18.0"; } return ""; }
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index a5ed4c9..26ff741 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -66,16 +66,6 @@ this->WriteSLNFooter(fout); } -void cmGlobalVisualStudio71Generator::WriteSolutionConfigurations( - std::ostream& fout, std::vector<std::string> const& configs) const -{ - fout << "\tGlobalSection(SolutionConfiguration) = preSolution\n"; - for (std::string const& i : configs) { - fout << "\t\t" << i << " = " << i << '\n'; - } - fout << "\tEndGlobalSection\n"; -} - // Write a dsp file into the SLN file, // Note, that dependencies from executables to // the libraries it uses are also done here
diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h index 35d4378..70fa64c 100644 --- a/Source/cmGlobalVisualStudio71Generator.h +++ b/Source/cmGlobalVisualStudio71Generator.h
@@ -32,7 +32,7 @@ OrderedTargetDependSet const& orderedProjectTargets, VSFolders const& vsFolders) const override; virtual void WriteSolutionConfigurations( - std::ostream& fout, std::vector<std::string> const& configs) const; + std::ostream& fout, std::vector<std::string> const& configs) const = 0; void WriteProject(std::ostream& fout, std::string const& name, std::string const& path, cmGeneratorTarget const* t) const override;
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index dddd6d0..8c7612e 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -115,6 +115,8 @@ return "16.0"; case cmGlobalVisualStudioGenerator::VSVersion::VS17: return "17.0"; + case cmGlobalVisualStudioGenerator::VSVersion::VS18: + return "18.0"; } return ""; } @@ -138,29 +140,22 @@ case cmGlobalVisualStudioGenerator::VSVersion::VS15: // Visual Studio 15 writes .sln format 12.00 fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; - if (this->ExpressEdition) { - fout << "# Visual Studio Express 15 for Windows Desktop\n"; - } else { - fout << "# Visual Studio 15\n"; - } + fout << "# Visual Studio 15\n"; break; case cmGlobalVisualStudioGenerator::VSVersion::VS16: // Visual Studio 16 writes .sln format 12.00 fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; - if (this->ExpressEdition) { - fout << "# Visual Studio Express 16 for Windows Desktop\n"; - } else { - fout << "# Visual Studio Version 16\n"; - } + fout << "# Visual Studio Version 16\n"; break; case cmGlobalVisualStudioGenerator::VSVersion::VS17: // Visual Studio 17 writes .sln format 12.00 fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; - if (this->ExpressEdition) { - fout << "# Visual Studio Express 17 for Windows Desktop\n"; - } else { - fout << "# Visual Studio Version 17\n"; - } + fout << "# Visual Studio Version 17\n"; + break; + case cmGlobalVisualStudioGenerator::VSVersion::VS18: + // Visual Studio 18 writes .sln format 12.00 + fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; + fout << "# Visual Studio Version 18\n"; break; } }
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 364ab3c..344295c 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -37,7 +37,8 @@ VS14 = 140, VS15 = 150, VS16 = 160, - VS17 = 170 + VS17 = 170, + VS18 = 180, }; ~cmGlobalVisualStudioGenerator() override;
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx index 4ba1c5a..2384757 100644 --- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx +++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
@@ -133,6 +133,8 @@ return 16; case cmGlobalVisualStudioGenerator::VSVersion::VS17: return 17; + case cmGlobalVisualStudioGenerator::VSVersion::VS18: + return 18; } return 0; } @@ -149,6 +151,8 @@ return "v142"; case cmGlobalVisualStudioGenerator::VSVersion::VS17: return "v143"; + case cmGlobalVisualStudioGenerator::VSVersion::VS18: + return "v145"; } return ""; } @@ -165,6 +169,8 @@ return "16"; case cmGlobalVisualStudioGenerator::VSVersion::VS17: return "17"; + case cmGlobalVisualStudioGenerator::VSVersion::VS18: + return "18"; } return ""; } @@ -178,6 +184,7 @@ case cmGlobalVisualStudioGenerator::VSVersion::VS15: case cmGlobalVisualStudioGenerator::VSVersion::VS16: case cmGlobalVisualStudioGenerator::VSVersion::VS17: + case cmGlobalVisualStudioGenerator::VSVersion::VS18: return "Clang_5_0"; } return ""; @@ -258,6 +265,7 @@ static char const vs16generatorName[] = "Visual Studio 16 2019"; static char const vs17generatorName[] = "Visual Studio 17 2022"; +static char const vs18generatorName[] = "Visual Studio 18 2026"; // Map generator name without year to name with year. static char const* cmVS16GenName(std::string const& name, std::string& genName) @@ -288,6 +296,20 @@ return p; } +static char const* cmVS18GenName(std::string const& name, std::string& genName) +{ + if (strncmp(name.c_str(), vs18generatorName, + sizeof(vs18generatorName) - 6) != 0) { + return nullptr; + } + char const* p = name.c_str() + sizeof(vs18generatorName) - 6; + if (cmHasLiteralPrefix(p, " 2026")) { + p += 5; + } + genName = cmStrCat(vs18generatorName, p); + return p; +} + class cmGlobalVisualStudioVersionedGenerator::Factory16 : public cmGlobalGeneratorFactory { @@ -408,6 +430,66 @@ return std::unique_ptr<cmGlobalGeneratorFactory>(new Factory17); } +class cmGlobalVisualStudioVersionedGenerator::Factory18 + : public cmGlobalGeneratorFactory +{ +public: + std::unique_ptr<cmGlobalGenerator> CreateGlobalGenerator( + std::string const& name, cmake* cm) const override + { + std::string genName; + char const* p = cmVS18GenName(name, genName); + if (!p) { + return std::unique_ptr<cmGlobalGenerator>(); + } + if (!*p) { + return std::unique_ptr<cmGlobalGenerator>( + new cmGlobalVisualStudioVersionedGenerator( + cmGlobalVisualStudioGenerator::VSVersion::VS18, cm, genName)); + } + return std::unique_ptr<cmGlobalGenerator>(); + } + + cmDocumentationEntry GetDocumentation() const override + { + return { std::string(vs18generatorName), + "Generates Visual Studio 2026 project files. " + "Use -A option to specify architecture." }; + } + + std::vector<std::string> GetGeneratorNames() const override + { + std::vector<std::string> names; + names.push_back(vs18generatorName); + return names; + } + + bool SupportsToolset() const override { return true; } + bool SupportsPlatform() const override { return true; } + + std::vector<std::string> GetKnownPlatforms() const override + { + std::vector<std::string> platforms; + platforms.emplace_back("x64"); + platforms.emplace_back("Win32"); + platforms.emplace_back("ARM"); + platforms.emplace_back("ARM64"); + platforms.emplace_back("ARM64EC"); + return platforms; + } + + std::string GetDefaultPlatformName() const override + { + return VSHostPlatformName(); + } +}; + +std::unique_ptr<cmGlobalGeneratorFactory> +cmGlobalVisualStudioVersionedGenerator::NewFactory18() +{ + return std::unique_ptr<cmGlobalGeneratorFactory>(new Factory18); +} + cmGlobalVisualStudioVersionedGenerator::cmGlobalVisualStudioVersionedGenerator( VSVersion version, cmake* cm, std::string const& name) : cmGlobalVisualStudio14Generator(cm, name) @@ -455,6 +537,11 @@ return genName == this->GetName(); } break; + case cmGlobalVisualStudioGenerator::VSVersion::VS18: + if (cmVS18GenName(name, genName)) { + return genName == this->GetName(); + } + break; } return false; } @@ -709,6 +796,7 @@ case cmGlobalVisualStudioGenerator::VSVersion::VS15: case cmGlobalVisualStudioGenerator::VSVersion::VS16: case cmGlobalVisualStudioGenerator::VSVersion::VS17: + case cmGlobalVisualStudioGenerator::VSVersion::VS18: return "3.0"; } return "";
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.h b/Source/cmGlobalVisualStudioVersionedGenerator.h index b597965..bb1def3 100644 --- a/Source/cmGlobalVisualStudioVersionedGenerator.h +++ b/Source/cmGlobalVisualStudioVersionedGenerator.h
@@ -26,6 +26,7 @@ static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory15(); static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory16(); static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory17(); + static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory18(); bool MatchesGeneratorName(std::string const& name) const override; @@ -89,6 +90,8 @@ friend class Factory16; class Factory17; friend class Factory17; + class Factory18; + friend class Factory18; mutable cmVSSetupAPIHelper vsSetupAPIHelper; bool ParseGeneratorInstance(std::string const& is, cmMakefile* mf);
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 4de723e..1f2341a 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx
@@ -11,6 +11,8 @@ # include <cmsys/Encoding.hxx> #endif +#include <cm/string_view> + #include "cmList.h" #include "cmListFileLexer.h" #include "cmMessageType.h" @@ -51,11 +53,11 @@ cmListFileParser& operator=(cmListFileParser const&) = delete; bool ParseFile(char const* filename); - bool ParseString(char const* str, char const* virtual_filename); + bool ParseString(cm::string_view str, char const* virtual_filename); private: bool Parse(); - bool ParseFunction(char const* name, long line); + bool ParseFunction(cm::string_view name, long line); bool AddArgument(cmListFileLexer_Token* token, cmListFileArgument::Delimiter delim); void IssueFileOpenError(std::string const& text) const; @@ -142,12 +144,13 @@ return this->Parse(); } -bool cmListFileParser::ParseString(char const* str, +bool cmListFileParser::ParseString(cm::string_view str, char const* virtual_filename) { this->FileName = virtual_filename; - if (!cmListFileLexer_SetString(this->Lexer.get(), str)) { + if (!cmListFileLexer_SetString(this->Lexer.get(), str.data(), + str.length())) { this->IssueFileOpenError("cmListFileCache: cannot allocate buffer."); return false; } @@ -170,7 +173,8 @@ } else if (token->type == cmListFileLexer_Token_Identifier) { if (haveNewline) { haveNewline = false; - if (this->ParseFunction(token->text, token->line)) { + if (this->ParseFunction(cm::string_view(token->text, token->length), + token->line)) { this->ListFile->Functions.emplace_back( std::move(this->FunctionName), this->FunctionLine, this->FunctionLineEnd, std::move(this->FunctionArguments)); @@ -181,7 +185,7 @@ auto error = cmStrCat( "Parse error. Expected a newline, got ", cmListFileLexer_GetTypeAsString(this->Lexer.get(), token->type), - " with text \"", token->text, "\"."); + " with text \"", cm::string_view(token->text, token->length), "\"."); this->IssueError(error); return false; } @@ -189,7 +193,7 @@ auto error = cmStrCat( "Parse error. Expected a command name, got ", cmListFileLexer_GetTypeAsString(this->Lexer.get(), token->type), - " with text \"", token->text, "\"."); + " with text \"", cm::string_view(token->text, token->length), "\"."); this->IssueError(error); return false; } @@ -208,10 +212,10 @@ return true; } -bool cmListFileParser::ParseFunction(char const* name, long line) +bool cmListFileParser::ParseFunction(cm::string_view name, long line) { // Ininitialize a new function call. - this->FunctionName = name; + this->FunctionName.assign(name.data(), name.size()); this->FunctionLine = line; // Command name has already been parsed. Read the left paren. @@ -225,10 +229,10 @@ return false; } if (token->type != cmListFileLexer_Token_ParenLeft) { - auto error = - cmStrCat("Parse error. Expected \"(\", got ", - cmListFileLexer_GetTypeAsString(this->Lexer.get(), token->type), - " with text \"", token->text, "\"."); + auto error = cmStrCat( + "Parse error. Expected \"(\", got ", + cmListFileLexer_GetTypeAsString(this->Lexer.get(), token->type), + " with text \"", cm::string_view(token->text, token->length), "\"."); this->IssueError(error); return false; } @@ -283,7 +287,7 @@ "Parse error. Function missing ending \")\". " "Instead found ", cmListFileLexer_GetTypeAsString(this->Lexer.get(), token->type), - " with text \"", token->text, "\"."); + " with text \"", cm::string_view(token->text, token->length), "\"."); this->IssueError(error); return false; } @@ -305,7 +309,8 @@ bool cmListFileParser::AddArgument(cmListFileLexer_Token* token, cmListFileArgument::Delimiter delim) { - this->FunctionArguments.emplace_back(token->text, delim, token->line); + this->FunctionArguments.emplace_back( + cm::string_view(token->text, token->length), delim, token->line); if (this->Separation == SeparationOkay) { return true; } @@ -442,7 +447,7 @@ return !parseError; } -bool cmListFile::ParseString(char const* str, char const* virtual_filename, +bool cmListFile::ParseString(cm::string_view str, char const* virtual_filename, cmMessenger* messenger, cmListFileBacktrace const& lfbt) {
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index fe2ee08..32093d2 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h
@@ -11,6 +11,7 @@ #include <vector> #include <cm/optional> +#include <cm/string_view> #include "cmList.h" #include "cmStack.h" @@ -34,8 +35,8 @@ Bracket }; cmListFileArgument() = default; - cmListFileArgument(std::string v, Delimiter d, long line) - : Value(std::move(v)) + cmListFileArgument(cm::string_view v, Delimiter d, long line) + : Value(v.data(), v.size()) , Delim(d) , Line(line) { @@ -241,7 +242,7 @@ bool ParseFile(char const* path, cmMessenger* messenger, cmListFileBacktrace const& lfbt); - bool ParseString(char const* str, char const* virtual_filename, + bool ParseString(cm::string_view str, char const* virtual_filename, cmMessenger* messenger, cmListFileBacktrace const& lfbt); std::vector<cmListFileFunction> Functions;
diff --git a/Source/cmListFileLexer.h b/Source/cmListFileLexer.h index 5d56f02..f410056 100644 --- a/Source/cmListFileLexer.h +++ b/Source/cmListFileLexer.h
@@ -2,6 +2,8 @@ file LICENSE.rst or https://cmake.org/licensing for details. */ #pragma once +#include <stddef.h> + #ifdef __cplusplus extern "C" { #endif @@ -30,7 +32,7 @@ { cmListFileLexer_Type type; char* text; - int length; + size_t length; int line; int column; }; @@ -55,7 +57,7 @@ cmListFileLexer* cmListFileLexer_New(void); int cmListFileLexer_SetFileName(cmListFileLexer*, char const*, cmListFileLexer_BOM* bom); -int cmListFileLexer_SetString(cmListFileLexer*, char const*); +int cmListFileLexer_SetString(cmListFileLexer*, char const*, size_t); cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer*); long cmListFileLexer_GetCurrentLine(cmListFileLexer*); long cmListFileLexer_GetCurrentColumn(cmListFileLexer*);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 081e81e..e58b303 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx
@@ -837,7 +837,7 @@ ListFileScope scope(this, filenametoread); cmListFile listFile; - if (!listFile.ParseString(content.c_str(), virtualFileName.c_str(), + if (!listFile.ParseString(content, virtualFileName.c_str(), this->GetMessenger(), this->Backtrace)) { return false; }
diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx index f5d47c6..c72c7de 100644 --- a/Source/cmVariableWatchCommand.cxx +++ b/Source/cmVariableWatchCommand.cxx
@@ -6,6 +6,8 @@ #include <memory> #include <utility> +#include <cm/string_view> + #include "cmExecutionStatus.h" #include "cmListFileCache.h" #include "cmMakefile.h"
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 6539125..a61a935 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx
@@ -2805,7 +2805,9 @@ "\\Setup\\VC;ProductDir", // ";InstallDir" // }; - if (cmVSSetupAPIHelper(17).IsVSInstalled()) { + if (cmVSSetupAPIHelper(18).IsVSInstalled()) { + found = "Visual Studio 18 2026"; + } else if (cmVSSetupAPIHelper(17).IsVSInstalled()) { found = "Visual Studio 17 2022"; } else if (cmVSSetupAPIHelper(16).IsVSInstalled()) { found = "Visual Studio 16 2019"; @@ -3253,6 +3255,8 @@ #if defined(_WIN32) && !defined(__CYGWIN__) # if !defined(CMAKE_BOOT_MINGW) this->Generators.push_back( + cmGlobalVisualStudioVersionedGenerator::NewFactory18()); + this->Generators.push_back( cmGlobalVisualStudioVersionedGenerator::NewFactory17()); this->Generators.push_back( cmGlobalVisualStudioVersionedGenerator::NewFactory16());
diff --git a/Templates/MSBuild/FlagTables/v145_CL.json b/Templates/MSBuild/FlagTables/v145_CL.json new file mode 100644 index 0000000..2da5fdd --- /dev/null +++ b/Templates/MSBuild/FlagTables/v145_CL.json
@@ -0,0 +1,1701 @@ +[ + { + "name": "DebugInformationFormat", + "switch": "", + "comment": "None", + "value": "None", + "flags": [] + }, + { + "name": "DebugInformationFormat", + "switch": "Z7", + "comment": "C7 compatible", + "value": "OldStyle", + "flags": [] + }, + { + "name": "DebugInformationFormat", + "switch": "Zi", + "comment": "Program Database", + "value": "ProgramDatabase", + "flags": [] + }, + { + "name": "DebugInformationFormat", + "switch": "ZI", + "comment": "Program Database for Edit And Continue", + "value": "EditAndContinue", + "flags": [] + }, + { + "name": "CompileAsManaged", + "switch": "", + "comment": "No Common Language RunTime Support", + "value": "false", + "flags": [] + }, + { + "name": "CompileAsManaged", + "switch": "clr", + "comment": "Common Language RunTime Support", + "value": "true", + "flags": [] + }, + { + "name": "CompileAsManaged", + "switch": "clr:pure", + "comment": "Pure MSIL Common Language RunTime Support", + "value": "Pure", + "flags": [] + }, + { + "name": "CompileAsManaged", + "switch": "clr:safe", + "comment": "Safe MSIL Common Language RunTime Support", + "value": "Safe", + "flags": [] + }, + { + "name": "CLRSupport", + "switch": "clr:netcore", + "comment": ".NET Core Runtime Support", + "value": "NetCore", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "W0", + "comment": "Turn Off All Warnings", + "value": "TurnOffAllWarnings", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "W1", + "comment": "Level1", + "value": "Level1", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "W2", + "comment": "Level2", + "value": "Level2", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "W3", + "comment": "Level3", + "value": "Level3", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "W4", + "comment": "Level4", + "value": "Level4", + "flags": [] + }, + { + "name": "WarningLevel", + "switch": "Wall", + "comment": "EnableAllWarnings", + "value": "EnableAllWarnings", + "flags": [] + }, + { + "name": "DiagnosticsFormat", + "switch": "diagnostics:caret", + "comment": "Caret", + "value": "Caret", + "flags": [] + }, + { + "name": "DiagnosticsFormat", + "switch": "diagnostics:column", + "comment": "Column Info", + "value": "Column", + "flags": [] + }, + { + "name": "DiagnosticsFormat", + "switch": "diagnostics:classic", + "comment": "Classic", + "value": "Classic", + "flags": [] + }, + { + "name": "Optimization", + "switch": "", + "comment": "Custom", + "value": "Custom", + "flags": [] + }, + { + "name": "Optimization", + "switch": "Od", + "comment": "Disabled", + "value": "Disabled", + "flags": [] + }, + { + "name": "Optimization", + "switch": "O1", + "comment": "Maximum Optimization (Favor Size)", + "value": "MinSpace", + "flags": [] + }, + { + "name": "Optimization", + "switch": "O2", + "comment": "Maximum Optimization (Favor Speed)", + "value": "MaxSpeed", + "flags": [] + }, + { + "name": "Optimization", + "switch": "Ox", + "comment": "Optimizations (Favor Speed)", + "value": "Full", + "flags": [] + }, + { + "name": "InlineFunctionExpansion", + "switch": "", + "comment": "Default", + "value": "Default", + "flags": [] + }, + { + "name": "InlineFunctionExpansion", + "switch": "Ob0", + "comment": "Disabled", + "value": "Disabled", + "flags": [] + }, + { + "name": "InlineFunctionExpansion", + "switch": "Ob1", + "comment": "Only __inline", + "value": "OnlyExplicitInline", + "flags": [] + }, + { + "name": "InlineFunctionExpansion", + "switch": "Ob2", + "comment": "Any Suitable", + "value": "AnySuitable", + "flags": [] + }, + { + "name": "FavorSizeOrSpeed", + "switch": "Os", + "comment": "Favor small code", + "value": "Size", + "flags": [] + }, + { + "name": "FavorSizeOrSpeed", + "switch": "Ot", + "comment": "Favor fast code", + "value": "Speed", + "flags": [] + }, + { + "name": "FavorSizeOrSpeed", + "switch": "", + "comment": "Neither", + "value": "Neither", + "flags": [] + }, + { + "name": "ExceptionHandling", + "switch": "EHa", + "comment": "Yes with SEH Exceptions", + "value": "Async", + "flags": [] + }, + { + "name": "ExceptionHandling", + "switch": "EHsc", + "comment": "Yes", + "value": "Sync", + "flags": [] + }, + { + "name": "ExceptionHandling", + "switch": "EHs", + "comment": "Yes with Extern C functions", + "value": "SyncCThrow", + "flags": [] + }, + { + "name": "ExceptionHandling", + "switch": "", + "comment": "No", + "value": "false", + "flags": [] + }, + { + "name": "BasicRuntimeChecks", + "switch": "RTCs", + "comment": "Stack Frames", + "value": "StackFrameRuntimeCheck", + "flags": [] + }, + { + "name": "BasicRuntimeChecks", + "switch": "RTCu", + "comment": "Uninitialized variables", + "value": "UninitializedLocalUsageCheck", + "flags": [] + }, + { + "name": "BasicRuntimeChecks", + "switch": "RTC1", + "comment": "Both (/RTC1, equiv. to /RTCsu)", + "value": "EnableFastChecks", + "flags": [] + }, + { + "name": "BasicRuntimeChecks", + "switch": "", + "comment": "Default", + "value": "Default", + "flags": [] + }, + { + "name": "RuntimeLibrary", + "switch": "MT", + "comment": "Multi-threaded", + "value": "MultiThreaded", + "flags": [] + }, + { + "name": "RuntimeLibrary", + "switch": "MTd", + "comment": "Multi-threaded Debug", + "value": "MultiThreadedDebug", + "flags": [] + }, + { + "name": "RuntimeLibrary", + "switch": "MD", + "comment": "Multi-threaded DLL", + "value": "MultiThreadedDLL", + "flags": [] + }, + { + "name": "RuntimeLibrary", + "switch": "MDd", + "comment": "Multi-threaded Debug DLL", + "value": "MultiThreadedDebugDLL", + "flags": [] + }, + { + "name": "StructMemberAlignment", + "switch": "Zp1", + "comment": "1 Byte", + "value": "1Byte", + "flags": [] + }, + { + "name": "StructMemberAlignment", + "switch": "Zp2", + "comment": "2 Bytes", + "value": "2Bytes", + "flags": [] + }, + { + "name": "StructMemberAlignment", + "switch": "Zp4", + "comment": "4 Byte", + "value": "4Bytes", + "flags": [] + }, + { + "name": "StructMemberAlignment", + "switch": "Zp8", + "comment": "8 Bytes", + "value": "8Bytes", + "flags": [] + }, + { + "name": "StructMemberAlignment", + "switch": "Zp16", + "comment": "16 Bytes", + "value": "16Bytes", + "flags": [] + }, + { + "name": "StructMemberAlignment", + "switch": "", + "comment": "Default", + "value": "Default", + "flags": [] + }, + { + "name": "BufferSecurityCheck", + "switch": "GS-", + "comment": "Disable Security Check", + "value": "false", + "flags": [] + }, + { + "name": "BufferSecurityCheck", + "switch": "GS", + "comment": "Enable Security Check", + "value": "true", + "flags": [] + }, + { + "name": "ControlFlowGuard", + "switch": "guard:cf", + "comment": "Yes", + "value": "Guard", + "flags": [] + }, + { + "name": "ControlFlowGuard", + "switch": "", + "comment": "No", + "value": "false", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:SSE", + "comment": "Streaming SIMD Extensions (X86)", + "value": "StreamingSIMDExtensions", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:SSE2", + "comment": "Streaming SIMD Extensions 2 (X86)", + "value": "StreamingSIMDExtensions2", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:AVX", + "comment": "Advanced Vector Extensions (X86/X64)", + "value": "AdvancedVectorExtensions", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:AVX2", + "comment": "Advanced Vector Extensions 2 (X86/X64)", + "value": "AdvancedVectorExtensions2", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:AVX512", + "comment": "Advanced Vector Extensions 512 (X86/X64)", + "value": "AdvancedVectorExtensions512", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:AVX10.1", + "comment": "Advanced Vector Extensions AVX10.1 (X86/X64)", + "value": "AdvancedVectorExtensions101", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:AVX10.2", + "comment": "Advanced Vector Extensions AVX10.2 (X86/X64)", + "value": "AdvancedVectorExtensions102", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:ARMv7VE", + "comment": "Virtualization Extensions (ARM)", + "value": "VirtualizationExtensions", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:VFPv4", + "comment": "ARM VFPv4 instructions (ARM)", + "value": "ARMVFPv4Instructions", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:armv8.0", + "comment": "CPU extension requirements ARMv8.0-A (ARM64)", + "value": "CPUExtensionRequirementsARMv80", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:armv8.1", + "comment": "CPU extension requirements ARMv8.1-A (ARM64)", + "value": "CPUExtensionRequirementsARMv81", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:armv8.2", + "comment": "CPU extension requirements ARMv8.2-A (ARM64)", + "value": "CPUExtensionRequirementsARMv82", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:armv8.3", + "comment": "CPU extension requirements ARMv8.3-A (ARM64)", + "value": "CPUExtensionRequirementsARMv83", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:armv8.4", + "comment": "CPU extension requirements ARMv8.4-A (ARM64)", + "value": "CPUExtensionRequirementsARMv84", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:armv8.5", + "comment": "CPU extension requirements ARMv8.5-A (ARM64)", + "value": "CPUExtensionRequirementsARMv85", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:armv8.6", + "comment": "CPU extension requirements ARMv8.6-A (ARM64)", + "value": "CPUExtensionRequirementsARMv86", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:armv8.7", + "comment": "CPU extension requirements ARMv8.7-A (ARM64)", + "value": "CPUExtensionRequirementsARMv87", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:armv8.8", + "comment": "CPU extension requirements ARMv8.8-A (ARM64)", + "value": "CPUExtensionRequirementsARMv88", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:IA32", + "comment": "No Enhanced Instructions", + "value": "NoExtensions", + "flags": [] + }, + { + "name": "EnableEnhancedInstructionSet", + "switch": "arch:NotSet", + "comment": "Not Set", + "value": "NotSet", + "flags": [] + }, + { + "name": "EnableVectorLength", + "switch": "", + "comment": "Not Set", + "value": "NotSet", + "flags": [] + }, + { + "name": "EnableVectorLength", + "switch": "vlen=256", + "comment": "256", + "value": "VectorLength256", + "flags": [] + }, + { + "name": "EnableVectorLength", + "switch": "vlen=512", + "comment": "512", + "value": "VectorLength512", + "flags": [] + }, + { + "name": "FloatingPointModel", + "switch": "fp:precise", + "comment": "Precise", + "value": "Precise", + "flags": [] + }, + { + "name": "FloatingPointModel", + "switch": "fp:strict", + "comment": "Strict", + "value": "Strict", + "flags": [] + }, + { + "name": "FloatingPointModel", + "switch": "fp:fast", + "comment": "Fast", + "value": "Fast", + "flags": [] + }, + { + "name": "FloatingPointModel", + "switch": "", + "comment": "Default", + "value": "Default", + "flags": [] + }, + { + "name": "SpectreMitigation", + "switch": "Qspectre-load-cf", + "comment": "All Control Flow Loads", + "value": "SpectreLoadCF", + "flags": [] + }, + { + "name": "SpectreMitigation", + "switch": "Qspectre-load", + "comment": "All Loads", + "value": "SpectreLoad", + "flags": [] + }, + { + "name": "SpectreMitigation", + "switch": "Qspectre-", + "comment": "Disabled", + "value": "false", + "flags": [] + }, + { + "name": "SpectreMitigation", + "switch": "Qspectre", + "comment": "Enabled", + "value": "Spectre", + "flags": [] + }, + { + "name": "LanguageStandard", + "switch": "", + "comment": "Default (ISO C++14 Standard)", + "value": "Default", + "flags": [] + }, + { + "name": "LanguageStandard", + "switch": "std:c++14", + "comment": "ISO C++14 Standard", + "value": "stdcpp14", + "flags": [] + }, + { + "name": "LanguageStandard", + "switch": "std:c++17", + "comment": "ISO C++17 Standard", + "value": "stdcpp17", + "flags": [] + }, + { + "name": "LanguageStandard", + "switch": "std:c++20", + "comment": "ISO C++20 Standard", + "value": "stdcpp20", + "flags": [] + }, + { + "name": "LanguageStandard", + "switch": "std:c++23preview", + "comment": "Preview - ISO C++23 Standard", + "value": "stdcpp23", + "flags": [] + }, + { + "name": "LanguageStandard", + "switch": "std:c++latest", + "comment": "Preview - Features from the Latest C++ Working Draft", + "value": "stdcpplatest", + "flags": [] + }, + { + "name": "LanguageStandard_C", + "switch": "", + "comment": "Default (Legacy MSVC)", + "value": "Default", + "flags": [] + }, + { + "name": "LanguageStandard_C", + "switch": "std:c11", + "comment": "ISO C11 Standard", + "value": "stdc11", + "flags": [] + }, + { + "name": "LanguageStandard_C", + "switch": "std:c17", + "comment": "ISO C17 (2018) Standard", + "value": "stdc17", + "flags": [] + }, + { + "name": "LanguageStandard_C", + "switch": "std:clatest", + "comment": "Preview - Features from the Latest C Working Draft", + "value": "stdclatest", + "flags": [] + }, + { + "name": "ConformanceMode", + "switch": "", + "comment": "Default", + "value": "Default", + "flags": [] + }, + { + "name": "ConformanceMode", + "switch": "permissive-", + "comment": "Yes", + "value": "true", + "flags": [] + }, + { + "name": "ConformanceMode", + "switch": "permissive", + "comment": "No", + "value": "false", + "flags": [] + }, + { + "name": "PrecompiledHeader", + "switch": "Yc", + "comment": "Create", + "value": "Create", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "PrecompiledHeader", + "switch": "Yu", + "comment": "Use", + "value": "Use", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "PrecompiledHeader", + "switch": "Y-", + "comment": "Not Using Precompiled Headers", + "value": "NotUsing", + "flags": [] + }, + { + "name": "AssemblerOutput", + "switch": "", + "comment": "No Listing", + "value": "NoListing", + "flags": [] + }, + { + "name": "AssemblerOutput", + "switch": "FA", + "comment": "Assembly-Only Listing", + "value": "AssemblyCode", + "flags": [] + }, + { + "name": "AssemblerOutput", + "switch": "FAc", + "comment": "Assembly With Machine Code", + "value": "AssemblyAndMachineCode", + "flags": [] + }, + { + "name": "AssemblerOutput", + "switch": "FAs", + "comment": "Assembly With Source Code", + "value": "AssemblyAndSourceCode", + "flags": [] + }, + { + "name": "AssemblerOutput", + "switch": "FAcs", + "comment": "Assembly, Machine Code and Source", + "value": "All", + "flags": [] + }, + { + "name": "ExternalWarningLevel", + "switch": "external:W0", + "comment": "Turn Off All Warnings", + "value": "TurnOffAllWarnings", + "flags": [] + }, + { + "name": "ExternalWarningLevel", + "switch": "external:W1", + "comment": "Level1", + "value": "Level1", + "flags": [] + }, + { + "name": "ExternalWarningLevel", + "switch": "external:W2", + "comment": "Level2", + "value": "Level2", + "flags": [] + }, + { + "name": "ExternalWarningLevel", + "switch": "external:W3", + "comment": "Level3", + "value": "Level3", + "flags": [] + }, + { + "name": "ExternalWarningLevel", + "switch": "external:W4", + "comment": "Level4", + "value": "Level4", + "flags": [] + }, + { + "name": "ExternalWarningLevel", + "switch": "", + "comment": "Inherit Project Warning Level", + "value": "InheritWarningLevel", + "flags": [] + }, + { + "name": "CallingConvention", + "switch": "Gd", + "comment": "__cdecl", + "value": "Cdecl", + "flags": [] + }, + { + "name": "CallingConvention", + "switch": "Gr", + "comment": "__fastcall", + "value": "FastCall", + "flags": [] + }, + { + "name": "CallingConvention", + "switch": "Gz", + "comment": "__stdcall", + "value": "StdCall", + "flags": [] + }, + { + "name": "CallingConvention", + "switch": "Gv", + "comment": "__vectorcall", + "value": "VectorCall", + "flags": [] + }, + { + "name": "CompileAs", + "switch": "", + "comment": "Default", + "value": "Default", + "flags": [] + }, + { + "name": "CompileAs", + "switch": "TC", + "comment": "Compile as C Code", + "value": "CompileAsC", + "flags": [] + }, + { + "name": "CompileAs", + "switch": "TP", + "comment": "Compile as C++ Code", + "value": "CompileAsCpp", + "flags": [] + }, + { + "name": "ErrorReporting", + "switch": "errorReport:none", + "comment": "Do Not Send Report", + "value": "None", + "flags": [] + }, + { + "name": "ErrorReporting", + "switch": "errorReport:prompt", + "comment": "Prompt Immediately", + "value": "Prompt", + "flags": [] + }, + { + "name": "ErrorReporting", + "switch": "errorReport:queue", + "comment": "Queue For Next Login", + "value": "Queue", + "flags": [] + }, + { + "name": "ErrorReporting", + "switch": "errorReport:send", + "comment": "Send Automatically", + "value": "Send", + "flags": [] + }, + { + "name": "TranslateIncludes", + "switch": "translateInclude", + "comment": "Translate Includes to Imports", + "value": "true", + "flags": [] + }, + { + "name": "SupportJustMyCode", + "switch": "JMC-", + "comment": "Support Just My Code Debugging", + "value": "false", + "flags": [] + }, + { + "name": "SupportJustMyCode", + "switch": "JMC", + "comment": "Support Just My Code Debugging", + "value": "true", + "flags": [] + }, + { + "name": "CompileAsWinRT", + "switch": "ZW", + "comment": "Consume Windows Runtime Extension", + "value": "true", + "flags": [] + }, + { + "name": "WinRTNoStdLib", + "switch": "ZW:nostdlib", + "comment": "No Standard WinRT Libraries", + "value": "true", + "flags": [] + }, + { + "name": "SuppressStartupBanner", + "switch": "nologo", + "comment": "Suppress Startup Banner", + "value": "true", + "flags": [] + }, + { + "name": "TreatWarningAsError", + "switch": "WX-", + "comment": "Treat Warnings As Errors", + "value": "false", + "flags": [] + }, + { + "name": "TreatWarningAsError", + "switch": "WX", + "comment": "Treat Warnings As Errors", + "value": "true", + "flags": [] + }, + { + "name": "SDLCheck", + "switch": "sdl-", + "comment": "SDL checks", + "value": "false", + "flags": [] + }, + { + "name": "SDLCheck", + "switch": "sdl", + "comment": "SDL checks", + "value": "true", + "flags": [] + }, + { + "name": "MultiProcessorCompilation", + "switch": "MP", + "comment": "Multi-processor Compilation", + "value": "true", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "IntrinsicFunctions", + "switch": "Oi", + "comment": "Enable Intrinsic Functions", + "value": "true", + "flags": [] + }, + { + "name": "OmitFramePointers", + "switch": "Oy-", + "comment": "Omit Frame Pointers", + "value": "false", + "flags": [] + }, + { + "name": "OmitFramePointers", + "switch": "Oy", + "comment": "Omit Frame Pointers", + "value": "true", + "flags": [] + }, + { + "name": "EnableFiberSafeOptimizations", + "switch": "GT", + "comment": "Enable Fiber-Safe Optimizations", + "value": "true", + "flags": [] + }, + { + "name": "WholeProgramOptimization", + "switch": "GL", + "comment": "Whole Program Optimization", + "value": "true", + "flags": [] + }, + { + "name": "UndefineAllPreprocessorDefinitions", + "switch": "u", + "comment": "Undefine All Preprocessor Definitions", + "value": "true", + "flags": [] + }, + { + "name": "IgnoreStandardIncludePath", + "switch": "X", + "comment": "Ignore Standard Include Paths", + "value": "true", + "flags": [] + }, + { + "name": "PreprocessToFile", + "switch": "P", + "comment": "Preprocess to a File", + "value": "true", + "flags": [] + }, + { + "name": "PreprocessSuppressLineNumbers", + "switch": "EP", + "comment": "Preprocess Suppress Line Numbers", + "value": "true", + "flags": [] + }, + { + "name": "PreprocessKeepComments", + "switch": "C", + "comment": "Keep Comments", + "value": "true", + "flags": [] + }, + { + "name": "UseStandardPreprocessor", + "switch": "Zc:preprocessor-", + "comment": "Use Standard Conforming Preprocessor", + "value": "false", + "flags": [] + }, + { + "name": "UseStandardPreprocessor", + "switch": "Zc:preprocessor", + "comment": "Use Standard Conforming Preprocessor", + "value": "true", + "flags": [] + }, + { + "name": "StringPooling", + "switch": "GF-", + "comment": "Enable String Pooling", + "value": "false", + "flags": [] + }, + { + "name": "StringPooling", + "switch": "GF", + "comment": "Enable String Pooling", + "value": "true", + "flags": [] + }, + { + "name": "MinimalRebuild", + "switch": "Gm-", + "comment": "Enable Minimal Rebuild", + "value": "false", + "flags": [] + }, + { + "name": "MinimalRebuild", + "switch": "Gm", + "comment": "Enable Minimal Rebuild", + "value": "true", + "flags": [] + }, + { + "name": "SmallerTypeCheck", + "switch": "RTCc", + "comment": "Smaller Type Check", + "value": "true", + "flags": [] + }, + { + "name": "FunctionLevelLinking", + "switch": "Gy-", + "comment": "Enable Function-Level Linking", + "value": "false", + "flags": [] + }, + { + "name": "FunctionLevelLinking", + "switch": "Gy", + "comment": "Enable Function-Level Linking", + "value": "true", + "flags": [] + }, + { + "name": "EnableParallelCodeGeneration", + "switch": "Qpar-", + "comment": "Enable Parallel Code Generation", + "value": "false", + "flags": [] + }, + { + "name": "EnableParallelCodeGeneration", + "switch": "Qpar", + "comment": "Enable Parallel Code Generation", + "value": "true", + "flags": [] + }, + { + "name": "FloatingPointExceptions", + "switch": "fp:except-", + "comment": "Enable Floating Point Exceptions", + "value": "false", + "flags": [] + }, + { + "name": "FloatingPointExceptions", + "switch": "fp:except", + "comment": "Enable Floating Point Exceptions", + "value": "true", + "flags": [] + }, + { + "name": "CreateHotpatchableImage", + "switch": "hotpatch", + "comment": "Create Hotpatchable Image", + "value": "true", + "flags": [] + }, + { + "name": "IntelJCCErratum", + "switch": "QIntel-jcc-erratum", + "comment": "Enable Intel JCC Erratum Mitigation", + "value": "true", + "flags": [] + }, + { + "name": "GuardEHContMetadata", + "switch": "guard:ehcont-", + "comment": "Enable EH Continuation Metadata", + "value": "false", + "flags": [] + }, + { + "name": "GuardEHContMetadata", + "switch": "guard:ehcont", + "comment": "Enable EH Continuation Metadata", + "value": "true", + "flags": [] + }, + { + "name": "GuardSignedReturns", + "switch": "guard:signret-", + "comment": "Enable Signed Returns", + "value": "false", + "flags": [] + }, + { + "name": "GuardSignedReturns", + "switch": "guard:signret", + "comment": "Enable Signed Returns", + "value": "true", + "flags": [] + }, + { + "name": "DisableLanguageExtensions", + "switch": "Za", + "comment": "Disable Language Extensions", + "value": "true", + "flags": [] + }, + { + "name": "TreatWChar_tAsBuiltInType", + "switch": "Zc:wchar_t-", + "comment": "Treat WChar_t As Built in Type", + "value": "false", + "flags": [] + }, + { + "name": "TreatWChar_tAsBuiltInType", + "switch": "Zc:wchar_t", + "comment": "Treat WChar_t As Built in Type", + "value": "true", + "flags": [] + }, + { + "name": "ForceConformanceInForLoopScope", + "switch": "Zc:forScope-", + "comment": "Force Conformance in For Loop Scope", + "value": "false", + "flags": [] + }, + { + "name": "ForceConformanceInForLoopScope", + "switch": "Zc:forScope", + "comment": "Force Conformance in For Loop Scope", + "value": "true", + "flags": [] + }, + { + "name": "RemoveUnreferencedCodeData", + "switch": "Zc:inline-", + "comment": "Remove unreferenced code and data", + "value": "false", + "flags": [] + }, + { + "name": "RemoveUnreferencedCodeData", + "switch": "Zc:inline", + "comment": "Remove unreferenced code and data", + "value": "true", + "flags": [] + }, + { + "name": "EnforceTypeConversionRules", + "switch": "Zc:rvalueCast-", + "comment": "Enforce type conversion rules", + "value": "false", + "flags": [] + }, + { + "name": "EnforceTypeConversionRules", + "switch": "Zc:rvalueCast", + "comment": "Enforce type conversion rules", + "value": "true", + "flags": [] + }, + { + "name": "RuntimeTypeInfo", + "switch": "GR-", + "comment": "Enable Run-Time Type Information", + "value": "false", + "flags": [] + }, + { + "name": "RuntimeTypeInfo", + "switch": "GR", + "comment": "Enable Run-Time Type Information", + "value": "true", + "flags": [] + }, + { + "name": "OpenMPSupport", + "switch": "openmp-", + "comment": "Open MP Support", + "value": "false", + "flags": [] + }, + { + "name": "OpenMPSupport", + "switch": "openmp", + "comment": "Open MP Support", + "value": "true", + "flags": [] + }, + { + "name": "EnableModules", + "switch": "experimental:module", + "comment": "Enable Experimental C++ Standard Library Modules", + "value": "true", + "flags": [] + }, + { + "name": "ExpandAttributedSource", + "switch": "Fx", + "comment": "Expand Attributed Source", + "value": "true", + "flags": [] + }, + { + "name": "UseUnicodeForAssemblerListing", + "switch": "FAu", + "comment": "Use Unicode For Assembler Listing", + "value": "true", + "flags": [] + }, + { + "name": "GenerateModuleDependencies", + "switch": "scanDependencies", + "comment": "Generate Module Dependencies File", + "value": "true", + "flags": [ + "Continue" + ] + }, + { + "name": "GenerateModuleDependencies", + "switch": "sourceDependencies:directives", + "comment": "Generate Module Dependencies File", + "value": "true", + "flags": [ + "Continue" + ] + }, + { + "name": "GenerateXMLDocumentationFiles", + "switch": "doc", + "comment": "Generate XML Documentation Files", + "value": "true", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "GenerateSourceDependencies", + "switch": "sourceDependencies", + "comment": "Generate Source Dependencies File", + "value": "true", + "flags": [ + "Continue" + ] + }, + { + "name": "BrowseInformation", + "switch": "FR", + "comment": "Enable Browse Information", + "value": "true", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "TreatAngleIncludeAsExternal", + "switch": "external:anglebrackets", + "comment": "Treat Files Included with Angle Brackets as External", + "value": "true", + "flags": [] + }, + { + "name": "ExternalTemplatesDiagnostics", + "switch": "external:templates-", + "comment": "Template Diagnostics in External Headers", + "value": "true", + "flags": [] + }, + { + "name": "DisableAnalyzeExternal", + "switch": "analyze:external-", + "comment": "Disable Code Analysis for External Headers", + "value": "true", + "flags": [] + }, + { + "name": "ShowIncludes", + "switch": "showIncludes", + "comment": "Show Includes", + "value": "true", + "flags": [] + }, + { + "name": "EnablePREfast", + "switch": "analyze-", + "comment": "Enable Code Analysis", + "value": "false", + "flags": [] + }, + { + "name": "EnablePREfast", + "switch": "analyze", + "comment": "Enable Code Analysis", + "value": "true", + "flags": [] + }, + { + "name": "UseFullPaths", + "switch": "FC", + "comment": "Use Full Paths", + "value": "true", + "flags": [] + }, + { + "name": "OmitDefaultLibName", + "switch": "Zl", + "comment": "Omit Default Library Name", + "value": "true", + "flags": [] + }, + { + "name": "AdditionalIncludeDirectories", + "switch": "I", + "comment": "Additional Include Directories", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "AdditionalUsingDirectories", + "switch": "AI", + "comment": "Additional #using Directories", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "AdditionalBMIDirectories", + "switch": "ifcSearchDir", + "comment": "Additional BMI Directories", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "AdditionalModuleDependencies", + "switch": "reference", + "comment": "Additional Module Dependencies", + "value": "", + "flags": [ + "UserFollowing", + "SemicolonAppendable" + ] + }, + { + "name": "AdditionalHeaderUnitDependencies", + "switch": "headerUnit", + "comment": "Additional Header Unit Dependencies", + "value": "", + "flags": [ + "UserFollowing", + "SemicolonAppendable" + ] + }, + { + "name": "PreprocessorDefinitions", + "switch": "D", + "comment": "Preprocessor Definitions", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "UndefinePreprocessorDefinitions", + "switch": "U", + "comment": "Undefine Preprocessor Definitions", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "StdIfcDirectory", + "switch": "stdIfcDir", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "ExternalDirectoriesEnv", + "switch": "external:env:", + "comment": "External Directories Environment Variables", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "DisableSpecificWarnings", + "switch": "wd", + "comment": "Disable Specific Warnings", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "ForcedIncludeFiles", + "switch": "FI", + "comment": "Forced Include File", + "value": "", + "flags": [ + "UserValue", + "UserRequired", + "SemicolonAppendable" + ] + }, + { + "name": "ForcedIncludeFiles", + "switch": "FI", + "comment": "Forced Include File", + "value": "", + "flags": [ + "UserFollowing", + "SemicolonAppendable" + ] + }, + { + "name": "ForcedUsingFiles", + "switch": "FU", + "comment": "Forced #using File", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "PREfastAdditionalPlugins", + "switch": "analyze:plugin", + "comment": "Additional Code Analysis Native plugins", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "TreatSpecificWarningsAsErrors", + "switch": "we", + "comment": "Treat Specific Warnings As Errors", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "DynamicDebuggingSuffix", + "switch": "dynamicdeopt:suffix", + "comment": "", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "UseDynamicDebugging", + "switch": "dynamicdeopt", + "comment": "Support C++ Dynamic Debugging", + "value": "true", + "flags": [] + }, + { + "name": "WarningVersion", + "switch": "Wv:", + "comment": "Warning Version", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "PreprocessOutputPath", + "switch": "Fi", + "comment": "Preprocess Output Path", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "PrecompiledHeaderFile", + "switch": "Yu", + "comment": "Precompiled Header File", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "PrecompiledHeaderFile", + "switch": "Yc", + "comment": "Precompiled Header File", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "PrecompiledHeaderOutputFile", + "switch": "Fp", + "comment": "Precompiled Header Output File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "AssemblerListingLocation", + "switch": "Fa", + "comment": "ASM List Location", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ModuleOutputFile", + "switch": "ifcOutput", + "comment": "Module Output File Name", + "value": "", + "flags": [ + "UserFollowing" + ] + }, + { + "name": "ModuleDependenciesFile", + "switch": "scanDependencies", + "comment": "Module Dependencies File Name", + "value": "", + "flags": [ + "UserFollowing" + ] + }, + { + "name": "ModuleDependenciesFile", + "switch": "sourceDependencies:directives", + "comment": "Module Dependencies File Name", + "value": "", + "flags": [ + "UserFollowing" + ] + }, + { + "name": "ObjectFileName", + "switch": "Fo", + "comment": "Object File Name", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ProgramDataBaseFileName", + "switch": "Fd", + "comment": "Program Database File Name", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "XMLDocumentationFileName", + "switch": "doc", + "comment": "XML Documentation File Name", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "SourceDependenciesFile", + "switch": "sourceDependencies", + "comment": "Source Dependencies File Name", + "value": "", + "flags": [ + "UserFollowing" + ] + }, + { + "name": "BrowseInformationFile", + "switch": "FR", + "comment": "Browse Information File", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "PREfastLog", + "switch": "analyze:log", + "comment": "Code Analysis Log", + "value": "", + "flags": [ + "UserFollowing" + ] + }, + { + "name": "PREfastProjectDirectory", + "switch": "analyze:projectdirectory", + "comment": "Code Analysis Project Directory", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "PREfastRulesetDirectories", + "switch": "analyze:rulesetdirectory", + "comment": "Code Analysis Ruleset Directories", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "PREfastRulesetFile", + "switch": "analyze:ruleset", + "comment": "Code Analysis Ruleset File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ProcessorNumber", + "switch": "MP", + "comment": "Number of processors", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + } +]
diff --git a/Templates/MSBuild/FlagTables/v145_CSharp.json b/Templates/MSBuild/FlagTables/v145_CSharp.json new file mode 100644 index 0000000..d57a97e --- /dev/null +++ b/Templates/MSBuild/FlagTables/v145_CSharp.json
@@ -0,0 +1,560 @@ +[ + { + "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": "DebugType", + "switch": "debug:portable", + "comment": "", + "value": "portable", + "flags": [] + }, + { + "name": "DebugType", + "switch": "debug:embedded", + "comment": "", + "value": "embedded", + "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": "WarningsAsErrors", + "switch": "warnaserror:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired", + "CommaAppendable" + ] + }, + { + "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:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "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": "NoStdLib", + "switch": "nostdlib", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "NoStdLib", + "switch": "nostdlib-", + "comment": "", + "value": "false", + "flags": [] + }, + { + "name": "NoStdLib", + "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/Templates/MSBuild/FlagTables/v145_Link.json b/Templates/MSBuild/FlagTables/v145_Link.json new file mode 100644 index 0000000..bebf04d --- /dev/null +++ b/Templates/MSBuild/FlagTables/v145_Link.json
@@ -0,0 +1,1367 @@ +[ + { + "name": "ShowProgress", + "switch": "", + "comment": "Not Set", + "value": "NotSet", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "VERBOSE", + "comment": "Display all progress messages", + "value": "LinkVerbose", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "VERBOSE:Lib", + "comment": "For Libraries Searched", + "value": "LinkVerboseLib", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "VERBOSE:ICF", + "comment": "About COMDAT folding during optimized linking", + "value": "LinkVerboseICF", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "VERBOSE:REF", + "comment": "About data removed during optimized linking", + "value": "LinkVerboseREF", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "VERBOSE:SAFESEH", + "comment": "About Modules incompatible with SEH", + "value": "LinkVerboseSAFESEH", + "flags": [] + }, + { + "name": "ShowProgress", + "switch": "VERBOSE:CLR", + "comment": "About linker activity related to managed code", + "value": "LinkVerboseCLR", + "flags": [] + }, + { + "name": "ForceFileOutput", + "switch": "FORCE", + "comment": "Enabled", + "value": "Enabled", + "flags": [] + }, + { + "name": "ForceFileOutput", + "switch": "FORCE:MULTIPLE", + "comment": "Multiply Defined Symbol Only", + "value": "MultiplyDefinedSymbolOnly", + "flags": [] + }, + { + "name": "ForceFileOutput", + "switch": "FORCE:UNRESOLVED", + "comment": "Undefined Symbol Only", + "value": "UndefinedSymbolOnly", + "flags": [] + }, + { + "name": "CreateHotPatchableImage", + "switch": "FUNCTIONPADMIN", + "comment": "Enabled", + "value": "Enabled", + "flags": [] + }, + { + "name": "CreateHotPatchableImage", + "switch": "FUNCTIONPADMIN:5", + "comment": "X86 Image Only", + "value": "X86Image", + "flags": [] + }, + { + "name": "CreateHotPatchableImage", + "switch": "FUNCTIONPADMIN:6", + "comment": "X64 Image Only", + "value": "X64Image", + "flags": [] + }, + { + "name": "CreateHotPatchableImage", + "switch": "FUNCTIONPADMIN:16", + "comment": "Itanium Image Only", + "value": "ItaniumImage", + "flags": [] + }, + { + "name": "UACExecutionLevel", + "switch": "level='asInvoker'", + "comment": "asInvoker", + "value": "AsInvoker", + "flags": [] + }, + { + "name": "UACExecutionLevel", + "switch": "level='highestAvailable'", + "comment": "highestAvailable", + "value": "HighestAvailable", + "flags": [] + }, + { + "name": "UACExecutionLevel", + "switch": "level='requireAdministrator'", + "comment": "requireAdministrator", + "value": "RequireAdministrator", + "flags": [] + }, + { + "name": "GenerateDebugInformation", + "switch": "DEBUG", + "comment": "Generate Debug Information", + "value": "true", + "flags": [ + "CaseInsensitive" + ] + }, + { + "name": "GenerateDebugInformation", + "switch": "DEBUG:FASTLINK", + "comment": "Generate Debug Information optimized for faster links", + "value": "DebugFastLink", + "flags": [ + "CaseInsensitive" + ] + }, + { + "name": "GenerateDebugInformation", + "switch": "DEBUG:FULL", + "comment": "Generate Debug Information optimized for sharing and publishing", + "value": "DebugFull", + "flags": [ + "CaseInsensitive" + ] + }, + { + "name": "GenerateDebugInformation", + "switch": "DEBUG:NONE", + "comment": "Produces no debugging information", + "value": "false", + "flags": [ + "CaseInsensitive" + ] + }, + { + "name": "SubSystem", + "switch": "", + "comment": "Not Set", + "value": "NotSet", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:CONSOLE", + "comment": "Console", + "value": "Console", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:WINDOWS", + "comment": "Windows", + "value": "Windows", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:NATIVE", + "comment": "Native", + "value": "Native", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:EFI_APPLICATION", + "comment": "EFI Application", + "value": "EFI Application", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER", + "comment": "EFI Boot Service Driver", + "value": "EFI Boot Service Driver", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:EFI_ROM", + "comment": "EFI ROM", + "value": "EFI ROM", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:EFI_RUNTIME_DRIVER", + "comment": "EFI Runtime", + "value": "EFI Runtime", + "flags": [] + }, + { + "name": "SubSystem", + "switch": "SUBSYSTEM:POSIX", + "comment": "POSIX", + "value": "POSIX", + "flags": [] + }, + { + "name": "Driver", + "switch": "", + "comment": "Not Set", + "value": "NotSet", + "flags": [] + }, + { + "name": "Driver", + "switch": "Driver", + "comment": "Driver", + "value": "Driver", + "flags": [] + }, + { + "name": "Driver", + "switch": "DRIVER:UPONLY", + "comment": "UP Only", + "value": "UpOnly", + "flags": [] + }, + { + "name": "Driver", + "switch": "DRIVER:WDM", + "comment": "WDM", + "value": "WDM", + "flags": [] + }, + { + "name": "LinkTimeCodeGeneration", + "switch": "", + "comment": "Default", + "value": "Default", + "flags": [] + }, + { + "name": "LinkTimeCodeGeneration", + "switch": "LTCG:incremental", + "comment": "Use Fast Link Time Code Generation", + "value": "UseFastLinkTimeCodeGeneration", + "flags": [] + }, + { + "name": "LinkTimeCodeGeneration", + "switch": "LTCG", + "comment": "Use Link Time Code Generation", + "value": "UseLinkTimeCodeGeneration", + "flags": [] + }, + { + "name": "LinkTimeCodeGeneration", + "switch": "LTCG:PGInstrument", + "comment": "Profile Guided Optimization - Instrument", + "value": "PGInstrument", + "flags": [] + }, + { + "name": "LinkTimeCodeGeneration", + "switch": "LTCG:PGOptimize", + "comment": "Profile Guided Optimization - Optimization", + "value": "PGOptimization", + "flags": [] + }, + { + "name": "LinkTimeCodeGeneration", + "switch": "LTCG:PGUpdate", + "comment": "Profile Guided Optimization - Update", + "value": "PGUpdate", + "flags": [] + }, + { + "name": "GenerateWindowsMetadata", + "switch": "WINMD", + "comment": "Yes", + "value": "true", + "flags": [] + }, + { + "name": "GenerateWindowsMetadata", + "switch": "WINMD:NO", + "comment": "No", + "value": "false", + "flags": [] + }, + { + "name": "WindowsMetadataSignHash", + "switch": "WINMDSIGNHASH:SHA1", + "comment": "SHA1", + "value": "SHA1", + "flags": [] + }, + { + "name": "WindowsMetadataSignHash", + "switch": "WINMDSIGNHASH:SHA256", + "comment": "SHA256", + "value": "SHA256", + "flags": [] + }, + { + "name": "WindowsMetadataSignHash", + "switch": "WINMDSIGNHASH:SHA384", + "comment": "SHA384", + "value": "SHA384", + "flags": [] + }, + { + "name": "WindowsMetadataSignHash", + "switch": "WINMDSIGNHASH:SHA512", + "comment": "SHA512", + "value": "SHA512", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "", + "comment": "Not Set", + "value": "NotSet", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:ARM", + "comment": "MachineARM", + "value": "MachineARM", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:ARM64", + "comment": "MachineARM64", + "value": "MachineARM64", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:ARM64EC", + "comment": "MachineARM64EC", + "value": "MachineARM64EC", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:ARM64X", + "comment": "MachineARM64X", + "value": "MachineARM64X", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:EBC", + "comment": "MachineEBC", + "value": "MachineEBC", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:X64", + "comment": "MachineX64", + "value": "MachineX64", + "flags": [] + }, + { + "name": "TargetMachine", + "switch": "MACHINE:X86", + "comment": "MachineX86", + "value": "MachineX86", + "flags": [] + }, + { + "name": "CLRThreadAttribute", + "switch": "CLRTHREADATTRIBUTE:MTA", + "comment": "MTA threading attribute", + "value": "MTAThreadingAttribute", + "flags": [] + }, + { + "name": "CLRThreadAttribute", + "switch": "CLRTHREADATTRIBUTE:STA", + "comment": "STA threading attribute", + "value": "STAThreadingAttribute", + "flags": [] + }, + { + "name": "CLRThreadAttribute", + "switch": "CLRTHREADATTRIBUTE:NONE", + "comment": "Default threading attribute", + "value": "DefaultThreadingAttribute", + "flags": [] + }, + { + "name": "CLRImageType", + "switch": "CLRIMAGETYPE:IJW", + "comment": "Force IJW image", + "value": "ForceIJWImage", + "flags": [] + }, + { + "name": "CLRImageType", + "switch": "CLRIMAGETYPE:PURE", + "comment": "Force Pure IL Image", + "value": "ForcePureILImage", + "flags": [] + }, + { + "name": "CLRImageType", + "switch": "CLRIMAGETYPE:SAFE", + "comment": "Force Safe IL Image", + "value": "ForceSafeILImage", + "flags": [] + }, + { + "name": "CLRImageType", + "switch": "", + "comment": "Default image type", + "value": "Default", + "flags": [] + }, + { + "name": "SignHash", + "switch": "CLRSIGNHASH:SHA1", + "comment": "SHA1", + "value": "SHA1", + "flags": [] + }, + { + "name": "SignHash", + "switch": "CLRSIGNHASH:SHA256", + "comment": "SHA256", + "value": "SHA256", + "flags": [] + }, + { + "name": "SignHash", + "switch": "CLRSIGNHASH:SHA384", + "comment": "SHA384", + "value": "SHA384", + "flags": [] + }, + { + "name": "SignHash", + "switch": "CLRSIGNHASH:SHA512", + "comment": "SHA512", + "value": "SHA512", + "flags": [] + }, + { + "name": "LinkErrorReporting", + "switch": "ERRORREPORT:PROMPT", + "comment": "PromptImmediately", + "value": "PromptImmediately", + "flags": [] + }, + { + "name": "LinkErrorReporting", + "switch": "ERRORREPORT:QUEUE", + "comment": "Queue For Next Login", + "value": "QueueForNextLogin", + "flags": [] + }, + { + "name": "LinkErrorReporting", + "switch": "ERRORREPORT:SEND", + "comment": "Send Error Report", + "value": "SendErrorReport", + "flags": [] + }, + { + "name": "LinkErrorReporting", + "switch": "ERRORREPORT:NONE", + "comment": "No Error Report", + "value": "NoErrorReport", + "flags": [] + }, + { + "name": "CLRSupportLastError", + "switch": "CLRSupportLastError", + "comment": "Enabled", + "value": "Enabled", + "flags": [] + }, + { + "name": "CLRSupportLastError", + "switch": "CLRSupportLastError:NO", + "comment": "Disabled", + "value": "Disabled", + "flags": [] + }, + { + "name": "CLRSupportLastError", + "switch": "CLRSupportLastError:SYSTEMDLL", + "comment": "System Dlls Only", + "value": "SystemDlls", + "flags": [] + }, + { + "name": "LinkIncremental", + "switch": "INCREMENTAL:NO", + "comment": "Enable Incremental Linking", + "value": "false", + "flags": [] + }, + { + "name": "LinkIncremental", + "switch": "INCREMENTAL", + "comment": "Enable Incremental Linking", + "value": "true", + "flags": [] + }, + { + "name": "SuppressStartupBanner", + "switch": "NOLOGO", + "comment": "Suppress Startup Banner", + "value": "true", + "flags": [] + }, + { + "name": "LinkStatus", + "switch": "LTCG:NOSTATUS", + "comment": "Link Status", + "value": "false", + "flags": [] + }, + { + "name": "LinkStatus", + "switch": "LTCG:STATUS", + "comment": "Link Status", + "value": "true", + "flags": [] + }, + { + "name": "PreventDllBinding", + "switch": "ALLOWBIND:NO", + "comment": "Prevent Dll Binding", + "value": "false", + "flags": [] + }, + { + "name": "PreventDllBinding", + "switch": "ALLOWBIND", + "comment": "Prevent Dll Binding", + "value": "true", + "flags": [] + }, + { + "name": "TreatLinkerWarningAsErrors", + "switch": "WX:NO", + "comment": "Treat Linker Warning As Errors", + "value": "false", + "flags": [] + }, + { + "name": "TreatLinkerWarningAsErrors", + "switch": "WX", + "comment": "Treat Linker Warning As Errors", + "value": "true", + "flags": [] + }, + { + "name": "IgnoreAllDefaultLibraries", + "switch": "NODEFAULTLIB", + "comment": "Ignore All Default Libraries", + "value": "true", + "flags": [] + }, + { + "name": "GenerateManifest", + "switch": "MANIFEST:NO", + "comment": "Generate Manifest", + "value": "false", + "flags": [] + }, + { + "name": "GenerateManifest", + "switch": "MANIFEST", + "comment": "Generate Manifest", + "value": "true", + "flags": [] + }, + { + "name": "AllowIsolation", + "switch": "ALLOWISOLATION:NO", + "comment": "Allow Isolation", + "value": "false", + "flags": [] + }, + { + "name": "AllowIsolation", + "switch": "", + "comment": "Allow Isolation", + "value": "true", + "flags": [] + }, + { + "name": "EnableUAC", + "switch": "MANIFESTUAC:", + "comment": "", + "value": "", + "flags": [ + "UserValue", + "UserRequired", + "SpaceAppendable" + ] + }, + { + "name": "UACUIAccess", + "switch": "uiAccess='false'", + "comment": "UAC Bypass UI Protection", + "value": "false", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "UACUIAccess", + "switch": "uiAccess='false'", + "comment": "UAC Bypass UI Protection", + "value": "false", + "flags": [] + }, + { + "name": "UACUIAccess", + "switch": "uiAccess='true'", + "comment": "UAC Bypass UI Protection", + "value": "true", + "flags": [] + }, + { + "name": "ManifestEmbed", + "switch": "manifest:embed", + "comment": "Embed Manifest", + "value": "true", + "flags": [] + }, + { + "name": "GenerateMapFile", + "switch": "MAP", + "comment": "Generate Map File", + "value": "true", + "flags": [ + "UserValue", + "UserIgnored", + "Continue" + ] + }, + { + "name": "MapExports", + "switch": "MAPINFO:EXPORTS", + "comment": "Map Exports", + "value": "true", + "flags": [] + }, + { + "name": "AssemblyDebug", + "switch": "ASSEMBLYDEBUG:DISABLE", + "comment": "Debuggable Assembly", + "value": "false", + "flags": [] + }, + { + "name": "AssemblyDebug", + "switch": "ASSEMBLYDEBUG", + "comment": "Debuggable Assembly", + "value": "true", + "flags": [] + }, + { + "name": "LargeAddressAware", + "switch": "LARGEADDRESSAWARE:NO", + "comment": "Enable Large Addresses", + "value": "false", + "flags": [] + }, + { + "name": "LargeAddressAware", + "switch": "LARGEADDRESSAWARE", + "comment": "Enable Large Addresses", + "value": "true", + "flags": [] + }, + { + "name": "TerminalServerAware", + "switch": "TSAWARE:NO", + "comment": "Terminal Server", + "value": "false", + "flags": [] + }, + { + "name": "TerminalServerAware", + "switch": "TSAWARE", + "comment": "Terminal Server", + "value": "true", + "flags": [] + }, + { + "name": "SwapRunFromCD", + "switch": "SWAPRUN:CD", + "comment": "Swap Run From CD", + "value": "true", + "flags": [] + }, + { + "name": "SwapRunFromNET", + "switch": "SWAPRUN:NET", + "comment": "Swap Run From Network", + "value": "true", + "flags": [] + }, + { + "name": "OptimizeReferences", + "switch": "OPT:NOREF", + "comment": "References", + "value": "false", + "flags": [] + }, + { + "name": "OptimizeReferences", + "switch": "OPT:REF", + "comment": "References", + "value": "true", + "flags": [] + }, + { + "name": "EnableCOMDATFolding", + "switch": "OPT:NOICF", + "comment": "Enable COMDAT Folding", + "value": "false", + "flags": [] + }, + { + "name": "EnableCOMDATFolding", + "switch": "OPT:ICF", + "comment": "Enable COMDAT Folding", + "value": "true", + "flags": [] + }, + { + "name": "IgnoreEmbeddedIDL", + "switch": "IGNOREIDL", + "comment": "Ignore Embedded IDL", + "value": "true", + "flags": [] + }, + { + "name": "AppContainer", + "switch": "APPCONTAINER", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "WindowsMetadataLinkDelaySign", + "switch": "WINMDDELAYSIGN:NO", + "comment": "Windows Metadata Delay Sign", + "value": "false", + "flags": [] + }, + { + "name": "WindowsMetadataLinkDelaySign", + "switch": "WINMDDELAYSIGN", + "comment": "Windows Metadata Delay Sign", + "value": "true", + "flags": [] + }, + { + "name": "NoEntryPoint", + "switch": "NOENTRY", + "comment": "No Entry Point", + "value": "true", + "flags": [] + }, + { + "name": "SetChecksum", + "switch": "RELEASE", + "comment": "Set Checksum", + "value": "true", + "flags": [] + }, + { + "name": "RandomizedBaseAddress", + "switch": "DYNAMICBASE:NO", + "comment": "Randomized Base Address", + "value": "false", + "flags": [] + }, + { + "name": "RandomizedBaseAddress", + "switch": "DYNAMICBASE", + "comment": "Randomized Base Address", + "value": "true", + "flags": [] + }, + { + "name": "FixedBaseAddress", + "switch": "FIXED:NO", + "comment": "Fixed Base Address", + "value": "false", + "flags": [] + }, + { + "name": "FixedBaseAddress", + "switch": "FIXED", + "comment": "Fixed Base Address", + "value": "true", + "flags": [] + }, + { + "name": "DataExecutionPrevention", + "switch": "NXCOMPAT:NO", + "comment": "Data Execution Prevention (DEP)", + "value": "false", + "flags": [] + }, + { + "name": "DataExecutionPrevention", + "switch": "NXCOMPAT", + "comment": "Data Execution Prevention (DEP)", + "value": "true", + "flags": [] + }, + { + "name": "TurnOffAssemblyGeneration", + "switch": "NOASSEMBLY", + "comment": "Turn Off Assembly Generation", + "value": "true", + "flags": [] + }, + { + "name": "SupportUnloadOfDelayLoadedDLL", + "switch": "DELAY:UNLOAD", + "comment": "Unload delay loaded DLL", + "value": "true", + "flags": [] + }, + { + "name": "SupportNobindOfDelayLoadedDLL", + "switch": "DELAY:NOBIND", + "comment": "Nobind delay loaded DLL", + "value": "true", + "flags": [] + }, + { + "name": "Profile", + "switch": "PROFILE", + "comment": "Profile", + "value": "true", + "flags": [] + }, + { + "name": "LinkDelaySign", + "switch": "DELAYSIGN:NO", + "comment": "Delay Sign", + "value": "false", + "flags": [] + }, + { + "name": "LinkDelaySign", + "switch": "DELAYSIGN", + "comment": "Delay Sign", + "value": "true", + "flags": [] + }, + { + "name": "CLRUnmanagedCodeCheck", + "switch": "CLRUNMANAGEDCODECHECK:NO", + "comment": "CLR Unmanaged Code Check", + "value": "false", + "flags": [] + }, + { + "name": "CLRUnmanagedCodeCheck", + "switch": "CLRUNMANAGEDCODECHECK", + "comment": "CLR Unmanaged Code Check", + "value": "true", + "flags": [] + }, + { + "name": "DetectOneDefinitionRule", + "switch": "ODR", + "comment": "Detect One Definition Rule violations", + "value": "true", + "flags": [] + }, + { + "name": "CETCompat", + "switch": "CETCOMPAT:NO", + "comment": "CET Shadow Stack Compatible", + "value": "false", + "flags": [] + }, + { + "name": "CETCompat", + "switch": "CETCOMPAT", + "comment": "CET Shadow Stack Compatible", + "value": "true", + "flags": [] + }, + { + "name": "ImageHasSafeExceptionHandlers", + "switch": "SAFESEH:NO", + "comment": "Image Has Safe Exception Handlers", + "value": "false", + "flags": [] + }, + { + "name": "ImageHasSafeExceptionHandlers", + "switch": "SAFESEH", + "comment": "Image Has Safe Exception Handlers", + "value": "true", + "flags": [] + }, + { + "name": "LinkGuardEHContMetadata", + "switch": "guard:ehcont", + "comment": "Enable EH Continuation Metadata", + "value": "true", + "flags": [] + }, + { + "name": "LinkGuardSignedReturns", + "switch": "guard:nodelayloadsignret", + "comment": "Enable Signed Returns", + "value": "false", + "flags": [] + }, + { + "name": "LinkGuardSignedReturns", + "switch": "guard:delayloadsignret", + "comment": "Enable Signed Returns", + "value": "true", + "flags": [] + }, + { + "name": "LinkDLL", + "switch": "DLL", + "comment": "", + "value": "true", + "flags": [] + }, + { + "name": "AdditionalLibraryDirectories", + "switch": "LIBPATH:", + "comment": "Additional Library Directories", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "Natvis", + "switch": "NATVIS:", + "comment": "Natvis files", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "SpecifySectionAttributes", + "switch": "SECTION:", + "comment": "Specify Section Attributes", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "IgnoreSpecificDefaultLibraries", + "switch": "NODEFAULTLIB:", + "comment": "Ignore Specific Default Libraries", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "AddModuleNamesToAssembly", + "switch": "ASSEMBLYMODULE:", + "comment": "Add Module to Assembly", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "EmbedManagedResourceFile", + "switch": "ASSEMBLYRESOURCE:", + "comment": "Embed Managed Resource File", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "ForceSymbolReferences", + "switch": "INCLUDE:", + "comment": "Force Symbol References", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "DelayLoadDLLs", + "switch": "DELAYLOAD:", + "comment": "Delay Loaded Dlls", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "AssemblyLinkResource", + "switch": "ASSEMBLYLINKRESOURCE:", + "comment": "Assembly Link Resource", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "AdditionalManifestDependencies", + "switch": "MANIFESTDEPENDENCY:", + "comment": "Additional Manifest Dependencies", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "ManifestInput", + "switch": "manifestinput:", + "comment": "Manifest Input", + "value": "", + "flags": [ + "UserValue", + "SemicolonAppendable" + ] + }, + { + "name": "OutputFile", + "switch": "OUT:", + "comment": "Output File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "Version", + "switch": "VERSION:", + "comment": "Version", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "IncrementalLinkDatabaseFile", + "switch": "ILK:", + "comment": "Incremental Link Database File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "MSDOSStubFileName", + "switch": "STUB:", + "comment": "MS-DOS Stub File Name", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ModuleDefinitionFile", + "switch": "DEF:", + "comment": "Module Definition File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ManifestFile", + "switch": "ManifestFile:", + "comment": "Manifest File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ProgramDatabaseFile", + "switch": "PDB:", + "comment": "Generate Program Database File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "StripPrivateSymbols", + "switch": "PDBSTRIPPED:", + "comment": "Strip Private Symbols", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "MapFileName", + "switch": "MAP:", + "comment": "Map File Name", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "DynamicDebuggingSuffix", + "switch": "dynamicdeopt:suffix=", + "comment": "", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "UseDynamicDebugging", + "switch": "dynamicdeopt", + "comment": "Support C++ Dynamic Debugging", + "value": "true", + "flags": [] + }, + { + "name": "HeapReserveSize", + "switch": "HEAP:", + "comment": "Heap Reserve Size", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "HeapCommitSize", + "switch": "HEAP", + "comment": "Heap Commit Size", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "StackReserveSize", + "switch": "STACK:", + "comment": "Stack Reserve Size", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "StackCommitSize", + "switch": "STACK", + "comment": "Stack Commit Size", + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] + }, + { + "name": "FunctionOrder", + "switch": "ORDER:@", + "comment": "Function Order", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ProfileGuidedDatabase", + "switch": "PGD:", + "comment": "Profile Guided Database", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "LinkTimeCodeGenerationObjectFile", + "switch": "LTCGOUT:", + "comment": "Link Time Code Generation Object File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "MidlCommandFile", + "switch": "MIDL:@", + "comment": "MIDL Commands", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "MergedIDLBaseFileName", + "switch": "IDLOUT:", + "comment": "Merged IDL Base File Name", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "TypeLibraryFile", + "switch": "TLBOUT:", + "comment": "Type Library", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "WindowsMetadataFile", + "switch": "WINMDFILE:", + "comment": "Windows Metadata File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "WindowsMetadataLinkKeyFile", + "switch": "WINMDKEYFILE:", + "comment": "Windows Metadata Key File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "WindowsMetadataKeyContainer", + "switch": "WINMDKEYCONTAINER:", + "comment": "Windows Metadata Key Container", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "EntryPointSymbol", + "switch": "ENTRY:", + "comment": "Entry Point", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "BaseAddress", + "switch": "BASE:", + "comment": "Base Address", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "ImportLibrary", + "switch": "IMPLIB:", + "comment": "Import Library", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "LinkKeyFile", + "switch": "KEYFILE:", + "comment": "Key File", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "KeyContainer", + "switch": "KEYCONTAINER:", + "comment": "Key Container", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "TypeLibraryResourceID", + "switch": "TLBID:", + "comment": "TypeLib Resource ID", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "SectionAlignment", + "switch": "ALIGN:", + "comment": "SectionAlignment", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "PdbThreads", + "switch": "pdbthreads:", + "comment": "", + "value": "", + "flags": [ + "UserValue" + ] + }, + { + "name": "CgThreads", + "switch": "cgthreads:", + "comment": "", + "value": "", + "flags": [ + "UserValue" + ] + } +]
diff --git a/Tests/CMakeLib/testDebuggerThread.cxx b/Tests/CMakeLib/testDebuggerThread.cxx index cf47459..234bc7d 100644 --- a/Tests/CMakeLib/testDebuggerThread.cxx +++ b/Tests/CMakeLib/testDebuggerThread.cxx
@@ -2,6 +2,8 @@ #include <string> #include <vector> +#include <cmext/string_view> + #include <cm3p/cppdap/optional.h> #include <cm3p/cppdap/protocol.h> #include <cm3p/cppdap/types.h> @@ -17,7 +19,7 @@ auto thread = std::make_shared<cmDebugger::cmDebuggerThread>(0, "name"); auto const* functionName = "function_name"; auto arguments = std::vector<cmListFileArgument>{ cmListFileArgument( - "arg", cmListFileArgument::Delimiter::Unquoted, 0) }; + "arg"_s, cmListFileArgument::Delimiter::Unquoted, 0) }; cmListFileFunction func(functionName, 10, 20, arguments); thread->PushStackFrame(nullptr, "CMakeLists.txt", func);
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index f78aa44..3982f52 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt
@@ -203,9 +203,12 @@ set(info_vs15 "VS_15_DIR") set(info_vs16 "VS_16_DIR") set(info_vs17 "VS_17_DIR") + set(info_vs18 "VS_18_DIR") set(vs_versions) if(WIN32) - if(NOT CMAKE_VERSION VERSION_LESS 3.21.20210624) + if(NOT CMAKE_VERSION VERSION_LESS 4.2) + set(vs_versions vs15 vs16 vs17 vs18) + elseif(NOT CMAKE_VERSION VERSION_LESS 3.21) set(vs_versions vs15 vs16 vs17) elseif(NOT CMAKE_VERSION VERSION_LESS 3.14) set(vs_versions vs15 vs16) @@ -2410,6 +2413,9 @@ if(vs17 AND CMake_TEST_ANDROID_VS17) add_test_VSAndroid(vs17 "Visual Studio 17 2022" "ARM") endif() + if(vs18 AND CMake_TEST_ANDROID_VS18) + add_test_VSAndroid(vs18 "Visual Studio 18 2026" "ARM") + endif() if(APPLE) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt index 53bf7b6..9f885f6 100644 --- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt +++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
@@ -99,7 +99,7 @@ FREETYPE GETTEXT GIT GNUTLS HG HSPELL - ICOTOOL + ICOTOOL ImageMagick JASPER LIBLZMA LIBXML2 LIBXSLT LTTNGUST OpenCL @@ -122,7 +122,7 @@ FLEX Freetype Gettext GIF GnuTLS GNUTLS GTK2 HDF5 Hg HSPELL - Icotool + Icotool ImageMagick Jasper JPEG LibArchive LibLZMA LIBLZMA LibXml2 LibXslt LTTngUST OpenCL OpenSceneGraph OPENSCENEGRAPH OpenSSL OPENSSL
diff --git a/Tests/FindImageMagick/Test/CMakeLists.txt b/Tests/FindImageMagick/Test/CMakeLists.txt index 6bbb373..06c561e 100644 --- a/Tests/FindImageMagick/Test/CMakeLists.txt +++ b/Tests/FindImageMagick/Test/CMakeLists.txt
@@ -6,6 +6,10 @@ add_executable(test_magick++ main_magick++.cxx) target_link_libraries(test_magick++ PRIVATE ImageMagick::Magick++) +target_compile_definitions( + test_magick++ + PRIVATE CMAKE_EXPECTED_IMAGEMAGICK_VERSION="${ImageMagick_VERSION}" +) add_test(NAME test_magick++ COMMAND test_magick++) add_executable(test_magick_wand main_magick_wand.c)
diff --git a/Tests/FindImageMagick/Test/main_magick++.cxx b/Tests/FindImageMagick/Test/main_magick++.cxx index d0208d4..95aba8b 100644 --- a/Tests/FindImageMagick/Test/main_magick++.cxx +++ b/Tests/FindImageMagick/Test/main_magick++.cxx
@@ -1,3 +1,4 @@ +#include <cstring> #include <iostream> #include <string> @@ -6,5 +7,14 @@ int main() { Magick::InitializeMagick(""); - return 0; + + std::string found_version = + std::string(MagickLibVersionText) + MagickLibAddendum; + + std::cout << "Found ImageMagick version " << found_version + << ", expected version " << CMAKE_EXPECTED_IMAGEMAGICK_VERSION + << "\n"; + + return std::strcmp(found_version.c_str(), + CMAKE_EXPECTED_IMAGEMAGICK_VERSION); }
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index ce36829..4769ab2 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt
@@ -38,7 +38,12 @@ endif() if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran") - add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:--implicit-interface;--generate-object-code>") + if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "0.55") + set(_LFORTRAN_SC_FLAG --separate-compilation) + else() + set(_LFORTRAN_SC_FLAG --generate-object-code) + endif() + add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:--implicit-interface;${_LFORTRAN_SC_FLAG}>") endif() add_library(hello STATIC hello.f)
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt index 8643318..7efbeb6 100644 --- a/Tests/FortranOnly/CMakeLists.txt +++ b/Tests/FortranOnly/CMakeLists.txt
@@ -11,7 +11,12 @@ endif() if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran") - add_compile_options(--implicit-interface --generate-object-code) + if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "0.55") + set(_LFORTRAN_SC_FLAG --separate-compilation) + else() + set(_LFORTRAN_SC_FLAG --generate-object-code) + endif() + add_compile_options(--implicit-interface ${_LFORTRAN_SC_FLAG}) endif() # create a library with hello and world functions
diff --git a/Tests/Module/CheckIPOSupported-Fortran/CMakeLists.txt b/Tests/Module/CheckIPOSupported-Fortran/CMakeLists.txt index 4d03a93..3017898 100644 --- a/Tests/Module/CheckIPOSupported-Fortran/CMakeLists.txt +++ b/Tests/Module/CheckIPOSupported-Fortran/CMakeLists.txt
@@ -4,7 +4,12 @@ cmake_policy(SET CMP0069 NEW) if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran") - add_compile_options(--implicit-interface --generate-object-code) + if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "0.55") + set(_LFORTRAN_SC_FLAG --separate-compilation) + else() + set(_LFORTRAN_SC_FLAG --generate-object-code) + endif() + add_compile_options(--implicit-interface ${_LFORTRAN_SC_FLAG}) endif() include(CheckIPOSupported)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index cb2a671..07f47a1 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt
@@ -824,7 +824,13 @@ set_property(TEST RunCMake.DependencyGraph APPEND PROPERTY LABELS "Fortran") # Add C++ Module tests. -add_RunCMake_test(CXXModules -DCMake_TEST_MODULE_COMPILATION=${CMake_TEST_MODULE_COMPILATION} -DCMake_TEST_MODULE_COMPILATION_RULES=${CMake_TEST_MODULE_COMPILATION_RULES}) +add_RunCMake_test(CXXModules + -DCMake_TEST_MODULE_COMPILATION=${CMake_TEST_MODULE_COMPILATION} + -DCMake_TEST_MODULE_COMPILATION_RULES=${CMake_TEST_MODULE_COMPILATION_RULES} + -DCMake_TEST_CXX_STDLIB_MODULES_JSON=${CMake_TEST_CXX_STDLIB_MODULES_JSON} +) +set_property(TEST RunCMake.CXXModules APPEND + PROPERTY LABELS "CXXModules") # ctresalloc links against CMakeLib and CTestLib, which means it can't be built # if CMake_TEST_EXTERNAL_CMAKE is activated (the compiler might be different.)
diff --git a/Tests/RunCMake/CMakePresetsBuild/TestVariable.cmake b/Tests/RunCMake/CMakePresetsBuild/TestVariable.cmake index 3113dcc..17b0ee2 100644 --- a/Tests/RunCMake/CMakePresetsBuild/TestVariable.cmake +++ b/Tests/RunCMake/CMakePresetsBuild/TestVariable.cmake
@@ -5,8 +5,8 @@ else() set(actual_value "${CMAKE_MATCH_1}") if(NOT "${actual_value}" MATCHES "${expected_value}") - string(REPLACE "\n" "\n " _actual "${expected_value}") - string(REPLACE "\n" "\n " _expect "${actual_value}") + string(REPLACE "\n" "\n " _actual "${actual_value}") + string(REPLACE "\n" "\n " _expect "${expected_value}") string(APPEND RunCMake_TEST_FAILED "Expected value of environment variable '${name}':\n ${_expect}\nActual value:\n ${_actual}\n") endif() endif()
diff --git a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake index 8ed2f97..9a8e698 100644 --- a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake +++ b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
@@ -1,6 +1,12 @@ include(RunCMake) -run_cmake(Inspect) +set(stdlib_custom_json) +if (CMake_TEST_CXX_STDLIB_MODULES_JSON) + list(APPEND stdlib_custom_json + -DCMAKE_CXX_STDLIB_MODULES_JSON=${CMake_TEST_CXX_STDLIB_MODULES_JSON}) +endif () + +run_cmake(Inspect ${stdlib_custom_json}) include("${RunCMake_BINARY_DIR}/Inspect-build/info.cmake") # Test negative cases where C++20 modules do not work. @@ -149,6 +155,10 @@ else () set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug) endif () + if (directory MATCHES "import-std") + list(APPEND RunCMake_TEST_OPTIONS + ${stdlib_custom_json}) + endif () if (RunCMake_CXXModules_INSTALL) set(prefix "${RunCMake_BINARY_DIR}/examples/${test_name}-install")
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index ae796d8..ca553bd 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -413,7 +413,7 @@ unset(ENV{CMAKE_GENERATOR_PLATFORM}) endif() # Instance is available since VS 2017. - if(RunCMake_GENERATOR MATCHES "Visual Studio 1[567].*") + if(RunCMake_GENERATOR MATCHES "Visual Studio 1[5678].*") set(ENV{CMAKE_GENERATOR_INSTANCE} "invalid") # Envvar shouldn't affect existing build tree run_cmake_command(Envgen-instance-existing ${CMAKE_COMMAND} -E chdir ..
diff --git a/Tests/RunCMake/FindPython/Android.cmake b/Tests/RunCMake/FindPython/Android.cmake new file mode 100644 index 0000000..bafba7f --- /dev/null +++ b/Tests/RunCMake/FindPython/Android.cmake
@@ -0,0 +1,51 @@ +enable_language(C) + +set(components Development.Embed Development.Module Development.SABIModule) +find_package(Python REQUIRED COMPONENTS ${components}) + +foreach(component ${components}) + set(found_var Python_${component}_FOUND) + if(NOT ${found_var}) + message(FATAL_ERROR "${found_var} is not set") + endif() +endforeach() + +set(android_root "${CMAKE_SOURCE_DIR}/android_root") +if(NOT Python_INCLUDE_DIRS STREQUAL "${android_root}/include/python3.13") + message(FATAL_ERROR "Python_INCLUDE_DIRS=${Python_INCLUDE_DIRS}") +endif() +if(NOT Python_LIBRARIES STREQUAL "${android_root}/lib/libpython3.13.so") + message(FATAL_ERROR "Python_LIBRARIES=${Python_LIBRARIES}") +endif() +if(NOT Python_SABI_LIBRARIES STREQUAL "${android_root}/lib/libpython3.so") + message(FATAL_ERROR "Python_SABI_LIBRARIES=${Python_SABI_LIBRARIES}") +endif() + +foreach(target Python::Python Python::Module Python::SABIModule) + if(NOT TARGET ${target}) + message(FATAL_ERROR "Target ${target} does not exist") + endif() + + # The Module and SABIModule targets will be SHARED_LIBRARY if Python modules should + # link against libpython (as on Android), and INTERFACE_LIBRARY if they should not (as + # on Linux). + get_target_property(target_type ${target} TYPE) + if(NOT target_type STREQUAL SHARED_LIBRARY) + message(FATAL_ERROR "${target} TYPE=${target_type}") + endif() + + get_target_property(target_location ${target} LOCATION) + if(target STREQUAL "Python::SABIModule") + set(expected "${android_root}/lib/libpython3.so") + else() + set(expected "${android_root}/lib/libpython3.13.so") + endif() + if(NOT target_location STREQUAL expected) + message(FATAL_ERROR "${target} LOCATION=${target_location}") + endif() + + get_target_property(target_include ${target} INTERFACE_INCLUDE_DIRECTORIES) + if(NOT target_include STREQUAL "${android_root}/include/python3.13") + message(FATAL_ERROR "${target} INTERFACE_INCLUDE_DIRECTORIES=${target_include}") + endif() +endforeach()
diff --git a/Tests/RunCMake/FindPython/RunCMakeTest.cmake b/Tests/RunCMake/FindPython/RunCMakeTest.cmake index 5d3518f..a4d667d 100644 --- a/Tests/RunCMake/FindPython/RunCMakeTest.cmake +++ b/Tests/RunCMake/FindPython/RunCMakeTest.cmake
@@ -322,6 +322,7 @@ run_python(ArtifactsInteractive VARIANT "OFF" OPTIONS -DCMake_TEST_FindPython3_NumPy=${CMake_TEST_FindPython3_NumPy} -DPython3_ARTIFACTS_INTERACTIVE=OFF) + run_python(Android OPTIONS "-DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/android_toolchain.cmake") endif() if(CMake_TEST_FindPython2 OR CMake_TEST_FindPython3)
diff --git a/Tests/RunCMake/FindPython/android_root/README.txt b/Tests/RunCMake/FindPython/android_root/README.txt new file mode 100644 index 0000000..ae55f92 --- /dev/null +++ b/Tests/RunCMake/FindPython/android_root/README.txt
@@ -0,0 +1 @@ +This directory contains a dummy Python installation tree for the Android test.
diff --git a/Tests/RunCMake/FindPython/android_root/include/python3.13/Python.h b/Tests/RunCMake/FindPython/android_root/include/python3.13/Python.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/FindPython/android_root/include/python3.13/Python.h
diff --git a/Tests/RunCMake/FindPython/android_root/include/python3.13/patchlevel.h b/Tests/RunCMake/FindPython/android_root/include/python3.13/patchlevel.h new file mode 100644 index 0000000..9c7b8de --- /dev/null +++ b/Tests/RunCMake/FindPython/android_root/include/python3.13/patchlevel.h
@@ -0,0 +1 @@ +#define PY_VERSION "3.13.0"
diff --git a/Tests/RunCMake/FindPython/android_root/include/python3.13/pyconfig.h b/Tests/RunCMake/FindPython/android_root/include/python3.13/pyconfig.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/FindPython/android_root/include/python3.13/pyconfig.h
diff --git a/Tests/RunCMake/FindPython/android_root/lib/libpython3.13.so b/Tests/RunCMake/FindPython/android_root/lib/libpython3.13.so new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/FindPython/android_root/lib/libpython3.13.so
diff --git a/Tests/RunCMake/FindPython/android_root/lib/libpython3.so b/Tests/RunCMake/FindPython/android_root/lib/libpython3.so new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/FindPython/android_root/lib/libpython3.so
diff --git a/Tests/RunCMake/FindPython/android_toolchain.cmake b/Tests/RunCMake/FindPython/android_toolchain.cmake new file mode 100644 index 0000000..c588c16 --- /dev/null +++ b/Tests/RunCMake/FindPython/android_toolchain.cmake
@@ -0,0 +1,8 @@ +set(CMAKE_SYSTEM_NAME Android) + +# This test doesn't require the NDK, so inhibit CMake's NDK handling code. +set(CMAKE_SYSTEM_VERSION 1) + +set(CMAKE_FIND_ROOT_PATH "${CMAKE_SOURCE_DIR}/android_root") +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
diff --git a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake index b1c758a..8322ef2 100644 --- a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
@@ -27,7 +27,7 @@ unset(RunCMake_TEST_OPTIONS) endif() -if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio (1[4567])( 20[0-9][0-9])?$") +if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio (1[45678])( 20[0-9][0-9])?$") unset(ENV{WindowsSDKVersion}) set(RunCMake_GENERATOR_PLATFORM "Test Platform,nocomma")
diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake index 80d1d5e..8348711 100644 --- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
@@ -64,7 +64,7 @@ run_cmake(BadToolsetHostArch) set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64,host=x86") run_cmake(BadToolsetHostArchTwice) - if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[567]") + if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[5678]") set(RunCMake_GENERATOR_TOOLSET "VCTargetsPath=Test Path") run_cmake(TestToolsetVCTargetsPathOnly) set(RunCMake_GENERATOR_TOOLSET "Test Toolset,version=Test Toolset Version")
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake index 9d5d0b5..c15b572 100644 --- a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake
@@ -2,7 +2,7 @@ message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") message(STATUS "CMAKE_HOST_SYSTEM_PROCESSOR='${CMAKE_HOST_SYSTEM_PROCESSOR}'") -if(CMAKE_GENERATOR MATCHES "Visual Studio 1[67]") +if(CMAKE_GENERATOR MATCHES "Visual Studio 1[678]") cmake_host_system_information(RESULT is_64_bit QUERY IS_64BIT) if(is_64_bit) if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "ARM64")
diff --git a/Tests/RunCMake/ParseImplicitData/linux-Fortran-LFortran-0.55.0-clang.input b/Tests/RunCMake/ParseImplicitData/linux-Fortran-LFortran-0.55.0-clang.input new file mode 100644 index 0000000..8e4e5dd --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/linux-Fortran-LFortran-0.55.0-clang.input
@@ -0,0 +1,38 @@ +CMAKE_LANG=Fortran +CMAKE_LINKER=/usr/bin/ld +CMAKE_Fortran_COMPILER_ABI=ELF +CMAKE_Fortran_COMPILER_AR= +CMAKE_Fortran_COMPILER_ARCHITECTURE_ID=x86_64 +CMAKE_Fortran_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_Fortran_COMPILER_ID=LFortran +CMAKE_Fortran_COMPILER_LAUNCHER= +CMAKE_Fortran_COMPILER_LOADED=1 +CMAKE_Fortran_COMPILER_RANLIB= +CMAKE_Fortran_COMPILER_TARGET= +CMAKE_Fortran_COMPILER_VERSION=0.55.0 +CMAKE_Fortran_COMPILER_VERSION_INTERNAL= +Change Dir: '/tmp/ii/CMakeFiles/CMakeTmp' + +Run Build Command(s): /tmp/CMake/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_1058c/fast +/usr/bin/gmake -f CMakeFiles/cmTC_1058c.dir/build.make CMakeFiles/cmTC_1058c.dir/build +gmake[1]: Entering directory '/tmp/ii/CMakeFiles/CMakeTmp' +Building Fortran object CMakeFiles/cmTC_1058c.dir/CMakeFortranCompilerABI.F.o +/usr/bin/lfortran --cpp-infer --linker=clang -v -Wl,-v -c /tmp/CMake/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_1058c.dir/CMakeFortranCompilerABI.F.o +Linking Fortran executable cmTC_1058c +/tmp/CMake/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1058c.dir/link.txt --verbose=1 +clang -o cmTC_1058c CMakeFiles/cmTC_1058c.dir/CMakeFortranCompilerABI.F.o -L"/usr/bin/../lib64" -Wl,-rpath,"/usr/bin/../lib64" -Wl,-v -llfortran_runtime -lm -v +clang version 21.1.1 (Fedora 21.1.1-1.fc43) +Target: x86_64-redhat-linux-gnu +Thread model: posix +InstalledDir: /usr/bin +Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang.cfg +System configuration file directory: /etc/clang/ +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/15 +Selected GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/15 +Candidate multilib: .@m64 +Candidate multilib: 32@m32 +Selected multilib: .@m64 + "/usr/bin/ld" --hash-style=gnu --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_1058c /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crt1.o /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crti.o /usr/bin/../lib/gcc/x86_64-redhat-linux/15/crtbegin.o -L/usr/bin/../lib64 -L/usr/bin/../lib/clang/21/lib/x86_64-redhat-linux-gnu -L/usr/bin/../lib/gcc/x86_64-redhat-linux/15 -L/usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../lib64 -L/lib/../lib64 -L/usr/lib64 -L/lib -L/usr/lib CMakeFiles/cmTC_1058c.dir/CMakeFortranCompilerABI.F.o -rpath /usr/bin/../lib64 -v -llfortran_runtime -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-redhat-linux/15/crtend.o /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crtn.o +GNU ld version 2.45-1.fc43 +/usr/bin/lfortran -v -Wl,-v --linker=clang CMakeFiles/cmTC_1058c.dir/CMakeFortranCompilerABI.F.o -o cmTC_1058c +gmake[1]: Leaving directory '/tmp/ii/CMakeFiles/CMakeTmp'
diff --git a/Tests/RunCMake/ParseImplicitData/linux-Fortran-LFortran-0.55.0-gcc.input b/Tests/RunCMake/ParseImplicitData/linux-Fortran-LFortran-0.55.0-gcc.input new file mode 100644 index 0000000..376ee07 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/linux-Fortran-LFortran-0.55.0-gcc.input
@@ -0,0 +1,43 @@ +CMAKE_LANG=Fortran +CMAKE_LINKER=/usr/bin/ld +CMAKE_Fortran_COMPILER_ABI=ELF +CMAKE_Fortran_COMPILER_AR= +CMAKE_Fortran_COMPILER_ARCHITECTURE_ID=x86_64 +CMAKE_Fortran_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_Fortran_COMPILER_ID=LFortran +CMAKE_Fortran_COMPILER_LAUNCHER= +CMAKE_Fortran_COMPILER_LOADED=1 +CMAKE_Fortran_COMPILER_RANLIB= +CMAKE_Fortran_COMPILER_TARGET= +CMAKE_Fortran_COMPILER_VERSION=0.55.0 +CMAKE_Fortran_COMPILER_VERSION_INTERNAL= +Change Dir: '/tmp/ii/CMakeFiles/CMakeTmp' + +Run Build Command(s): /tmp/CMake/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_e5d48/fast +/usr/bin/gmake -f CMakeFiles/cmTC_e5d48.dir/build.make CMakeFiles/cmTC_e5d48.dir/build +gmake[1]: Entering directory '/tmp/ii/CMakeFiles/CMakeTmp' +Building Fortran object CMakeFiles/cmTC_e5d48.dir/CMakeFortranCompilerABI.F.o +/usr/bin/lfortran --cpp-infer --linker=gcc -v -Wl,-v -c /tmp/CMake/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_e5d48.dir/CMakeFortranCompilerABI.F.o +Linking Fortran executable cmTC_e5d48 +/tmp/CMake/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e5d48.dir/link.txt --verbose=1 +gcc -o cmTC_e5d48 CMakeFiles/cmTC_e5d48.dir/CMakeFortranCompilerABI.F.o -L"/usr/bin/../lib64" -Wl,-rpath,"/usr/bin/../lib64" -Wl,-v -llfortran_runtime -lm -v +Using built-in specs. +COLLECT_GCC=gcc +COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/15/lto-wrapper +OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-redhat-linux +Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,cobol,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-15.2.1-build/gcc-15.2.1-20250808/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none,amdgcn-amdhsa --enable-offload-defaulted --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1 +Thread model: posix +Supported LTO compression algorithms: zlib zstd +gcc version 15.2.1 20250808 (Red Hat 15.2.1-1) (GCC) +COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/15/:/usr/libexec/gcc/x86_64-redhat-linux/15/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/15/:/usr/lib/gcc/x86_64-redhat-linux/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/15/:/usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/15/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-o' 'cmTC_e5d48' '-L/usr/bin/../lib64' '-foffload-options=-l_GCC_m' '-v' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_e5d48.' + /usr/libexec/gcc/x86_64-redhat-linux/15/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/15/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/15/lto-wrapper -plugin-opt=-fresolution=/tmp/cc5Ml5eq.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_e5d48 /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/15/crtbegin.o -L/usr/bin/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/15 -L/usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/15/../../.. -L/lib -L/usr/lib CMakeFiles/cmTC_e5d48.dir/CMakeFortranCompilerABI.F.o -rpath /usr/bin/../lib64 -v -llfortran_runtime -lm -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-redhat-linux/15/crtend.o /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crtn.o +collect2 version 15.2.1 20250808 (Red Hat 15.2.1-1) +/usr/bin/ld -plugin /usr/libexec/gcc/x86_64-redhat-linux/15/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/15/lto-wrapper -plugin-opt=-fresolution=/tmp/cc5Ml5eq.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_e5d48 /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/15/crtbegin.o -L/usr/bin/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/15 -L/usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/15/../../.. -L/lib -L/usr/lib CMakeFiles/cmTC_e5d48.dir/CMakeFortranCompilerABI.F.o -rpath /usr/bin/../lib64 -v -llfortran_runtime -lm -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-redhat-linux/15/crtend.o /usr/lib/gcc/x86_64-redhat-linux/15/../../../../lib64/crtn.o +GNU ld version 2.45-1.fc43 +COLLECT_GCC_OPTIONS='-o' 'cmTC_e5d48' '-L/usr/bin/../lib64' '-foffload-options=-l_GCC_m' '-v' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_e5d48.' +/usr/bin/lfortran -v -Wl,-v --linker=gcc CMakeFiles/cmTC_e5d48.dir/CMakeFortranCompilerABI.F.o -o cmTC_e5d48 +gmake[1]: Leaving directory '/tmp/ii/CMakeFiles/CMakeTmp'
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake index fef216d..46d5c8d 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake +++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
@@ -48,6 +48,8 @@ linux-Fortran-LFortran-0.35.0-gcc linux-Fortran-LFortran-0.41.0-clang linux-Fortran-LFortran-0.41.0-gcc + linux-Fortran-LFortran-0.55.0-clang + linux-Fortran-LFortran-0.55.0-gcc linux-custom_clang-C-Clang-13.0.0 linux-custom_clang-CXX-Clang-13.0.0 mingw.org-C-GNU-4.9.3 mingw.org-CXX-GNU-4.9.3 netbsd-C-GNU-4.8.5 netbsd-CXX-GNU-4.8.5
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-LFortran-0.55.0-clang.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-LFortran-0.55.0-clang.output new file mode 100644 index 0000000..8243850 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-LFortran-0.55.0-clang.output
@@ -0,0 +1,4 @@ +libs=lfortran_runtime;m;gcc;gcc_s;c;gcc;gcc_s +dirs=/usr/lib64;/usr/lib/clang/21/lib/x86_64-redhat-linux-gnu;/usr/lib/gcc/x86_64-redhat-linux/15;/lib64;/lib;/usr/lib +library_arch=x86_64-redhat-linux-gnu +linker_tool=/usr/bin/ld
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-LFortran-0.55.0-gcc.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-LFortran-0.55.0-gcc.output new file mode 100644 index 0000000..c04e12b --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-LFortran-0.55.0-gcc.output
@@ -0,0 +1,4 @@ +libs=lfortran_runtime;m;gcc;gcc_s;c;gcc;gcc_s +dirs=/usr/lib64;/usr/lib/gcc/x86_64-redhat-linux/15;/lib64;/usr/lib;/lib +library_arch= +linker_tool=/usr/bin/ld
diff --git a/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-BE-result.txt b/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-BE-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-BE-result.txt
@@ -0,0 +1 @@ +1
diff --git a/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-BE-stderr.txt b/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-BE-stderr.txt new file mode 100644 index 0000000..d6c4874 --- /dev/null +++ b/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-BE-stderr.txt Binary files differ
diff --git a/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-BE.cmake b/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-BE.cmake new file mode 100644 index 0000000..da856c1 --- /dev/null +++ b/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-BE.cmake Binary files differ
diff --git a/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-LE-result.txt b/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-LE-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-LE-result.txt
@@ -0,0 +1 @@ +1
diff --git a/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-LE-stderr.txt b/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-LE-stderr.txt new file mode 100644 index 0000000..c6968f9 --- /dev/null +++ b/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-LE-stderr.txt Binary files differ
diff --git a/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-LE.cmake b/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-LE.cmake new file mode 100644 index 0000000..6e00d25 --- /dev/null +++ b/Tests/RunCMake/Syntax/Broken-BOM-UTF-32-LE.cmake Binary files differ
diff --git a/Tests/RunCMake/Syntax/NullAfterBackslash-stderr.txt b/Tests/RunCMake/Syntax/NullAfterBackslash-stderr.txt index e7ba440..1312f90 100644 --- a/Tests/RunCMake/Syntax/NullAfterBackslash-stderr.txt +++ b/Tests/RunCMake/Syntax/NullAfterBackslash-stderr.txt
@@ -1,5 +1,5 @@ CMake Error at NullAfterBackslash.cmake:1: Parse error. Function missing ending "\)". Instead found bad character - with text "\\". + with text "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\". Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/NullTerminatedArgument-stderr.txt b/Tests/RunCMake/Syntax/NullTerminatedArgument-stderr.txt index f26754e..ff3606c 100644 --- a/Tests/RunCMake/Syntax/NullTerminatedArgument-stderr.txt +++ b/Tests/RunCMake/Syntax/NullTerminatedArgument-stderr.txt
@@ -1,5 +1,5 @@ CMake Error at NullTerminatedArgument.cmake:1: Parse error. Function missing ending "\)". Instead found bad character - with text "". + with text "TEST0000000000000000000000000". Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake index 2817f76..42ea532 100644 --- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake +++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
@@ -5,6 +5,8 @@ run_cmake(BOM-UTF-16-BE) run_cmake(BOM-UTF-32-LE) run_cmake(BOM-UTF-32-BE) +run_cmake(Broken-BOM-UTF-32-LE) +run_cmake(Broken-BOM-UTF-32-BE) run_cmake(CommandSpaces) run_cmake(CommandTabs) run_cmake(CommandNewlines)
diff --git a/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt b/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt index 5689289..9080c24 100644 --- a/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt +++ b/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt
@@ -26,7 +26,12 @@ endfunction() if(CMAKE_Fortran_COMPILER_ID STREQUAL "LFortran") - add_compile_options(--implicit-interface --generate-object-code) + if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "0.55") + set(_LFORTRAN_SC_FLAG --separate-compilation) + else() + set(_LFORTRAN_SC_FLAG --generate-object-code) + endif() + add_compile_options(--implicit-interface ${_LFORTRAN_SC_FLAG}) endif() # check for the fortran c interface mangling
diff --git a/Utilities/Scripts/regenerate-lexers.bash b/Utilities/Scripts/regenerate-lexers.bash index 4bf767f..2d72c20 100755 --- a/Utilities/Scripts/regenerate-lexers.bash +++ b/Utilities/Scripts/regenerate-lexers.bash
@@ -12,7 +12,6 @@ extra_args_CommandArgument="--never-interactive --batch" for lexer in \ - CommandArgument \ CTestResourceGroups \ DependsJava \ Expr \
diff --git a/Utilities/Scripts/regenerate-parsers.bash b/Utilities/Scripts/regenerate-parsers.bash index 33b59f7..72a88f0 100755 --- a/Utilities/Scripts/regenerate-parsers.bash +++ b/Utilities/Scripts/regenerate-parsers.bash
@@ -10,7 +10,6 @@ pushd "${BASH_SOURCE%/*}/../../Source/LexerParser" > /dev/null for parser in \ - CommandArgument \ DependsJava \ Expr \ Fortran
diff --git a/Utilities/std/cm/bits/string_view.cxx b/Utilities/std/cm/bits/string_view.cxx index bd5fb60..4a18e2f 100644 --- a/Utilities/std/cm/bits/string_view.cxx +++ b/Utilities/std/cm/bits/string_view.cxx
@@ -85,9 +85,12 @@ string_view::size_type string_view::find(string_view v, size_type pos) const noexcept { - for (; pos + v.size_ <= size_; ++pos) { - if (std::char_traits<char>::compare(data_ + pos, v.data_, v.size_) == 0) { - return pos; + if (pos < size_) { + for (; pos + v.size_ <= size_; ++pos) { + if (std::char_traits<char>::compare(data_ + pos, v.data_, v.size_) == + 0) { + return pos; + } } } return npos;