diff options
author | Nicky <nicky.dasmijn@gmail.com> | 2022-04-06 16:32:52 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@gmail.com> | 2022-04-06 16:32:52 +0200 |
commit | 786b291d9c6b784c7ce6ceef0e38a4ec76ea14db (patch) | |
tree | ed7386562337f06b212e0e95753c891ec7efbb3a /indra/cmake/LLAddBuildTest.cmake | |
parent | 7522cea2528f9cfdf5283a7920dd3434417b20f4 (diff) |
Move CMake files to modernized cmake syntax, step 1.
Change projects to cmake targetsto get rid of havig to hardcore
include directories and link libraries in consumer projects.
Diffstat (limited to 'indra/cmake/LLAddBuildTest.cmake')
-rw-r--r-- | indra/cmake/LLAddBuildTest.cmake | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 4937c2a9d7..6860b1f316 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -36,30 +36,29 @@ INCLUDE(GoogleMock) ) SET(alltest_DEP_TARGETS # needed by the test harness itself - ${APRUTIL_LIBRARIES} - ${APR_LIBRARIES} llcommon ) + + SET(alltest_INCLUDE_DIRS + ${LIBS_OPEN_DIR}/test + ${GOOGLEMOCK_INCLUDE_DIRS} + ) + SET(alltest_LIBRARIES + llcommon + ${GOOGLEMOCK_LIBRARIES} + ${PTHREAD_LIBRARY} + ${WINDOWS_LIBRARIES} + ) IF(NOT "${project}" STREQUAL "llmath") # add llmath as a dep unless the tested module *is* llmath! LIST(APPEND alltest_DEP_TARGETS - llmath - ) + llmath + ) + LIST(APPEND alltest_LIBRARIES + llmath + ) ENDIF(NOT "${project}" STREQUAL "llmath") - SET(alltest_INCLUDE_DIRS - ${LLMATH_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LIBS_OPEN_DIR}/test - ${GOOGLEMOCK_INCLUDE_DIRS} - ) - SET(alltest_LIBRARIES - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - ${GOOGLEMOCK_LIBRARIES} - ${PTHREAD_LIBRARY} - ${WINDOWS_LIBRARIES} - ) + # Headers, for convenience in targets. SET(alltest_HEADER_FILES ${CMAKE_SOURCE_DIR}/test/test.h @@ -126,7 +125,8 @@ INCLUDE(GoogleMock) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_LIBRARIES ${${name}_test_additional_LIBRARIES}") ENDIF(LL_TEST_VERBOSE) # Add to project - TARGET_LINK_LIBRARIES(PROJECT_${project}_TEST_${name} ${alltest_LIBRARIES} ${alltest_DEP_TARGETS} ${${name}_test_additional_PROJECTS} ${${name}_test_additional_LIBRARIES} ) + TARGET_LINK_LIBRARIES(PROJECT_${project}_TEST_${name} ${alltest_LIBRARIES} ${${name}_test_additional_PROJECTS} ${${name}_test_additional_LIBRARIES} ) + add_dependencies( PROJECT_${project}_TEST_${name} ${alltest_DEP_TARGETS}) # Compile-time Definitions GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_CFLAGS ${source} LL_TEST_ADDITIONAL_CFLAGS) SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name} |