Fix C compiler warning.
"no-overloaded-virtual" warnings are a CXX-compiler feature
This commit is contained in:
parent
0908f86714
commit
6129de31f0
@ -191,7 +191,8 @@ check_cxx_source_compiles(
|
|||||||
HAVE_ISNAN)
|
HAVE_ISNAN)
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
set(WARNING_FLAGS -Wall)
|
set(WARNING_FLAGS_CXX "-Wall")
|
||||||
|
set(WARNING_FLAGS_C "-Wall")
|
||||||
|
|
||||||
# certain GCC versions don't provide the atomic builds, and hence
|
# certain GCC versions don't provide the atomic builds, and hence
|
||||||
# require is to provide them in SGAtomic.cxx
|
# require is to provide them in SGAtomic.cxx
|
||||||
@ -201,6 +202,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
GCC_ATOMIC_BUILTINS_FOUND)
|
GCC_ATOMIC_BUILTINS_FOUND)
|
||||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
set(WARNING_FLAGS_CXX "-Wall -Wno-overloaded-virtual")
|
||||||
|
set(WARNING_FLAGS_C "-Wall")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
@ -223,12 +229,8 @@ if(WIN32)
|
|||||||
set( RT_LIBRARY "winmm" )
|
set( RT_LIBRARY "winmm" )
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS_C} ${MSVC_FLAGS}")
|
||||||
set (WARNING_FLAGS "-Wall -Wno-overloaded-virtual")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS_CXX} ${MSVC_FLAGS} ${BOOST_CXX_FLAGS}")
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS}")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS} ${BOOST_CXX_FLAGS}")
|
|
||||||
|
|
||||||
include_directories(${PROJECT_SOURCE_DIR})
|
include_directories(${PROJECT_SOURCE_DIR})
|
||||||
include_directories(${PROJECT_BINARY_DIR}/simgear)
|
include_directories(${PROJECT_BINARY_DIR}/simgear)
|
||||||
|
Loading…
Reference in New Issue
Block a user