I'm having a problem with cmake / gcc / Linux.
No matter what I try, I cannot get rid of CMAKE_CXX_FLAGS on my linker line. CMake keeps passing them when invoking g++ in link mode.
I have -fopenmp in my CMAKE_CXX_FLAGS and it must not be present on the link line so g++ doesn't link to gomp (I'm using Intel's iomp5 instead).
Edit: I tried the following the beginning of CMakeLists.txt, didn't help:
set(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> <FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
Thanks