Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 92

Help with CMake parameters for catkin_make

$
0
0
Hi, I have a project that I'm trying to adapt to ROS. Using `catkin_make`, it compiles ok, with clang++, but it fails on linking. It needs to be linked with a series of object files (*.o) that are part of another (non-catkin) project. I'm not sure how to add these dependencies to the target in CMakeLists.txt, and I don't know how to specify the equivalent CMake parameters in the catkin_make command. There are a few other parameters I would like to pass as well. In my `CMakeLists.txt`, I've added all the `include_directories()` and `target_link_libraries()`. I pass `-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++` on the command line to catkin_make. So far so good. I would also like to pass the following compile parameters (or put them in my `CMakeLists.txt` file) but don't know how: -fobjc-arc -fPIC -std=c++11 -stdlib=libstdc++ -Weverything -Wno-undef -Wno-long-long -Wno-c++98-compat-pedantic -Wno-sign-conversion -Wno-disabled-macro-expansion -Wno-weak-vtables -Wno-padded -Wno-unknown-pragmas -Wno-pedantic -Werror and the following link parameters, but also don't know how: -rdynamic -stdlib=libstdc++ (a series of object files to link together) Do I **need** to move the source files into my catkin_ws? -L/usr/lib/x86_64-linux-gnu -R/usr/lib/x86_64-linux-gnu The reason for all these parameters is that they are part of the clang++ command line when building the project using make (outside of catkin). Any help would be appreciated. Cheers, Nap

Viewing all articles
Browse latest Browse all 92

Trending Articles