cppalliance / mrdocs

MrDocs: A Clang/LLVM tool for building reference documentation from C++ code and javadoc comments.
https://mrdocs.com
Other
66 stars 16 forks source link

CMake targets using precompiled headers #526

Open anarthal opened 6 months ago

anarthal commented 6 months ago

CMake targets using target_precompile_headers cause errors if they haven't been built before:

[103/126] "/home/ruben/workspace/mysql/test/integration/test/connection_pool.cpp"
error: unable to read PCH file /home/ruben/workspace/mysql/__build/test/integration/CMakeFiles/boost_mysql_integrationtests.dir/cmake_pch.hxx.pch: 'No such file or directory'
fatal error: PCH file '/home/ruben/workspace/mysql/__build/test/integration/CMakeFiles/boost_mysql_integrationtests.dir/cmake_pch.hxx.pch' not found: module file not found
2 errors generated

If they have, mrdocs complains that the compiler that generated the PCH doesn't match the LLVM version used by mrdocs:

[103/126] "/home/ruben/workspace/mysql/test/integration/test/connection_pool.cpp"
error: PCH file built from a different branch ((++20231231042330+a384cd5012b8-1~exp1~20231231042445.1403)) than the compiler ((https://github.com/llvm/llvm-project.git 29b20829cc6ce3e6d9c3809164994c1659e0da56))
1 error generated.
alandefreitas commented 1 week ago

I'm not sure what could be done here. At best, this could be documented as an admonition in the getting started guide.