isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.31k stars 2.29k forks source link

Cannot compile the cpp examples, cmake generates "Unknown CMake command "open3d_show_and_abort_on_warning" #3493

Closed Tetsujinfr closed 2 years ago

Tetsujinfr commented 3 years ago

IMPORTANT: Please use the following template to report the bug.


Describe the bug I cannot compile the cpp examples, cmake generates an error "Unknown CMake command "open3d_show_and_abort_on_warning"

To Reproduce Steps to reproduce the behavior:

  1. cd Open3D/examples/cpp/
  2. mkdir build
  3. cd build
  4. cmake ..

Expected behavior Successful compilation of the examples, at least those which do not rely on third party dependencies like realsense stuff, if any.

Screenshots no need

Environment (please complete the following information):

Additional context The library works successfully otherwise, e.g. I could run the gui and test all the python examples successfully.

thanks for your help.

ssheorey commented 3 years ago
  • cd Open3D/examples/cpp/
  • mkdir build
  • cd build
  • cmake ..

Hi @Tetsujinfr you have to configure the entire project at once and then build the specific examples that you want from the top level:

cd Open3D
mkdir build
cd build
cmake ..
make <list of examples to build>