Tell CMake to look in individual test directories for tests if they exist

This commit is contained in:
Pavel Krajcevski 2013-08-30 12:54:07 -04:00
parent 2d470a387a
commit bdbed413b5

View File

@ -92,8 +92,22 @@ ENDIF(TREAT_WARNINGS_AS_ERRORS)
SET(CMAKE_MODULE_PATH "${FasTC_SOURCE_DIR}/CMakeModules" ${CMAKE_MODULE_PATH}) SET(CMAKE_MODULE_PATH "${FasTC_SOURCE_DIR}/CMakeModules" ${CMAKE_MODULE_PATH})
FIND_PACKAGE(PVRTexLib) FIND_PACKAGE(PVRTexLib)
ADD_SUBDIRECTORY(BPTCEncoder) SET(FASTC_DIRECTORIES
ADD_SUBDIRECTORY(IO) BPTCEncoder IO Core
ADD_SUBDIRECTORY(Core) )
FOREACH(DIR ${FASTC_DIRECTORIES})
ADD_SUBDIRECTORY(${DIR})
ENDFOREACH()
ENABLE_TESTING()
ADD_SUBDIRECTORY(GTest)
FOREACH(DIR ${FASTC_DIRECTORIES})
SET(TESTDIR ${FasTC_SOURCE_DIR}/${DIR}/test)
IF(IS_DIRECTORY ${TESTDIR})
ADD_SUBDIRECTORY(${TESTDIR})
ENDIF()
ENDFOREACH()
ADD_SUBDIRECTORY(CLTool) ADD_SUBDIRECTORY(CLTool)