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)
|
if(MSVC)
|
||||||
add_compile_options("/GR-")
|
add_compile_options("/GR-")
|
||||||
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
|
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()
|
endif()
|
||||||
add_definitions("-DwxNO_RTTI")
|
add_definitions("-DwxNO_RTTI")
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user