summaryrefslogtreecommitdiff
path: root/indra/test/CMakeLists.txt
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-07-30 19:39:08 -0700
committerbrad kittenbrink <brad@lindenlab.com>2009-07-30 19:39:08 -0700
commita7efd0d8ddb68315653265d7e4ab87a156e56560 (patch)
tree4210ae49796fdb8fb4b28f0bdd857dc338110070 /indra/test/CMakeLists.txt
parentb3a83059c464c9a974d547f57ab8e93ca0bee0f1 (diff)
parent29607ab70edea79cfdceaa52d632d77e6699cb8f (diff)
Merged in viewer-2.0.0-3 changes up through r129050. Boost got clobbered so I'll need to rebuild that, plus a couple other minor clenaups.
Diffstat (limited to 'indra/test/CMakeLists.txt')
-rw-r--r--indra/test/CMakeLists.txt24
1 files changed, 18 insertions, 6 deletions
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index 463eedb4fd..012c5e6408 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -13,7 +13,7 @@ include(LLXML)
include(LScript)
include(Linking)
include(Tut)
-include(Boost)
+
include_directories(
${LLCOMMON_INCLUDE_DIRS}
@@ -93,6 +93,7 @@ set(test_SOURCE_FILES
set(test_HEADER_FILES
CMakeLists.txt
+ debug.h
llpipeutil.h
llsdtraits.h
lltut.h
@@ -126,6 +127,7 @@ target_link_libraries(test
${LLXML_LIBRARIES}
${LSCRIPT_LIBRARIES}
${LLCOMMON_LIBRARIES}
+ ${EXPAT_LIBRARIES}
${APRICONV_LIBRARIES}
${PTHREAD_LIBRARY}
${WINDOWS_LIBRARIES}
@@ -145,16 +147,26 @@ endif (WINDOWS)
get_target_property(TEST_EXE test LOCATION)
-add_custom_command(
+IF(WINDOWS)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+ELSE(WINDOWS)
+ set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:/usr/lib)
+ENDIF(WINDOWS)
+
+SET(TEST_CMD ${TEST_EXE} --output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt --touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt)
+
+ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt
- COMMAND ${TEST_EXE}
+ COMMAND ${CMAKE_COMMAND}
ARGS
- --output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt
- --touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt
+ -DLD_LIBRARY_PATH=${LD_LIBRARY_PATH}
+ "-DTEST_CMD:STRING=\"${TEST_CMD}\""
+ -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
+
DEPENDS test
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "C++ unit tests"
- )
+ )
set(test_results ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt)