Skip to content

Use <filesystem> for VS2026 (MSVC Build Tools v14.51)#497

Merged
lo-simon merged 1 commit into
sony:masterfrom
garethsb:patch-11
Jun 24, 2026
Merged

Use <filesystem> for VS2026 (MSVC Build Tools v14.51)#497
lo-simon merged 1 commit into
sony:masterfrom
garethsb:patch-11

Conversation

@garethsb

Copy link
Copy Markdown
Contributor

See May Update 18.6.0 > C++ > MSVC Build Tools v14.51 > Standard Library (STL) > "We've removed long-deprecated non-Standard features" at https://learn.microsoft.com/en-us/visualstudio/releases/2026/release-notes

See May Update 18.6.0 > C++ > MSVC Build Tools v14.51 > Standard Library (STL) > "We've removed long-deprecated non-Standard features" at https://learn.microsoft.com/en-us/visualstudio/releases/2026/release-notes
@garethsb

Copy link
Copy Markdown
Contributor Author

Comparing an unsuccessful CI run with a successful one, the pre-existing code is failing on the run where it builds with:

[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=195
os=Windows

which results in:

-- Building for: Visual Studio 18 2026
-- Using Conan toolchain: D:/a/nvnmos/nvnmos/src/conan/conan_toolchain.cmake
-- Conan toolchain: CMAKE_GENERATOR_TOOLSET=v145
-- Conan toolchain: Setting CMAKE_MSVC_RUNTIME_LIBRARY=$<$<CONFIG:Release>:MultiThreadedDLL>
-- Conan toolchain: C++ Standard 14 with extensions OFF
-- The C compiler identification is MSVC 19.51.36247.0
-- The CXX compiler identification is MSVC 19.51.36247.0
...
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/18/Enterprise/VC/Tools/MSVC/14.51.36231/bin/Hostx64/x64/cl.exe - skipped

In the successful run:

[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=194
os=Windows

results in:

-- Building for: Visual Studio 18 2026
-- Using Conan toolchain: D:/a/nvnmos/nvnmos/src/conan/conan_toolchain.cmake
-- Conan toolchain: CMAKE_GENERATOR_TOOLSET=v143
-- Conan toolchain: Setting CMAKE_MSVC_RUNTIME_LIBRARY=$<$<CONFIG:Release>:MultiThreadedDLL>
-- Conan toolchain: C++ Standard 17 with extensions OFF
-- The C compiler identification is MSVC 19.44.35228.0
-- The CXX compiler identification is MSVC 19.44.35228.0
...
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/18/Enterprise/VC/Tools/MSVC/14.44.35207/bin/HostX64/x64/cl.exe - skipped

#elif defined(_MSC_VER)

#if _MSC_VER >= 1910
#if _MSC_VER >= 1951

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be 1950 instead of 1951?
See MSCV Build Tools version table in https://learn.microsoft.com/en-us/cpp/overview/compiler-versions?view=msvc-180

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not according to the release notes that I linked.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right.

@lo-simon lo-simon merged commit a8aafdb into sony:master Jun 24, 2026
10 checks passed
@garethsb

Copy link
Copy Markdown
Contributor Author

FWIW, I'm having a different problem when using the nmos-cpp/cci.20260622 recipe with VS 2026 / MSVC 195.

nmos-cpp/cci.20260602: Running CMake.configure()
nmos-cpp/cci.20260602: RUN: cmake -G "Visual Studio 18 2026" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/runneradmin/.conan2/p/b/nmos-e4a4df19ec734/p" -DCMAKE_FIND_PACKAGE_PREFER_CONFIG="ON" -DCONAN_EXPORTED="ON" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:/Users/runneradmin/.conan2/p/b/nmos-e4a4df19ec734/b/src/Development"
CMake Error: Could not create named generator Visual Studio 18 2026

Generators
  Visual Studio 17 2022        = Generates Visual Studio 2022 project files.
                                 Use -A option to specify architecture.
  ...

According to conan-io/conan-center-index#28884, CMake 4.2 is the first version that supports "Visual Studio 18 2026". I'm going to investigate overriding the recipe with cmake/[>=3.17 <5].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants