-
-
Notifications
You must be signed in to change notification settings - Fork 814
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
Cannot generate correct cmakelists.txt with c++20 modules. #3642
Comments
你调下那个 cmakelists 。看哪里不对, |
CMakeLists.txt # this is the build file for project leetcode-treenode-cpp
# it is autogenerated by the xmake build system.
# do not edit by hand.
# project
cmake_minimum_required(VERSION 3.15.0)
cmake_policy(SET CMP0091 NEW)
project(leetcode-treenode-cpp VERSION 1.1.4 LANGUAGES CXX C)
# target
add_library(leetcode-treenode-cpp STATIC "")
set_target_properties(leetcode-treenode-cpp PROPERTIES OUTPUT_NAME "leetcode-treenode-cpp")
set_target_properties(leetcode-treenode-cpp PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/build/windows/x86/release")
add_custom_command(OUTPUT output_leetcode-treenode-cpp_BEE6E6CE
COMMAND echo [ 0%]: compiling.module.release leetcode_treenode_cpp.TreeNode
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release
COMMAND "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/HostX86/x86/cl.exe" -nologo -O2 -fp:fast -std:c++20 /EHsc -experimental:module -DNDEBUG -TP -c ${CMAKE_SOURCE_DIR}/TreeNode.ixx -Fo${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/TreeNode.ixx.obj -ifcOutput ${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.TreeNode.ifc -interface
COMMAND echo [ 0%]: compiling.module.release leetcode_treenode_cpp.traversalTreeNode
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release
COMMAND "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/HostX86/x86/cl.exe" -nologo -O2 -fp:fast -std:c++20 /EHsc -experimental:module -DNDEBUG -TP -c ${CMAKE_SOURCE_DIR}/traversalTreeNode.ixx -Fo${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/traversalTreeNode.ixx.obj -ifcOutput ${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.traversalTreeNode.ifc -interface -reference leetcode_treenode_cpp.TreeNode=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.TreeNode.ifc
COMMAND echo [ 0%]: compiling.module.release leetcode_treenode_cpp.serializeTreeNode
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release
COMMAND "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/HostX86/x86/cl.exe" -nologo -O2 -fp:fast -std:c++20 /EHsc -experimental:module -DNDEBUG -TP -c ${CMAKE_SOURCE_DIR}/serializeTreeNode.ixx -Fo${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/serializeTreeNode.ixx.obj -ifcOutput ${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.serializeTreeNode.ifc -interface -reference leetcode_treenode_cpp.TreeNode=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.TreeNode.ifc
COMMAND echo [ 0%]: compiling.module.release leetcode_treenode_cpp.freeTreeNode
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release
COMMAND "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/HostX86/x86/cl.exe" -nologo -O2 -fp:fast -std:c++20 /EHsc -experimental:module -DNDEBUG -TP -c ${CMAKE_SOURCE_DIR}/freeTreeNode.ixx -Fo${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/freeTreeNode.ixx.obj -ifcOutput ${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.freeTreeNode.ifc -interface -reference leetcode_treenode_cpp.TreeNode=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.TreeNode.ifc
COMMAND echo [ 0%]: compiling.module.release leetcode_treenode_cpp.parseLeetCodeBinaryTree
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release
COMMAND "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/HostX86/x86/cl.exe" -nologo -O2 -fp:fast -std:c++20 /EHsc -experimental:module -DNDEBUG -TP -c ${CMAKE_SOURCE_DIR}/parseLeetCodeBinaryTree.ixx -Fo${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/parseLeetCodeBinaryTree.ixx.obj -ifcOutput ${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.parseLeetCodeBinaryTree.ifc -interface -reference leetcode_treenode_cpp.TreeNode=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.TreeNode.ifc -reference leetcode_treenode_cpp.freeTreeNode=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.freeTreeNode.ifc
COMMAND echo [ 0%]: compiling.module.release leetcode_treenode_cpp.bfsTravelsal
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release
COMMAND "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/HostX86/x86/cl.exe" -nologo -O2 -fp:fast -std:c++20 /EHsc -experimental:module -DNDEBUG -TP -c ${CMAKE_SOURCE_DIR}/bfsTravelsal.ixx -Fo${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/bfsTravelsal.ixx.obj -ifcOutput ${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.bfsTravelsal.ifc -interface -reference leetcode_treenode_cpp.TreeNode=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.TreeNode.ifc
COMMAND echo [ 0%]: compiling.module.release leetcode_treenode_cpp.LeetCodeTreeNodeToString
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release
COMMAND "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/HostX86/x86/cl.exe" -nologo -O2 -fp:fast -std:c++20 /EHsc -experimental:module -DNDEBUG -TP -c ${CMAKE_SOURCE_DIR}/LeetCodeTreeNodeToString.mpp -Fo${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/LeetCodeTreeNodeToString.mpp.obj -ifcOutput ${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.LeetCodeTreeNodeToString.ifc -interface -reference leetcode_treenode_cpp.TreeNode=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.TreeNode.ifc -reference leetcode_treenode_cpp.bfsTravelsal=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.bfsTravelsal.ifc
VERBATIM
)
add_custom_target(target_leetcode-treenode-cpp_BEE6E6CE
DEPENDS output_leetcode-treenode-cpp_BEE6E6CE
)
add_dependencies(leetcode-treenode-cpp target_leetcode-treenode-cpp_BEE6E6CE)
target_compile_options(leetcode-treenode-cpp PRIVATE
$<$<COMPILE_LANGUAGE:C>:-DNDEBUG>
$<$<COMPILE_LANGUAGE:CXX>:-DNDEBUG>
$<$<COMPILE_LANGUAGE:CXX>:-experimental:module>
)
if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
target_compile_options(leetcode-treenode-cpp PRIVATE /EHsc)
else()
target_compile_options(leetcode-treenode-cpp PRIVATE -fcxx-exceptions)
endif()
set_target_properties(leetcode-treenode-cpp PROPERTIES CXX_EXTENSIONS OFF)
target_compile_features(leetcode-treenode-cpp PRIVATE cxx_std_20)
if(MSVC)
target_compile_options(leetcode-treenode-cpp PRIVATE $<$<CONFIG:Release>:-Ox -fp:fast>)
else()
target_compile_options(leetcode-treenode-cpp PRIVATE -O3)
endif()
if(MSVC)
else()
target_compile_options(leetcode-treenode-cpp PRIVATE -fvisibility=hidden)
endif()
if(MSVC)
set_property(TARGET leetcode-treenode-cpp PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
target_link_libraries(leetcode-treenode-cpp PRIVATE
${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/bfsTravelsal.ixx.obj
${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/freeTreeNode.ixx.obj
${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/parseLeetCodeBinaryTree.ixx.obj
${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/serializeTreeNode.ixx.obj
${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/traversalTreeNode.ixx.obj
${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/TreeNode.ixx.obj
${CMAKE_SOURCE_DIR}/build/.objs/leetcode-treenode-cpp/windows/x86/release/LeetCodeTreeNodeToString.mpp.obj
)
target_sources(leetcode-treenode-cpp PRIVATE
)
# target
add_executable(test "")
set_target_properties(test PROPERTIES OUTPUT_NAME "test")
set_target_properties(test PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/build/windows/x86/release")
add_dependencies(test leetcode-treenode-cpp)
target_include_directories(test PRIVATE
C:/Users/Administrator/Documents/vcpkg-master/installed/x86-windows-static/include
)
target_compile_options(test PRIVATE
$<$<COMPILE_LANGUAGE:C>:-DNDEBUG>
$<$<COMPILE_LANGUAGE:CXX>:-DNDEBUG>
$<$<COMPILE_LANGUAGE:CXX>:-experimental:module>
)
set_source_files_properties(${CMAKE_SOURCE_DIR}/test.cpp PROPERTIES COMPILE_OPTIONS
"$<$<COMPILE_LANGUAGE:CXX>:-TP>;$<$<COMPILE_LANGUAGE:CXX>:-c>;$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/test.cpp>;$<$<COMPILE_LANGUAGE:CXX>:-Fo${CMAKE_SOURCE_DIR}/build/.objs/test/windows/x86/release/test.cpp.obj>;$<$<COMPILE_LANGUAGE:CXX>:-reference>;$<$<COMPILE_LANGUAGE:CXX>:leetcode_treenode_cpp.LeetCodeTreeNodeToString=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.LeetCodeTreeNodeToString.ifc>;$<$<COMPILE_LANGUAGE:CXX>:-reference>;$<$<COMPILE_LANGUAGE:CXX>:leetcode_treenode_cpp.TreeNode=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.TreeNode.ifc>;$<$<COMPILE_LANGUAGE:CXX>:-reference>;$<$<COMPILE_LANGUAGE:CXX>:leetcode_treenode_cpp.bfsTravelsal=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.bfsTravelsal.ifc>;$<$<COMPILE_LANGUAGE:CXX>:-reference>;$<$<COMPILE_LANGUAGE:CXX>:leetcode_treenode_cpp.freeTreeNode=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.freeTreeNode.ifc>;$<$<COMPILE_LANGUAGE:CXX>:-reference>;$<$<COMPILE_LANGUAGE:CXX>:leetcode_treenode_cpp.parseLeetCodeBinaryTree=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.parseLeetCodeBinaryTree.ifc>;$<$<COMPILE_LANGUAGE:CXX>:-reference>;$<$<COMPILE_LANGUAGE:CXX>:leetcode_treenode_cpp.serializeTreeNode=${CMAKE_SOURCE_DIR}/build/.gens/leetcode-treenode-cpp/windows/x86/release/rules/modules/cache/ec4a91a6/leetcode_treenode_cpp.serializeTreeNode.ifc>"
)
if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
target_compile_options(test PRIVATE /EHsc)
else()
target_compile_options(test PRIVATE -fcxx-exceptions)
endif()
set_target_properties(test PROPERTIES CXX_EXTENSIONS OFF)
target_compile_features(test PRIVATE cxx_std_20)
if(MSVC)
target_compile_options(test PRIVATE $<$<CONFIG:Release>:-Ox -fp:fast>)
else()
target_compile_options(test PRIVATE -O3)
endif()
if(MSVC)
else()
target_compile_options(test PRIVATE -fvisibility=hidden)
endif()
if(MSVC)
set_property(TARGET test PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
target_link_libraries(test PRIVATE
cppunit
leetcode-treenode-cpp
)
target_link_directories(test PRIVATE
C:/Users/Administrator/Documents/vcpkg-master/installed/x86-windows-static/lib
build/windows/x86/release
)
target_sources(test PRIVATE
test.cpp
)
|
你先自己分析下生成的 cmakelists.txt 看看哪里有问题。 |
我知道问题在哪了,
是xmake这里没有自动生成需要添加到这个target的文件,手动添加之后就可以了,但是能自动添加更好 |
是这里空的,因为现在 project generator 对 c++20 modules 还没怎么支持。暂时不要去生成带 c++ modules 的 cmakelists |
对 compile_commands.json 和 makefile 的生成目前也是不支持的吗? |
不支持 只能直接构建 |
目前不支持是因为理论上不可行还是只是暂时没有实现? |
暂时没实现,xmake 主要以直接构建为主,project generator 只是作为额外提供的插件,不是重点。。有时间会陆续改进,但要看个人时间和精力,有优先处理维护其他的特性和问题 |
好的,非常感谢!因为 xmake对module的支持比较全面我正在尝试从 cmake 迁移过来,但是不能生成正确的 compile_commands.json 的话 lsp 就无法工作,无法进行日常开发,我觉得这应该是很多人都会遇到的问题?不知道其他使用xmake module的人如何解决这个问题 |
首先各家编译器对 c++modules 支持都是不完善的,也就 msvc 勉强可用(但还是有很多的坑和bug),按现在的支持力度,玩玩可以,想用这个去做日常开发,原本就不建议。。不管是编译器支持,配套设施,模块分发,intellisense,ide 支持等都很不完善。趟坑是难免的。。 想要完全日常可用,且跨平台稳定,至少再等几年。我就没见过几个拿这个放进正式项目里面用的,如果还要支持 gcc/clang 的更少了。 xmake 目前只对编译器直接构建,尽可能做到了跨平台可用,并且内部处理了各家编译器可能遇到的一些坑和兼容性问题。 模块分发初步支持,基本可用,但是对 IDE, intellisense 支持暂时还没时间搞。 |
感谢指导!不过module 带来的好处还是十分吸引人的,后面等支持更完善了再来尝试下。 |
Clion对模块的智能提示就不错,visual studio加上resharper c++后也还行.模块特性用起来又爽,再加上第四代构建系统简直无敌了好吧. |
Clion's intelligent prompts for modules are good, and visual studio plus resharper c++ is also okay. The module features are cool to use, and the fourth-generation build system is simply invincible. |
生成 compile_commands 目前支持 c++20 modules ,原本就可以用。。clion 的插件没精力维护,建议用 vscode + clangd |
Generating compile_commands currently supports c++20 modules, which should work natively. . The plugin of clion has no energy to maintain, it is recommended to use vscode |
确实可以正常编译运行+调试,但是clion的智能提示似乎作废 xmake.lua如下: set_project("tmp")
add_rules("mode.debug", "mode.release")
target("tmp")
set_kind("binary")
add_files("src/*.cpp")
add_files("src/*.ixx")
[
{
"directory": "F:\\Users\\Administrator\\Desktop\\CLion_code\\~xmake\\tmp",
"arguments": ["D:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX64\\x64\\cl.exe", "/nologo", "/Zi", "/FS", "/Fdbuild\\windows\\x64\\debug\\compile.tmp.pdb", "/Od", "/EHsc", "/experimental:module", "/TP", "/c", "src\\test.ixx", "/Fobuild\\.objs\\tmp\\windows\\x64\\debug\\src\\test.ixx.obj", "/ifcOutput", "build\\.gens\\tmp\\windows\\x64\\debug\\rules\\modules\\cache\\b47db9d3\\test.ifc", "/interface"],
"file": "src\\test.ixx"
},
{
"directory": "F:\\Users\\Administrator\\Desktop\\CLion_code\\~xmake\\tmp",
"arguments": ["D:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX64\\x64\\cl.exe", "/c", "/nologo", "/Zi", "/FS", "/Fdbuild\\windows\\x64\\debug\\compile.tmp.pdb", "/Od", "/EHsc", "/experimental:module", "/TP", "/c", "/reference", "test=build\\.gens\\tmp\\windows\\x64\\debug\\rules\\modules\\cache\\b47db9d3\\test.ifc", "/Fobuild\\.objs\\tmp\\windows\\x64\\debug\\src\\main.cpp.obj", "src\\main.cpp"],
"file": "src\\main.cpp"
}] |
It is indeed possible to compile and run + debug normally, but the smart prompt of clion seems to be unavailable xmake.lua is as follows: [
{
"directory": "F:\\Users\\Administrator\\Desktop\\CLion_code\\~xmake\\tmp",
"arguments": ["D:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX64\\x64\\cl. exe", "/nologo", "/Zi", "/FS", "/Fdbuild\\windows\\x64\\debug\\compile.tmp.pdb", "/Od", "/EHsc", " /experimental:module", "/TP", "/c", "src\\test.ixx", "/Fobuild\\.objs\\tmp\\windows\\x64\\debug\\src\\test .ixx.obj", "/ifcOutput", "build\\.gens\\tmp\\windows\\x64\\debug\\rules\\modules\\cache\\b47db9d3\\test.ifc", "/ interface"],
"file": "src\\test.ixx"
},
{
"directory": "F:\\Users\\Administrator\\Desktop\\CLion_code\\~xmake\\tmp",
"arguments": ["D:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX64\\x64\\cl. exe", "/c", "/nologo", "/Zi", "/FS", "/Fdbuild\\windows\\x64\\debug\\compile.tmp.pdb", "/Od", " /EHsc", "/experimental:module", "/TP", "/c", "/reference", "test=build\\.gens\\tmp\\windows\\x64\\debug\\rules\ \modules\\cache\\b47db9d3\\test.ifc", "/Fobuild\\.objs\\tmp\\windows\\x64\\debug\\src\\main.cpp.obj", "src\\ main.cpp"],
"file": "src\\main.cpp"
}] |
这么说,xmake对vscode的官方支持是最好的吗?最爱JetBrains家的智能提示了,clangd不知道怎么样. |
So, is xmake's official support for vscode the best? I love JetBrains' smart tips, but clangd doesn't know how. |
我的错,忘记 |
My fault, forgot about |
不是官方视频,这边 intellisense 从没支持过 clion xmake 生成的 compile_commands 肯定支持 c++20 modules 但是能否让 clion 支持上,怎么配置上,不归这边管。。你自己研究。。 目前能确定的就是 clangd 是支持 c++20 modules 的 compile_commands,并且其他人在 vscode 上配置使用成功过。 |
Not an official video, intellisense has never supported clion here The compile_commands generated by xmake definitely support c++20 modules But whether clion can support it or how to configure it is not under the control of this side. . Do your own research. . What can be determined at present is that clangd supports compile_commands of c++20 modules, and others have successfully configured and used it on vscode. |
现在增加了 cmake 对原生 c++ modules 的支持。#4746 |
那大佬啥时候有空顺便把预编译头和模块冲突的问题解决了 |
When will the boss have time to solve the problem of conflicts between precompiled headers and modules? |
看时间,最近估计没空 |
Look at the time, I guess I won’t be free recently |
环境 看起来xmake-ide不直接支持debug,而是生成cmake然后调试。 import std in CMake 3.30
感觉这个很关键,是一个最后一英里问题,跑通就能很舒服的在clion下配合xmake玩c++ modules |
可以直接提 pr过来 |
You can bring it up directly and trick people into coming over. |
Xmake Version
v2.7.8+dev.f11dad73c
Operating System Version and Architecture
Microsoft Windows [版本 10.0.22621.1555] amd64
Describe Bug
https://github.com/masx200/leetcode-treenode-cpp/blob/3e7a8646da1471b7ccd17018bbe317210b7bdd99/CMakeLists.txt#L11
Expected Behavior
clion应该正常识别文件
Project Configuration
Additional Information and Error Logs
在clion里面用xmake插件自动生成的cmakelist文件
The text was updated successfully, but these errors were encountered: