summaryrefslogtreecommitdiff
path: root/indra/cmake/LLAddBuildTest.cmake
diff options
context:
space:
mode:
authorChristian Goetze <cg@lindenlab.com>2009-02-26 11:17:08 +0000
committerChristian Goetze <cg@lindenlab.com>2009-02-26 11:17:08 +0000
commit5a1fe7a013152ddcea36544205b36aa16557d70f (patch)
tree17888a7fec97bfbe921fda9a7d4bd7c8fb95f69d /indra/cmake/LLAddBuildTest.cmake
parentc88b470a8a2cdae8e69e5570b46d4b21c43368bc (diff)
Go a different route - do not include tut tests in open source builds and conditionally exclude the cmake macro upon availability of the source files. Reviewed by Scouse
Diffstat (limited to 'indra/cmake/LLAddBuildTest.cmake')
-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)