diff options
author | Nicky <nicky.dasmijn@gmail.com> | 2022-04-06 22:38:38 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@gmail.com> | 2022-04-06 23:33:06 +0200 |
commit | d1b6a52fefb483ab75ec60e379d37bfd2e6aff90 (patch) | |
tree | 50453d809ad4f59563cf01a66b10bd23aecf5dd4 /indra | |
parent | ef989bce374516192c59be32af674de19295a31a (diff) |
Googlemock target
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/GoogleMock.cmake | 29 | ||||
-rw-r--r-- | indra/cmake/LLAddBuildTest.cmake | 15 | ||||
-rw-r--r-- | indra/llmath/CMakeLists.txt | 5 | ||||
-rw-r--r-- | indra/test/CMakeLists.txt | 1 |
4 files changed, 22 insertions, 28 deletions
diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 5a00546927..58975df62e 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -4,25 +4,26 @@ include(Linking) use_prebuilt_binary(googlemock) -set(GOOGLEMOCK_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include) +if( TARGET googlemock::googlemock ) + return() +endif() +create_target( googlemock::googlemock ) +set_target_include_dirs( googlemock::googlemock + ${LIBS_PREBUILT_DIR}/include + ) if (LINUX) # VWR-24366: gmock is underlinked, it needs gtest. - set(GOOGLEMOCK_LIBRARIES - gmock -Wl,--no-as-needed - gtest -Wl,--as-needed) + set_target_libraries( googlemock::googlemock gmock gtest) elseif(WINDOWS) - set(GOOGLEMOCK_LIBRARIES - gmock) - set(GOOGLEMOCK_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include - ${LIBS_PREBUILT_DIR}/include/gmock - ${LIBS_PREBUILT_DIR}/include/gmock/boost/tr1/tr1) + set_target_libraries( googlemock::googlemock gmock) + set_target_include_dirs( googlemock::googlemock + ${LIBS_PREBUILT_DIR}/include + ${LIBS_PREBUILT_DIR}/include/gmock + ${LIBS_PREBUILT_DIR}/include/gmock/boost/tr1/tr1 ) + elseif(DARWIN) - set(GOOGLEMOCK_LIBRARIES - gmock - gtest) + set_target_libraries( googlemock::googlemock gmock gtest) endif(LINUX) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 6860b1f316..1a8003ea7f 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -45,7 +45,7 @@ INCLUDE(GoogleMock) ) SET(alltest_LIBRARIES llcommon - ${GOOGLEMOCK_LIBRARIES} + googlemock::googlemock ${PTHREAD_LIBRARY} ${WINDOWS_LIBRARIES} ) @@ -206,14 +206,11 @@ FUNCTION(LL_ADD_INTEGRATION_TEST ) SET(libraries - ${LEGACY_STDIO_LIBS} - ${library_dependencies} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - ${GOOGLEMOCK_LIBRARIES} - ${PTHREAD_LIBRARY} - ) + ${LEGACY_STDIO_LIBS} + ${library_dependencies} + googlemock::googlemock + ${PTHREAD_LIBRARY} + ) # Add test executable build target if(TEST_DEBUG) diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index c385a4cff6..fd7b831719 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -7,11 +7,6 @@ include(LLCommon) include(bugsplat) include(Boost) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) - set(llmath_SOURCE_FILES llbbox.cpp llbboxlocal.cpp diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index b607980bae..6d04c3b76b 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -74,6 +74,7 @@ target_link_libraries(lltest llxml llcommon llcorehttp + googlemock::googlemock ${WINDOWS_LIBRARIES} ${DL_LIBRARY} ) |