MattClarkson / CMakeCatchTemplate

Template C++ project using CMake, CTest, Catch, and a SuperBuild for dependencies such as Boost, gflags, glog, VTK, OpenCV and PCL.
BSD 3-Clause "New" or "Revised" License
30 stars 13 forks source link

Add OpenMP support #20

Closed MattClarkson closed 6 years ago

MattClarkson commented 6 years ago

If you build on Linux, and PCL picks up OpenMP, and then your executable doesnt have OpenMP flags set correctly, you get build failures.

Aim here:

  1. Provide a flag so user can select whether to use OpenMP or not.
  2. Boolean flag gets passed to each dependency, so each project can decide how to handle it, and we dont accidentally pass compile time flags to dependencies that DONT need them.
  3. Then in our project, we find_package(OpenMP) and apply settings to the final executable.