> Hi all, > > Since I have several targets to compile, I was looking for a way to > set some specific flags to one target among all others. In my example > I would like to set the openmp flag to the target test and I got an > error with the code below: > > ---------------------------------------------------------------------------------------------- > PROJECT(test CXX) > ADD_EXECUTABLE(test test.cpp) > SET_TARGET_PROPERTIES(test PROPERTIES COMPILE_FLAGS "-fopenmp")
I'm just guessing here: try passing this flag also as linker flag. The CXX flags get also passed to the linker and it looks as if the linker needs to add the proper functions. Eike _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake