[CMake] Setting CMAKE_CXX_FLAGS..., CMAKE_C_FLAGS... and CMAKE_C_STANDARD_LIBRARIES_INIT and friends on a per target basis
    Verweij, Arjen 
    VerweijA at tass-safe.com
       
    Fri Aug 20 04:36:00 EDT 2010
    
    
  
I can't say I share this experience. We use this mechanism to substitute "standard" flags with less or more optimization and/or other options. Usually -O3 instead of -O2, and I don't get them both on the commandline.
Arjen
From: Brian Davis [mailto:bitminer at gmail.com] 
>>set_source_files_properties(${CMAKE_BINARY_DIR}/path/to/file.f PROPERTIES GENERATED TRUE COMPILE_FLAGS "${FFLAG_OPT}")
 
>COMPILE flags only appends to thoes already set CMAKE_... vars.  I need a way to override all the other vars on a per target basis.
 
    
    
More information about the CMake
mailing list