ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Why CMakeLists's rosbuild_add_executable couldn't have a name 'test'?

asked 2011-08-26 16:14:58 -0600

sam gravatar image

updated 2014-01-28 17:10:18 -0600

ngrennan gravatar image

My package couldn't generate executable file when CMakeLists has a line:

  rosbuild_add_executable(test src/t.cpp)

My package can generate executable file when CMakeLists has a line:

  rosbuild_add_executable(test2 src/t.cpp)

I found that only the name 'test',it failed to generate an executable file.

What happened? I use ROS diamondback.

Thank you~

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-08-27 03:17:53 -0600

From the rosbuild/ CMakeLists wiki page:

Do not call your executable test. This target name is reserved for unit testing, and CMake will fail if you try it

The page describes a workaround if you really need to call it test

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-08-26 16:14:58 -0600

Seen: 527 times

Last updated: Aug 27 '11