Hi Brian, We override the standard CMAKE_<LANG>_FLAGS (C CXX Fortran) and use it as a baseline. Then, for individual source files it is possible to override them in a separate file using:
set_source_files_properties(${CMAKE_BINARY_DIR}/path/to/file.f PROPERTIES GENERATED TRUE COMPILE_FLAGS "${FFLAG_OPT}") These override files are included OPTIONALly and the directives executed when applicable. Regards, Arjen From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Brian Davis Sent: woensdag 18 augustus 2010 22:48 To: cmake Mailing List Subject: [CMake] Setting CMAKE_CXX_FLAGS..., CMAKE_C_FLAGS... and CMAKE_C_STANDARD_LIBRARIES_INIT and friends on a per target basis CMAKE_CXX_FLAGS..., CMAKE_C_FLAGS... and CMAKE_C_STANDARD_LIBRARIES_INIT and friends are seemingly global variables. Is there a way to override (all of) these on a per target basis? A method which is not tied to the directory (properties). One that does not simply append such as COMPILE_FLAGS, but blasts away and makes it what I specify? Basically all the goop in Windows-icl.cmake, Windows-cl.cmake, etc. Possibly involving set_target_properties?
_______________________________________________ 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