Skip to content
Snippets Groups Projects
Commit a71d007f authored by Guilherme Amadio's avatar Guilherme Amadio
Browse files

Add macro to add compile options to ROOT

The intended use of this macro is to add compile options that are not
requirements of ROOT, like options to ignore certain warnings. However,
since the option names depend on the compiler, check each flag before
adding it to the list, so that only supported flags are added.
parent cdb519be
No related branches found
No related tags found
No related merge requests found
......@@ -1419,6 +1419,20 @@ function(ROOT_ADD_C_FLAG var flag)
endif()
endfunction()
#----------------------------------------------------------------------------
# ROOT_ADD_COMPILE_OPTIONS(flags)
#----------------------------------------------------------------------------
macro(ROOT_ADD_COMPILE_OPTIONS flags)
foreach(__flag ${flags})
check_cxx_compiler_flag("-Werror ${__flag}" __result)
if(__result)
add_compile_options(${__flag})
endif()
endforeach()
unset(__flag)
unset(__result)
endmacro()
#----------------------------------------------------------------------------
# find_python_module(module [REQUIRED] [QUIET])
#----------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment