On my local i386 iMAC it works? bash-5.2$ uname -a
Darwin Claus-iMac.fritz.box 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64 x86_64 i386 Darwin
bash-5.2$
-- The CXX compiler identification is GNU 14.1.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/g++-14 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/local/bin/git (found version "2.45.2")
-- CPM: Adding package project_options@0.29.0 (v0.29.0 at /Users/clausklein/.cache/CPM/project_options/0e3c3707685b2c6fe672bed1a7777cc774e65099)
-- The default CMAKE_C_STANDARD used by external targets and tools is not set yet. Using the latest supported C standard that is 90
-- /usr/local/bin/ccache found and enabled
-- Found Python: /Users/clausklein/.direnv/python-3.12/bin/python3.12 (found version "3.12.4") found components: Interpreter
-- CPM: Adding package Format.cmake@1.8.0 (v1.8.0 at /Users/clausklein/.cache/CPM/format.cmake/06265f78ebb8ff13ed1c78918ea1164580c48853)
-- CPM: Adding package PackageProject.cmake@1.11.0 (v1.11.0 at /Users/clausklein/.cache/CPM/packageproject.cmake/fc402989ee6e628476b3d8661f8f96774d89df74)
-- {fmt} version: 11.0.1
-- Build type: Release
-- CPM: Adding package fmt@11.0.1 (11.0.1 at /Users/clausklein/.cache/CPM/fmt/73b5ec45edbd92babfd91c3777a9e1ab9cac8238)
-- Configuring done (1.8s)
-- Generating done (0.2s)
-- Build files have been written to: /Users/clausklein/Workspace/cpp/cxx20/cppstd20-code/build/Release
Executing workflow step 2 of 5: build preset "Release"
[38/40] Generating CXX dyndep file lib/CMakeFiles/swap.dir/CXX.dd
Executing workflow step 3 of 5: test preset "Release"
This seems…wrong (as with other similar paths I see). The compiler should be searching this path on its own already. Listing it explicitly could mess up the search order.
The crash is definitely a GCC problem though…a better error message about the actual problem being encountered would be nice.
cmake -G Ninja -S . -B build -D BUILD_SHARED_LIBS=YES -D CMAKE_PREFIX_PATH=/Users/clausklein/Workspace/cpp/cxx20/boost-modules-bench/stagedir --fresh #XXX --debug-find-pkg=Asio
-- The CXX compiler identification is Clang 18.1.8
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenSSL: /usr/local/Cellar/openssl@3/3.3.1/lib/libcrypto.dylib (found version "3.3.1")
-- LLVM_ROOT=/usr/local/Cellar/llvm/18.1.8
-- CMAKE_CXX_COMPILER_IMPORT_STD=23
-- USE_MODULES=TRUE
-- LLVM_LIBC_SOURCE=/usr/local/Cellar/llvm/18.1.8/share/libc++/v1
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for sprintf_s
-- Looking for sprintf_s - not found
-- HAS_STDLIB_MODULES=stdlib
-- ASIO_ROOT is: /Users/clausklein/Workspace/cpp/cxx20/boost-modules-bench/stagedir
-- Configuring done (2.8s)
CMake Error in CMakeLists.txt:
The "CXX_MODULE_STD" property on the target "stdlib" requires that the
"__CMAKE::CXX23" target exist, but it was not provided by the toolchain.
Reason:
Experimental `import std` support not enabled when detecting toolchain; it must be set before `CXX` is enabled (usually a `project()` call)