summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/LLAddBuildTest.cmake68
1 files changed, 36 insertions, 32 deletions
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 3557a99248..cabea78d3f 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -3,42 +3,46 @@ INCLUDE(APR)
INCLUDE(LLMath)
MACRO(ADD_BUILD_TEST_NO_COMMON name parent)
- SET(no_common_libraries
- ${APRUTIL_LIBRARIES}
- ${APR_LIBRARIES}
- ${PTHREAD_LIBRARY}
- ${WINDOWS_LIBRARIES}
- )
- SET(no_common_libraries
- ${APRUTIL_LIBRARIES}
- ${APR_LIBRARIES}
- ${PTHREAD_LIBRARY}
- ${WINDOWS_LIBRARIES}
- )
- SET(no_common_source_files
- ${name}.cpp
- tests/${name}_test.cpp
- ${CMAKE_SOURCE_DIR}/test/test.cpp
- )
- ADD_BUILD_TEST_INTERNAL(${name} ${parent} "${no_common_libraries}" "${no_common_source_files}")
+ IF (EXISTS tests/${name}_test.cpp)
+ SET(no_common_libraries
+ ${APRUTIL_LIBRARIES}
+ ${APR_LIBRARIES}
+ ${PTHREAD_LIBRARY}
+ ${WINDOWS_LIBRARIES}
+ )
+ SET(no_common_libraries
+ ${APRUTIL_LIBRARIES}
+ ${APR_LIBRARIES}
+ ${PTHREAD_LIBRARY}
+ ${WINDOWS_LIBRARIES}
+ )
+ SET(no_common_source_files
+ ${name}.cpp
+ tests/${name}_test.cpp
+ ${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)
ENDMACRO(ADD_BUILD_TEST_NO_COMMON name parent)
MACRO(ADD_BUILD_TEST name parent)
- SET(basic_libraries
- ${LLCOMMON_LIBRARIES}
- ${APRUTIL_LIBRARIES}
- ${APR_LIBRARIES}
- ${PTHREAD_LIBRARY}
- ${WINDOWS_LIBRARIES}
- )
- SET(basic_source_files
- ${name}.cpp
- tests/${name}_test.cpp
- ${CMAKE_SOURCE_DIR}/test/test.cpp
- ${CMAKE_SOURCE_DIR}/test/lltut.cpp
- )
- ADD_BUILD_TEST_INTERNAL(${name} ${parent} "${basic_libraries}" "${basic_source_files}")
+ IF (EXISTS tests/${name}_test.cpp)
+ SET(basic_libraries
+ ${LLCOMMON_LIBRARIES}
+ ${APRUTIL_LIBRARIES}
+ ${APR_LIBRARIES}
+ ${PTHREAD_LIBRARY}
+ ${WINDOWS_LIBRARIES}
+ )
+ SET(basic_source_files
+ ${name}.cpp
+ tests/${name}_test.cpp
+ ${CMAKE_SOURCE_DIR}/test/test.cpp
+ ${CMAKE_SOURCE_DIR}/test/lltut.cpp
+ )
+ ADD_BUILD_TEST_INTERNAL(${name} ${parent} "${basic_libraries}" "${basic_source_files}")
+ ENDIF (EXISTS tests/${name}_test.cpp)
ENDMACRO(ADD_BUILD_TEST name parent)