[CMake] Accepted way to add "-fPIC" onto CMAKE_CXX_FLAGS?
Michael Jackson
mike.jackson at bluequartz.net
Mon Jun 18 17:09:35 EDT 2012
Linux really wants to have -fPIC for some of my code and I am trying to detect linux and then add this flag for my project but I am having no luck.
if (LINUX)
set(CMAKE_CXX_FLAGS ${CMAKE_CSS_FLAGS} "-fPIC")
endif()
Is this NOT the way I should be doing this? It doesn't really "fell" correct but nothing else (including this) seems to work.
Help?
Thanks
___________________________________________________________
Mike Jackson Principal Software Engineer
BlueQuartz Software Dayton, Ohio
mike.jackson at bluequartz.net www.bluequartz.net
More information about the CMake
mailing list