build: upgrade googletest
This commit is contained in:
parent
e38078eedd
commit
fcf0ebbbfe
|
|
@ -1 +1,6 @@
|
||||||
add_subdirectory(fmt EXCLUDE_FROM_ALL)
|
add_subdirectory(fmt EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
|
set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)
|
||||||
|
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
|
||||||
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||||
|
add_subdirectory(googletest EXCLUDE_FROM_ALL)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 3.0)
|
||||||
|
cmake_policy(SET CMP0028 NEW)
|
||||||
|
|
||||||
project (ericw-tools)
|
project (ericw-tools)
|
||||||
|
|
||||||
# Grab the git describe output and store it in GIT_DESCRIBE
|
# Grab the git describe output and store it in GIT_DESCRIBE
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
cmake_minimum_required (VERSION 2.8)
|
|
||||||
project (bspinfo CXX)
|
|
||||||
|
|
||||||
set(BSPINFO_SOURCES
|
set(BSPINFO_SOURCES
|
||||||
bspinfo.cc
|
bspinfo.cc
|
||||||
${CMAKE_SOURCE_DIR}/common/entdata.cc
|
${CMAKE_SOURCE_DIR}/common/entdata.cc
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
cmake_minimum_required (VERSION 2.8)
|
|
||||||
project (bsputil CXX)
|
|
||||||
|
|
||||||
set(BSPUTIL_SOURCES
|
set(BSPUTIL_SOURCES
|
||||||
bsputil.cc
|
bsputil.cc
|
||||||
decompile.h
|
decompile.h
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
cmake_minimum_required (VERSION 2.8)
|
|
||||||
project (light CXX)
|
|
||||||
|
|
||||||
set(LIGHT_INCLUDES
|
set(LIGHT_INCLUDES
|
||||||
${CMAKE_SOURCE_DIR}/include/light/imglib.hh
|
${CMAKE_SOURCE_DIR}/include/light/imglib.hh
|
||||||
${CMAKE_SOURCE_DIR}/include/light/entities.hh
|
${CMAKE_SOURCE_DIR}/include/light/entities.hh
|
||||||
|
|
@ -119,13 +116,8 @@ install(FILES ${CMAKE_SOURCE_DIR}/gpl_v3.txt DESTINATION bin)
|
||||||
#see https://cmake.org/Wiki/CMakeEmulateMakeCheck
|
#see https://cmake.org/Wiki/CMakeEmulateMakeCheck
|
||||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
|
||||||
|
|
||||||
set(GOOGLETEST_SOURCES ${CMAKE_SOURCE_DIR}/3rdparty/googletest/src/gtest-all.cc)
|
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/googletest/include)
|
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/googletest)
|
|
||||||
|
|
||||||
set(LIGHT_TEST_SOURCE
|
set(LIGHT_TEST_SOURCE
|
||||||
${LIGHT_SOURCES}
|
${LIGHT_SOURCES}
|
||||||
${GOOGLETEST_SOURCES}
|
|
||||||
test.cc
|
test.cc
|
||||||
test_entities.cc
|
test_entities.cc
|
||||||
test_ltface.cc
|
test_ltface.cc
|
||||||
|
|
@ -136,7 +128,7 @@ add_executable(testlight EXCLUDE_FROM_ALL ${LIGHT_TEST_SOURCE})
|
||||||
add_test(testlight testlight)
|
add_test(testlight testlight)
|
||||||
add_dependencies(check testlight)
|
add_dependencies(check testlight)
|
||||||
|
|
||||||
target_link_libraries (testlight ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries (testlight ${CMAKE_THREAD_LIBS_INIT} gtest)
|
||||||
if (embree_FOUND)
|
if (embree_FOUND)
|
||||||
target_link_libraries (testlight ${EMBREE_LIBRARY})
|
target_link_libraries (testlight ${EMBREE_LIBRARY})
|
||||||
add_definitions(-DHAVE_EMBREE)
|
add_definitions(-DHAVE_EMBREE)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
cmake_minimum_required (VERSION 2.8)
|
|
||||||
project (qbsp CXX)
|
|
||||||
|
|
||||||
add_definitions(-DDOUBLEVEC_T)
|
add_definitions(-DDOUBLEVEC_T)
|
||||||
|
|
||||||
add_executable(qbsp ${QBSP_SOURCES} main.cc)
|
add_executable(qbsp ${QBSP_SOURCES} main.cc)
|
||||||
|
|
@ -9,17 +6,12 @@ install(TARGETS qbsp RUNTIME DESTINATION bin)
|
||||||
|
|
||||||
# test (copied from light/CMakeLists.txt)
|
# test (copied from light/CMakeLists.txt)
|
||||||
|
|
||||||
set(GOOGLETEST_SOURCES ${CMAKE_SOURCE_DIR}/3rdparty/googletest/src/gtest-all.cc)
|
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/googletest/include)
|
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/googletest)
|
|
||||||
|
|
||||||
set(QBSP_TEST_SOURCE
|
set(QBSP_TEST_SOURCE
|
||||||
${QBSP_SOURCES}
|
${QBSP_SOURCES}
|
||||||
${GOOGLETEST_SOURCES}
|
|
||||||
test.cc
|
test.cc
|
||||||
test_qbsp.cc)
|
test_qbsp.cc)
|
||||||
|
|
||||||
add_executable(testqbsp EXCLUDE_FROM_ALL ${QBSP_TEST_SOURCE})
|
add_executable(testqbsp EXCLUDE_FROM_ALL ${QBSP_TEST_SOURCE})
|
||||||
add_test(testqbsp testqbsp)
|
add_test(testqbsp testqbsp)
|
||||||
|
|
||||||
target_link_libraries (testqbsp ${CMAKE_THREAD_LIBS_INIT} TBB::tbb)
|
target_link_libraries (testqbsp ${CMAKE_THREAD_LIBS_INIT} TBB::tbb gtest)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue