mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
Disable RTTI when building unit tests. This avoids errors at link time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
60b531270b
commit
3bf2279411
@ -18,6 +18,12 @@ add_custom_target(UnitTests)
|
||||
|
||||
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
|
||||
add_definitions(-DGTEST_HAS_RTTI=0)
|
||||
if( CMAKE_COMPILER_IS_GNUCXX )
|
||||
llvm_replace_compiler_option(CMAKE_CXX_FLAGS "-frtti" "-fno-rtti")
|
||||
elseif( MSVC )
|
||||
llvm_replace_compiler_option(CMAKE_CXX_FLAGS "/GR" "/GR-")
|
||||
endif()
|
||||
|
||||
if (NOT LLVM_ENABLE_THREADS)
|
||||
add_definitions(-DGTEST_HAS_PTHREAD=0)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user