Merge pull request #1859 from zoddicus/fixNoRTTIForWindows
Convert no RTTI rule to be compiler specific
This commit is contained in:
commit
eea340047e
@ -88,10 +88,14 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
|
|||||||
add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs
|
add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs
|
||||||
-Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions)
|
-Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions)
|
||||||
add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over.
|
add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over.
|
||||||
|
add_compile_options(-fno-rtti)
|
||||||
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||||
add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
|
add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
|
||||||
-Wunused-parameter -Wunused-value -Wunused-variable)
|
-Wunused-parameter -Wunused-value -Wunused-variable)
|
||||||
add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over.
|
add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over.
|
||||||
|
add_compile_options(-fno-rtti)
|
||||||
|
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "MSVC")
|
||||||
|
add_compile_options(/GR-) # Disable RTTI
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Request C++11
|
# Request C++11
|
||||||
@ -105,8 +109,6 @@ else()
|
|||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_compile_options(-fno-rtti)
|
|
||||||
|
|
||||||
function(glslang_set_link_args TARGET)
|
function(glslang_set_link_args TARGET)
|
||||||
# For MinGW compiles, statically link against the GCC and C++ runtimes.
|
# For MinGW compiles, statically link against the GCC and C++ runtimes.
|
||||||
# This avoids the need to ship those runtimes as DLLs.
|
# This avoids the need to ship those runtimes as DLLs.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user