From 477fb26c1ef458b6b552c7ac42bd0f18a483770f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 18 Jun 2010 17:38:21 -0400 Subject: Centralize LD_LIBRARY_PATH logic with new SET_TEST_PATH macro. Add ${SHARED_LIB_STAGING_DIR_RELEASE} to LD_LIBRARY_PATH for executing tests: otherwise Debug-build tests can't find (e.g.) the aprutil DLL, for which we don't build/package a debug variant. Leverage discovery that a CMake macro can accept a target variable name argument for LL_TEST_COMMAND macro. --- indra/cmake/LLTestCommand.cmake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/cmake/LLTestCommand.cmake') diff --git a/indra/cmake/LLTestCommand.cmake b/indra/cmake/LLTestCommand.cmake index fae5640493..3002720754 100644 --- a/indra/cmake/LLTestCommand.cmake +++ b/indra/cmake/LLTestCommand.cmake @@ -1,13 +1,14 @@ -MACRO(LL_TEST_COMMAND LD_LIBRARY_PATH) +MACRO(LL_TEST_COMMAND OUTVAR LD_LIBRARY_PATH) # nat wonders how Kitware can use the term 'function' for a construct that # cannot return a value. And yet, variables you set inside a FUNCTION are # local. Try a MACRO instead. - SET(LL_TEST_COMMAND_value + SET(value ${PYTHON_EXECUTABLE} "${CMAKE_SOURCE_DIR}/cmake/run_build_test.py") IF(LD_LIBRARY_PATH) - LIST(APPEND LL_TEST_COMMAND_value "-l${LD_LIBRARY_PATH}") + LIST(APPEND value "-l${LD_LIBRARY_PATH}") ENDIF(LD_LIBRARY_PATH) - LIST(APPEND LL_TEST_COMMAND_value ${ARGN}) -##MESSAGE(STATUS "Will run: ${LL_TEST_COMMAND_value}") + LIST(APPEND value ${ARGN}) + SET(${OUTVAR} ${value}) +##MESSAGE(STATUS "Will run: ${value}") ENDMACRO(LL_TEST_COMMAND) -- cgit v1.2.3 From 4e538adca41d486125c3b887ce694c457bcab157 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 21 Jun 2010 12:18:16 -0400 Subject: EXT-7926: fix broken LD_LIBRARY_PATH handling on Windows. Recent checkins introduced two different CMake macros SET_TEST_LIST (which returned a CMake list of PATH directory strings) and SET_TEST_PATH (which returned a single platform-appropriate PATH string). On Windows, whose path-separator character is ';', SET_TEST_PATH interacted badly with CMake: in CMake, a single string containing ';' characters is indistinguishable from a list of strings. Eliminate the return-single-string form, redirecting the name SET_TEST_PATH to the macro that returns a CMake list. Make LL_TEST_COMMAND expect a list value, prepending each directory string with run_build_test.py's -l switch. --- indra/cmake/LLTestCommand.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/cmake/LLTestCommand.cmake') diff --git a/indra/cmake/LLTestCommand.cmake b/indra/cmake/LLTestCommand.cmake index 3002720754..554559edbd 100644 --- a/indra/cmake/LLTestCommand.cmake +++ b/indra/cmake/LLTestCommand.cmake @@ -5,10 +5,12 @@ MACRO(LL_TEST_COMMAND OUTVAR LD_LIBRARY_PATH) SET(value ${PYTHON_EXECUTABLE} "${CMAKE_SOURCE_DIR}/cmake/run_build_test.py") - IF(LD_LIBRARY_PATH) - LIST(APPEND value "-l${LD_LIBRARY_PATH}") - ENDIF(LD_LIBRARY_PATH) + FOREACH(dir ${LD_LIBRARY_PATH}) + LIST(APPEND value "-l${dir}") + ENDFOREACH(dir) LIST(APPEND value ${ARGN}) SET(${OUTVAR} ${value}) -##MESSAGE(STATUS "Will run: ${value}") +##IF(LL_TEST_VERBOSE) +## MESSAGE(STATUS "LL_TEST_COMMAND: ${value}") +##ENDIF(LL_TEST_VERBOSE) ENDMACRO(LL_TEST_COMMAND) -- cgit v1.2.3