aboutsummaryrefslogtreecommitdiffstats
path: root/utils/unittest/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'utils/unittest/CMakeLists.txt')
-rw-r--r--utils/unittest/CMakeLists.txt17
1 files changed, 10 insertions, 7 deletions
diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt
index b6d2d6d..b34e22a 100644
--- a/utils/unittest/CMakeLists.txt
+++ b/utils/unittest/CMakeLists.txt
@@ -32,17 +32,20 @@ if (NOT LLVM_ENABLE_THREADS)
add_definitions( -DGTEST_HAS_PTHREAD=0 )
endif()
-# Visual Studio 2012 only supports up to 8 template parameters in
-# std::tr1::tuple by default, but gtest requires 10
-if(MSVC AND MSVC_VERSION EQUAL 1700)
- add_definitions(-D_VARIADIC_MAX=10)
-endif ()
+set(LIBS
+ LLVMSupport # Depends on llvm::raw_ostream
+)
+
+find_library(PTHREAD_LIBRARY_PATH pthread)
+if (PTHREAD_LIBRARY_PATH)
+ list(APPEND LIBS pthread)
+endif()
add_llvm_library(gtest
googletest/src/gtest-all.cc
LINK_LIBS
- LLVMSupport # Depends on llvm::raw_ostream
- )
+ ${LIBS}
+)
add_subdirectory(UnitTestMain)