Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-06-18 16:49:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-06-18 20:09:16 +0400
commit306cbb82ecf0d7c1ba4fb0a1240175b1976bd25b (patch)
treee9eac65bf57126ac233f22fe88cc00df137ec4e5 /CMakeLists.txt
parent47ec0394ca3d03e07c07a67e8f8d1625aedd39dd (diff)
GTest unit testing framework
Currently covers only small set of functionality.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 559382080f3..7e21f977302 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,6 +109,7 @@ enable_testing()
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE)
+set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests CACHE INTERNAL "" FORCE)
#-----------------------------------------------------------------------------
# Set default config options
@@ -300,6 +301,9 @@ if(CMAKE_COMPILER_IS_GNUCC)
mark_as_advanced(WITH_GCC_MUDFLAP)
endif()
+# Unit testsing
+option(WITH_GTESTS "Enable GTest unit testing" OFF)
+
if(APPLE)
cmake_minimum_required(VERSION 2.8.8)
cmake_policy(VERSION 2.8.8)
@@ -2330,10 +2334,17 @@ endif()
#-----------------------------------------------------------------------------
# Libraries
+if(WITH_TESTS)
+ include(GTestTesting)
+endif()
+
if(WITH_BLENDER OR WITH_PLAYER)
- add_subdirectory(source)
add_subdirectory(intern)
add_subdirectory(extern)
+
+ # source after intern and extern to gather all
+ # internal and external library information first, for test linking
+ add_subdirectory(source)
elseif(WITH_CYCLES_STANDALONE)
add_subdirectory(intern/cycles)
if(NOT WITH_SYSTEM_GLEW)