Shutdown clang warning: argument unused during compilation: '-ansi' at linking time

This commit is contained in:
Gael Guennebaud 2013-06-21 09:24:57 +02:00
parent c0cad44da6
commit 7adfca5af2

View File

@ -156,6 +156,8 @@ if(NOT MSVC)
# The -ansi flag must be added last, otherwise it is also used as a linker flag by check_cxx_compiler_flag making it fails
# Moreover we should not set both -strict-ansi and -ansi
check_cxx_compiler_flag("-strict-ansi" COMPILER_SUPPORT_STRICTANSI)
ei_add_cxx_compiler_flag("-Qunused-arguments") # disable clang warning: argument unused during compilation: '-ansi'
if(COMPILER_SUPPORT_STRICTANSI)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -strict-ansi")
else()