Using add_definitions, workaround cmake warning
We haven't been building LLVM in-tree for many months now so we can use this now just fine.
This commit is contained in:
parent
fe94ed6b1c
commit
f56ced6374
@ -138,19 +138,18 @@ endif()
|
|||||||
# the compiler to output a warning during linking:
|
# the compiler to output a warning during linking:
|
||||||
# clang: warning: argument unused during compilation: '-std=c++0x'
|
# clang: warning: argument unused during compilation: '-std=c++0x'
|
||||||
# This is caused by cmake passing this flag to the linking stage which it
|
# This is caused by cmake passing this flag to the linking stage which it
|
||||||
# shouldn't do. It's ignored so it does no harm, but the warning is annoying and
|
# shouldn't do. It's ignored so it does no harm, but the warning is annoying.
|
||||||
# there's no way around the problem (the flag is correctly used during the
|
#
|
||||||
# compilation stage). We could use add_definitions(-std=c++0x), but this will
|
# Putting the flag in add_definitions() works around the issue, even though it
|
||||||
# break the llvm build since the flag will then be used when compiling C code
|
# shouldn't in theory go there.
|
||||||
# too. Sadly there's no way around the warning.
|
|
||||||
if ( CPP11_AVAILABLE )
|
if ( CPP11_AVAILABLE )
|
||||||
message( "Your C++ compiler supports C++11, compiling in that mode." )
|
message( "Your C++ compiler supports C++11, compiling in that mode." )
|
||||||
|
|
||||||
# Cygwin needs its hand held a bit; see issue #473
|
# Cygwin needs its hand held a bit; see issue #473
|
||||||
if ( CYGWIN AND CMAKE_COMPILER_IS_GNUCXX )
|
if ( CYGWIN AND CMAKE_COMPILER_IS_GNUCXX )
|
||||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x" )
|
add_definitions( -std=gnu++0x )
|
||||||
else()
|
else()
|
||||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" )
|
add_definitions( -std=c++0x )
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(
|
message(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user