I have a workspace set out as in the ROS REP 128 aka:
catkin_ws
src
CMakeLists.txt // < 1.
project_1
CMakeLists.txt
project_2
CMakeLists.txt
...
In fact you can reproduce this using just the catkin tutorials here. The top level CMakeLists.txt
(1.
in the example above) appears to not be sourced. I can tell this because i added the line, weifnbwefn
to the end of it expecting a cmake error (on a clean build) but got none.
To reproduce this:
- Clone the above repo.
- Navigate to the
catkin_tutorials/create_package_pubsub/catkin_ws
- Modify the
src/CMakeLists.txt
with something that won't build. - Build with
catkin build
So this leads to 2 questions:
- Why is this file not used?
- How can i add default cmake items for all of my sub projects? for eg. if i wanted to add
set(CMAKE_CXX_STANDARD 17)
for every sub-project?
For 2. , i know that i can add additional cmake args to my build profile in .catkin_tools
but for anything more complex then a couple of arguments, this would not be scaleable.