Draft
Conversation
812b3a8 to
c967193
Compare
Author
|
@ednolan If I install only the module library, you see this error If a user want to use it: bash-5.3$ CXX=clang++ cmake -S . -B build -D BEMAN_USE_MODULES=1 -D CMAKE_CXX_STANDARD=23 -D BEMAN_USE_STD_MODULE=1 -Wdev --log-level=VERBOSE --fresh
-- CXXFLAGS=-stdlib=libc++
'brew' '--prefix' 'llvm'
-- LLVM_DIR=/usr/local/Cellar/llvm/22.1.0
-- CMAKE_CXX_STDLIB_MODULES_JSON=/usr/local/Cellar/llvm/22.1.0/lib/c++/libc++.modules.json
-- The CXX compiler identification is Clang 22.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/Cellar/llvm/22.1.0/bin/clang++ - skipped
-- Detecting CXX compile features
CMake Warning (dev) at /Users/clausklein/.direnv/python-3.14/lib/python3.14/site-packages/cmake/data/share/cmake-4.2/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):
/Users/clausklein/.direnv/python-3.14/lib/python3.14/site-packages/cmake/data/share/cmake-4.2/Modules/CMakeDetermineCompilerSupport.cmake:113 (cmake_create_cxx_import_std)
/Users/clausklein/.direnv/python-3.14/lib/python3.14/site-packages/cmake/data/share/cmake-4.2/Modules/CMakeTestCXXCompiler.cmake:83 (CMAKE_DETERMINE_COMPILER_SUPPORT)
CMakeLists.txt:7 (project)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Detecting CXX compile features - done
-- CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES=/usr/local/Cellar/llvm/22.1.0/include/c++/v1;/usr/local/Cellar/llvm/22.1.0/lib/clang/22/include;/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include
-- CMAKE_CXX_STDLIB_MODULES_JSON=/usr/local/Cellar/llvm/22.1.0/lib/c++/libc++.modules.json
-- BEMAN_USE_MODULES=1
-- BEMAN_USE_STD_MODULE=1
-- CMAKE_CXX_COMPILER_IMPORT_STD=23;26
-- BEMAN_HAS_IMPORT_STD=ON
Examples to be built: transform_view_direct_usage
-- Configuring done (1.1s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/clausklein/Workspace/cpp/beman-project/transform_view/examples/build
bash-5.3$ ninja -C build/
ninja: Entering directory `build/'
[2/12] Scanning /Users/clausklein/.local/lib/cmake/beman.transform_view/modules/transform_view.cppm for CXX dependencies
FAILED: [code=1] CMakeFiles/beman__transform_view_module@synth_50bb36f7aaa7.dir/e891b98e2521.bmi.ddi
"/usr/local/Cellar/llvm/22.1.0/bin/clang-scan-deps" -format=p1689 -- /usr/local/Cellar/llvm/22.1.0/bin/clang++ -DBEMAN_HAS_IMPORT_STD -DBEMAN_HAS_MODULES -I/usr/local/Cellar/llvm/22.1.0/include -I/usr/local/Cellar/llvm/22.1.0/include/c++/v1 -I/usr/local/Cellar/llvm/22.1.0/lib/clang/22/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include -isystem /Users/clausklein/.local/include -stdlib=libc++ -std=gnu++26 -stdlib=libc++ --precompile -x c++ /Users/clausklein/.local/lib/cmake/beman.transform_view/modules/transform_view.cppm -c -o CMakeFiles/beman__transform_view_module@synth_50bb36f7aaa7.dir/e891b98e2521.bmi -resource-dir "/usr/local/Cellar/llvm/22.1.0/lib/clang/22" -MT CMakeFiles/beman__transform_view_module@synth_50bb36f7aaa7.dir/e891b98e2521.bmi.ddi -MD -MF CMakeFiles/beman__transform_view_module@synth_50bb36f7aaa7.dir/e891b98e2521.bmi.ddi.d > CMakeFiles/beman__transform_view_module@synth_50bb36f7aaa7.dir/e891b98e2521.bmi.ddi.tmp && mv CMakeFiles/beman__transform_view_module@synth_50bb36f7aaa7.dir/e891b98e2521.bmi.ddi.tmp CMakeFiles/beman__transform_view_module@synth_50bb36f7aaa7.dir/e891b98e2521.bmi.ddi
warning: argument unused during compilation: '-c'
Diagnostics while scanning dependencies for '/Users/clausklein/.local/lib/cmake/beman.transform_view/modules/transform_view.cppm':
warning: argument unused during compilation: '-c'
/Users/clausklein/.local/lib/cmake/beman.transform_view/modules/transform_view.cppm:16:10: fatal error: 'beman/transform_view/transform_view.hpp' file not found
[3/12] Scanning /usr/local/Cellar/llvm/22.1.0/share/libc++/v1/std.cppm for CXX dependencies
ninja: build stopped: subcommand failed.
bash-5.3$``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
find-install-rount-trip-testbrew g++-15on OSXbrew clang-20with my workarounds OSX no STD MODULE supported from CMake yet!Note: the module use an empty
FILE_SET HEADERS, with this, the installed package can't be used!see https://discourse.cmake.org/t/why-are-the-build-and-installed-bmi-files-not-used/15367
and https://discourse.bemanproject.org/t/c-20-modules-in-beman-project-libraries/279/39?u=clausklein