Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

'CMAKE_SOURCE_DIR’ was not declared in this scope

Hi, I'm trying to compile gazebo but I get the following error:

[ 85%] Building CXX object test/integration/CMakeFiles/INTEGRATION_model_editor_undo.dir/model_editor_undo.cc.o
/home/user/source/gazebo/test/integration/model_editor_undo.cc: In member function ‘void ModelEditorUndoTest::NestedModelInsertionByMouse()’:
/home/user/source/gazebo/test/integration/model_editor_undo.cc:249:7: error: ‘CMAKE_SOURCE_DIR’ was not declared in this scope
   CMAKE_SOURCE_DIR "/test/models/testdb");
   ^~~~~~~~~~~~~~~~
/home/user/source/gazebo/test/integration/model_editor_undo.cc: In member function ‘void ModelEditorUndoTest::JointInsertionByDialog()’:
/home/user/source/gazebo/test/integration/model_editor_undo.cc:461:7: error: ‘CMAKE_SOURCE_DIR’ was not declared in this scope
   CMAKE_SOURCE_DIR "/test/models/testdb");
   ^~~~~~~~~~~~~~~~
test/integration/CMakeFiles/INTEGRATION_model_editor_undo.dir/build.make:120: recipe for target 'test/integration/CMakeFiles/INTEGRATION_model_editor_undo.dir/model_editor_undo.cc.o' failed
make[2]: *** [test/integration/CMakeFiles/INTEGRATION_model_editor_undo.dir/model_editor_undo.cc.o] Error 1
CMakeFiles/Makefile2:10323: recipe for target 'test/integration/CMakeFiles/INTEGRATION_model_editor_undo.dir/all' failed
make[1]: *** [test/integration/CMakeFiles/INTEGRATION_model_editor_undo.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

Any idea what may be causing it?