From bdbed413b5fd6c4ba207b3522547aca6ac11e44b Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Fri, 30 Aug 2013 12:54:07 -0400 Subject: [PATCH] Tell CMake to look in individual test directories for tests if they exist --- CMakeLists.txt | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 896be3e..ffdd936 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,8 +92,22 @@ ENDIF(TREAT_WARNINGS_AS_ERRORS) SET(CMAKE_MODULE_PATH "${FasTC_SOURCE_DIR}/CMakeModules" ${CMAKE_MODULE_PATH}) FIND_PACKAGE(PVRTexLib) -ADD_SUBDIRECTORY(BPTCEncoder) -ADD_SUBDIRECTORY(IO) -ADD_SUBDIRECTORY(Core) +SET(FASTC_DIRECTORIES + BPTCEncoder IO 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)