CMake: Only use -fno-rtti for C++

Using it for C generates the following warning:
command line option '-fno-rtti' is valid for C++/D/ObjC++ but not for C
This commit is contained in:
Maarten Bent
2019-07-16 23:00:11 +02:00
parent 5bf5581dbe
commit 181a03fc73

View File

@@ -96,7 +96,7 @@ if(wxUSE_NO_RTTI)
if(MSVC)
add_compile_options("/GR-")
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
add_compile_options("-fno-rtti")
wx_string_append(CMAKE_CXX_FLAGS " -fno-rtti")
endif()
add_definitions("-DwxNO_RTTI")
endif()