summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2013-08-19 22:50:54 -0700
committerChad Versace <chad.versace@linux.intel.com>2013-08-19 23:46:53 -0700
commit8418ef31bbe67ec615a06dcdf1f11d011485f75c (patch)
tree3c20b50803b437b074b02271d7ea86fa33bd56db
parent9bc242a130c1757a0d511ff7630830fca5042096 (diff)
cmake: Refactor targets 'check', 'check-func'
They were defined in the toplevel CMakeLists.txt. Move them to `tests/CMakeLists.txt.` This change belongs to a series that cleans up the toplevel CMakeLists by decomposing it. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--CMakeLists.txt29
-rw-r--r--tests/CMakeLists.txt19
2 files changed, 19 insertions, 29 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8eea7cc..2f0cb0c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,35 +66,6 @@ if(waffle_build_examples)
endif()
# ------------------------------------------------------------------------------
-# Target: check
-# ------------------------------------------------------------------------------
-
-# Run only unit tests.
-
-if(waffle_build_tests)
- add_custom_target(check
- DEPENDS waffle-unittest
- COMMAND ${CMAKE_BINARY_DIR}/tests/unittests/waffle-unittest
- )
-endif()
-
-# ------------------------------------------------------------------------------
-# Target: check-func
-# ------------------------------------------------------------------------------
-
-# Run functional and unit tests.
-#
-# The unit tests are ran first (due to the depenency on 'check'). If they
-# fail, then no subsequent tests are ran.
-
-if(waffle_build_tests)
- add_custom_target(check-func
- DEPENDS check gl_basic_test
- COMMAND ${CMAKE_BINARY_DIR}/tests/functional/gl_basic_test
- )
-endif()
-
-# ------------------------------------------------------------------------------
# Install packaging files: waffle.pc, FindWaffle.cmake
# ------------------------------------------------------------------------------
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 75bf90b..7a9dd7e 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -3,3 +3,22 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(waffle_test)
add_subdirectory(unittests)
add_subdirectory(functional)
+
+#
+# Run only pure unit tests.
+#
+add_custom_target(check
+ DEPENDS waffle-unittest
+ COMMAND ${CMAKE_BINARY_DIR}/tests/unittests/waffle-unittest
+)
+
+#
+# Run functional and unit tests.
+#
+# The unit tests are ran first (due to the depenency on 'check'). If they
+# fail, then no subsequent tests are ran.
+#
+add_custom_target(check-func
+ DEPENDS check gl_basic_test
+ COMMAND ${CMAKE_BINARY_DIR}/tests/functional/gl_basic_test
+)