Fix cmake features#566
Conversation
6368f3c to
6366652
Compare
|
@robertosfield If you run https://github.com/vsg-dev/VulkanSceneGraph/actions/workflows/build-docs.yml on this branch, you will see now two lines indicating at the end of the build log indicating that the patches are working as expected. |
|
VSG master and VulkanSceneGraph-1.0 branch are now in feature freeze, only bugs in the code or cmake build will be addressed from this point onward s. Enabling cmake features in ancillary projects that use FetchContent/sumodules is not something that clears this hurdle. If I have time tomorrow I'll merge this PR as a branch that we can look at merging with VSG master the release goes out, earliest this would be would be next week. |
6366652 to
cd17468
Compare
This also fixes an issue with out of source or submodule based builds of vsg not installing uninstall.cmake.
A separate cmake target is created for each submodule, e.g. 'cppcheck-vsg' for the vsg library and a total of one target named 'cppcheck' that depends on each submodule specific target.
cd17468 to
8a2c485
Compare
|
I have merged this PR as rhabacker-fix-cmake-features branch, and will do the same for the other projects that you've provided a PR for. I will then test the branches as is, then revert back to respective master and test out the out of source builds with a view of creating the problems, then try cherry-picking the commits into master to resolve the more critical problems. Jumping through all these hoops is required as I don't want to risk breaking the build fora code base that has been stable and mostly working well this week. |
|
@rhabacker since I merged this PR I have been setting errors reported to the console after I run make clobber, the errors are reported after the successful clobber-vsg section, the problem part looks like: make[3]: CMakeFiles/clobber.dir/build.make: No such file or directory It looks like to implement the add_depedency for clobber target CMake is building script files for us when we first run cmake, but then when it tries to run these scripts they get deleted by the cobber-vsg before it has a chance to complete. Any ideas how to resolve this? FYI, reverting to the original implementation works fine. -- full make clobber report: $ make clobber |
|
I'll take a look today. |
|
Hmmh, I could not reproduce this problem with the current master branch - I ran the following: |
Please open a new bug report, as this problem is independent of this pr and existed before. |
|
This must be an issue with insource builds then:
cd VulkanSceneGraph
cmake .
make
make clobber
As you have probably gathered, my default approach for building VSG related
projects is to build insource. This works well for my needs with adding
extra steps.
|
Description
With the changes from this pull, the
vsg_add_target_xxxmacros now work again with the submodule/fetchcontent build mode.This is achieved by creating a project-specific cmake target named
x-<project>(e.g.docs-vsg) for each available x in vsg_add_target_x (currentlydocs,cppcheck,clang-format,clobberand 'uninstall') whenvsg_add_target_x()is called and adding it as a dependency to a parent target namedx(see custem-target-deps.pdf for an example)To avoid possible conflicts with possibly already existing cmake targets like
docs,cppcheck,clang-format,clobberand 'uninstall' when they are integrated as submodules into other projects, these parent targets are only created if they do not already exist.Conversely, if a project already provides a cmake target e.g. named
docsand builds the documentation with it, the documentation for included vsg[XXX] projects will also be built.Fixes #565
Type of change
How Has This Been Tested?
Test Configuration:
Checklist:
Additional information