Yngve Inntjore Levinsen wrote: > Hi, > > Have a look at the very silly hello world example attached. As I think > you mentioned, the cmake way to do this is to have targets with specific > flags in separate folders.
The CMake 2.8.12 way to do this is to use target_compile_options(). Then you can have the stuff in one CMakeLists file if you wish: add_libary(foo ...) target_compile_options(foo PRIVATE -fopenmp) add_library(bar ...) target_compile_options(bar PRIVATE -Wall) Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake