Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use C++23 standard library modules #3

Open
rdong8 opened this issue Feb 12, 2024 · 2 comments
Open

Use C++23 standard library modules #3

rdong8 opened this issue Feb 12, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@rdong8
Copy link
Owner

rdong8 commented Feb 12, 2024

This is going to require Clang 18+, and some future CMake version since the standard library modules are currently unsupported by any version of CMake.

@rdong8 rdong8 added the enhancement New feature or request label Feb 12, 2024
@rdong8 rdong8 self-assigned this Feb 12, 2024
@rdong8
Copy link
Owner Author

rdong8 commented Aug 10, 2024

Seems broken on CMake 3.30.2.

-- The CXX compiler identification is Clang 18.1.6
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
CMake Warning (dev) at /var/lib/snapd/snap/cmake/1409/share/cmake-3.30/Modules/Compiler/CMakeCommonCompilerMacros.cmake:248 (cmake_language):
  CMake's support for `import std;` in C++23 and newer is experimental.  It
  is meant only for experimentation and feedback to CMake developers.
Call Stack (most recent call first):
  /var/lib/snapd/snap/cmake/1409/share/cmake-3.30/Modules/CMakeDetermineCompilerSupport.cmake:113 (cmake_create_cxx_import_std)
  /var/lib/snapd/snap/cmake/1409/share/cmake-3.30/Modules/CMakeTestCXXCompiler.cmake:83 (CMAKE_DETERMINE_COMPILER_SUPPORT)
  CMakeLists.txt:14 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Detecting CXX compile features - done
-- Configuring done (0.6s)
CMake Error in CMakeLists.txt:
  The "CXX_MODULE_STD" property on the target "uses_std" requires that the
  "__CMAKE::CXX23" target exist, but it was not provided by the toolchain.
  Reason:

    Only `libc++` is supported


-- Generating done (0.0s)
CMake Generate step failed.  Build files cannot be regenerated correctly.

@rdong8
Copy link
Owner Author

rdong8 commented Aug 20, 2024

https://gitlab.kitware.com/cmake/cmake/-/issues/25965

Looks like Clang 19 may fix some of these issues. Currently Fedora 40 ships Clang 18 so I need to wait to check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant