X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2Funittest%2FCMakeLists.txt;h=b34e22ae0cb42258f9096f675c49d8efc96134f7;hb=d8502a20d57dc71e3363abb44812b14cc53bbe0e;hp=b6d2d6d9e0e99df82067d6182f3b3c9c15027538;hpb=5fb5076e284e074c4113fdc309636b930c244c87;p=oota-llvm.git diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt index b6d2d6d9e0e..b34e22ae0cb 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)