From 0bd557510a20565a4f27318f86dd11dac88ff574 Mon Sep 17 00:00:00 2001 From: Jim Purbrick Date: Thu, 26 Feb 2009 18:13:17 +0000 Subject: Fixed check to ensure the tests file actually exists Actually coded by DaveH, reviewed by CG --- indra/cmake/LLAddBuildTest.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/cmake/LLAddBuildTest.cmake') diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index cabea78d3f..57797a0d12 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -3,7 +3,8 @@ INCLUDE(APR) INCLUDE(LLMath) MACRO(ADD_BUILD_TEST_NO_COMMON name parent) - IF (EXISTS tests/${name}_test.cpp) +# MESSAGE("${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp") + IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp") SET(no_common_libraries ${APRUTIL_LIBRARIES} ${APR_LIBRARIES} @@ -22,12 +23,14 @@ MACRO(ADD_BUILD_TEST_NO_COMMON name parent) ${CMAKE_SOURCE_DIR}/test/test.cpp ) ADD_BUILD_TEST_INTERNAL(${name} ${parent} "${no_common_libraries}" "${no_common_source_files}") - ENDIF (EXISTS tests/${name}_test.cpp) + ENDIF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp") ENDMACRO(ADD_BUILD_TEST_NO_COMMON name parent) MACRO(ADD_BUILD_TEST name parent) - IF (EXISTS tests/${name}_test.cpp) +# MESSAGE("${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp") + IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp") + SET(basic_libraries ${LLCOMMON_LIBRARIES} ${APRUTIL_LIBRARIES} @@ -42,7 +45,7 @@ MACRO(ADD_BUILD_TEST name parent) ${CMAKE_SOURCE_DIR}/test/lltut.cpp ) ADD_BUILD_TEST_INTERNAL(${name} ${parent} "${basic_libraries}" "${basic_source_files}") - ENDIF (EXISTS tests/${name}_test.cpp) + ENDIF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp") ENDMACRO(ADD_BUILD_TEST name parent) -- cgit v1.2.3