Skip to content
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

catkin build does not output messages or generate compile_commands.json after setting in CMakeLists.txt #772

Open
1 of 5 tasks
talking-toaster opened this issue Apr 25, 2024 · 0 comments

Comments

@talking-toaster
Copy link

System Info

  • Operating System: uname -a

  • Linux nuaa 5.15.0-91-generic #101~20.04.1-Ubuntu SMP Thu Nov 16 14:22:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

  • Python Version: python --version

  • Python 3.8.10

  • Version of catkin_tools: catkin --version OR Git revision

  • catkin_tools 0.9.2 (C) 2014-2024 Open Source Robotics Foundation
    catkin_tools is released under the Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0)


Using Python 3.8.10 (default, Nov 22 2023, 10:22:35) [GCC 9.4.0]

  • ROS Distro: echo $ROS_DISTRO
    noetic

Build / Run Issue

  • Works with catkin_make
  • Works with catkin_make_isolated --merge
  • Works with catkin build
  • Works with catkin build -p1
  • I did not read this

Expected Behavior

Actual Behavior

CLI output in Gists: https://gist.github.com/talking-toaster/986e9987b000f62a5a6cc99191ea1527

Steps to Reproduce the Issue

I am working on a ROS package and have encountered an issue where modifications made in the CMakeLists.txt file do not seem to affect the output of catkin build. Specifically, I added the following lines to my CMakeLists.txt:

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")

After adding these, I expected to see the status message regarding CMAKE_CXX_FLAGS during the build process and a compile_commands.json file to be generated in the build directory. Unfortunately, neither of these outcomes occurs.

Here are the steps I've taken:

Added the above lines to CMakeLists.txt.
Ran catkin clean to clear any existing build data.
Ran catkin build to rebuild the package.
Despite these steps, the expected message does not appear in the build output, and the compile_commands.json file is not found.

However, when using catkin_make, both the message is displayed, and the compile_commands.json file is generated as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant