test commit redux
[oota-llvm.git] / unittests / CMakeLists.txt
index 4ae9d637626d2739b29340a0f247df6e9e97245e..81d702981f82e16324d87cdb88de1f10d59d2cbc 100644 (file)
@@ -12,16 +12,28 @@ function(add_llvm_unittest test_dirname)
   endif()
   add_llvm_executable(${test_name}Tests ${ARGN})
   add_dependencies(UnitTests ${test_name}Tests)
+  set_target_properties(${test_name}Tests PROPERTIES FOLDER "Tests")
 endfunction()
 
 add_custom_target(UnitTests)
+set_target_properties(UnitTests PROPERTIES FOLDER "Tests")
 
 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
 add_definitions(-DGTEST_HAS_RTTI=0)
+if( LLVM_COMPILER_IS_GCC_COMPATIBLE )
+  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()
 
+if(SUPPORTS_NO_VARIADIC_MACROS_FLAG)
+  add_definitions("-Wno-variadic-macros")
+endif()
+
 set(LLVM_LINK_COMPONENTS
   jit
   interpreter
@@ -50,7 +62,9 @@ add_llvm_unittest(ADT
   ADT/FoldingSet.cpp
   ADT/ilistTest.cpp
   ADT/ImmutableSetTest.cpp
+  ADT/IntEqClassesTest.cpp
   ADT/IntervalMapTest.cpp
+  ADT/PackedVectorTest.cpp
   ADT/SmallBitVectorTest.cpp
   ADT/SmallStringTest.cpp
   ADT/SmallVectorTest.cpp
@@ -92,7 +106,6 @@ add_llvm_unittest(Transforms/Utils
 
 set(VMCoreSources
   VMCore/ConstantsTest.cpp
-  VMCore/DerivedTypesTest.cpp
   VMCore/InstructionsTest.cpp
   VMCore/MetadataTest.cpp
   VMCore/PassManagerTest.cpp