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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user