X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2Funittest%2FCMakeLists.txt;h=b34e22ae0cb42258f9096f675c49d8efc96134f7;hb=d8502a20d57dc71e3363abb44812b14cc53bbe0e;hp=64446eff41d83fe9e86336cbdf7f9b61d3f0e94b;hpb=ac27d7151c137bc6d814ef084a3ab2d8ba50cb37;p=oota-llvm.git diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt index 64446eff41d..b34e22ae0cb 100644 --- a/utils/unittest/CMakeLists.txt +++ b/utils/unittest/CMakeLists.txt @@ -32,19 +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 - ) -# Depends on llvm::raw_ostream -target_link_libraries(gtest - LLVMSupport - ) + LINK_LIBS + ${LIBS} +) add_subdirectory(UnitTestMain)