Skip to content
  • Rashad Kanavath's avatar
    COMP: set OTB flags before custom cmake flags · bc422687
    Rashad Kanavath authored
    cmake_cxx_flags are set in custom build scripts (dashboard or otherwise)
    This is in special cases to override some annoying warning or add
    special linker options. adding OTB_REQUIRED_CXX_FLAGS after
    CMAKE_CXX_FLAGS will have no effect.
    
    Example:
    set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${OTB_REQUIRED_CXX_FLAGS})
    if you try to disable wshadow warning in OTBGKSVM module, this will
    not work because OTB_REQUIRED_CXX_FLAGS contains -Wshadow !
    so final list will be
    
    set(CMAKE_CXX_FLAGS -Wno-shadow -Wshadow) which will show shadow
    warnings at end.
    bc422687