diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2010-06-21 14:43:36 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2010-06-21 14:43:36 -0400 |
commit | 9fe55d340feb3b761fa15be9b7c5efb7d5f4c51f (patch) | |
tree | bda7dd44eb8bb02e009620b8e3fc79db9a524efa /indra/cmake/LLAddBuildTest.cmake | |
parent | 17f98b36d3e3bebdcb331f91fc0f542f618be71d (diff) | |
parent | f17623d8c67a10c2d7547e40ac8442c703d107ed (diff) |
Automated merge with ssh://hg.lindenlab.com/q/viewer-release/
Diffstat (limited to 'indra/cmake/LLAddBuildTest.cmake')
-rw-r--r-- | indra/cmake/LLAddBuildTest.cmake | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index bf4d9b72a9..dd49caaf20 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -141,17 +141,9 @@ INCLUDE(GoogleMock) IF(LL_TEST_VERBOSE) MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_cmd = ${TEST_CMD}") ENDIF(LL_TEST_VERBOSE) - - IF(WINDOWS) - set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}) - ELSEIF(DARWIN) - set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources:/usr/lib) - ELSE(WINDOWS) - set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}:/usr/lib) - ENDIF(WINDOWS) - LL_TEST_COMMAND("${LD_LIBRARY_PATH}" ${TEST_CMD}) - SET(TEST_SCRIPT_CMD ${LL_TEST_COMMAND_value}) + SET_TEST_PATH(LD_LIBRARY_PATH) + LL_TEST_COMMAND(TEST_SCRIPT_CMD "${LD_LIBRARY_PATH}" ${TEST_CMD}) IF(LL_TEST_VERBOSE) MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_script = ${TEST_SCRIPT_CMD}") ENDIF(LL_TEST_VERBOSE) @@ -233,16 +225,8 @@ FUNCTION(LL_ADD_INTEGRATION_TEST LIST(INSERT test_command test_exe_pos "${TEST_EXE}") ENDIF (test_exe_pos LESS 0) - IF(WINDOWS) - set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}) - ELSEIF(DARWIN) - set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources:/usr/lib) - ELSE(WINDOWS) - set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}:/usr/lib) - ENDIF(WINDOWS) - - LL_TEST_COMMAND("${LD_LIBRARY_PATH}" ${test_command}) - SET(TEST_SCRIPT_CMD ${LL_TEST_COMMAND_value}) + SET_TEST_PATH(LD_LIBRARY_PATH) + LL_TEST_COMMAND(TEST_SCRIPT_CMD "${LD_LIBRARY_PATH}" ${test_command}) if(TEST_DEBUG) message(STATUS "TEST_SCRIPT_CMD: ${TEST_SCRIPT_CMD}") @@ -258,3 +242,20 @@ FUNCTION(LL_ADD_INTEGRATION_TEST # ADD_TEST(INTEGRATION_TEST_RUNNER_${testname} ${TEST_SCRIPT_CMD}) ENDFUNCTION(LL_ADD_INTEGRATION_TEST) + +MACRO(SET_TEST_PATH LISTVAR) + IF(WINDOWS) + # We typically build/package only Release variants of third-party + # libraries, so append the Release staging dir in case the library being + # sought doesn't have a debug variant. + set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR} ${SHARED_LIB_STAGING_DIR}/Release) + ELSEIF(DARWIN) + # We typically build/package only Release variants of third-party + # libraries, so append the Release staging dir in case the library being + # sought doesn't have a debug variant. + set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib) + ELSE(WINDOWS) + # Linux uses a single staging directory anyway. + set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib) + ENDIF(WINDOWS) +ENDMACRO(SET_TEST_PATH) |