You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
322B

  1. include(CheckCXXCompilerFlag)
  2. function(add_compile_options_if_supported)
  3. foreach(flag ${ARGN})
  4. set(option_var option_supported_${flag})
  5. CHECK_CXX_COMPILER_FLAG(${flag} ${option_var})
  6. if( ${option_var} )
  7. add_compile_options(${flag})
  8. endif()
  9. endforeach()
  10. endfunction()