summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt23
-rw-r--r--tests/unittests/CMakeLists.txt11
2 files changed, 14 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 160234d..129950e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,15 +180,6 @@ if(waffle_has_x11_egl)
endif(waffle_has_x11_egl)
# ------------------------------------------------------------------------------
-# Target: check
-# ------------------------------------------------------------------------------
-
-if(waffle_build_tests)
- # Subdirectories should add dependencies.
- add_custom_target(check)
-endif(waffle_build_tests)
-
-# ------------------------------------------------------------------------------
# Add subdirectories
# ------------------------------------------------------------------------------
@@ -205,6 +196,20 @@ if(waffle_build_examples)
endif(waffle_build_examples)
# ------------------------------------------------------------------------------
+# Target: check
+# ------------------------------------------------------------------------------
+
+# The unit tests are ran first. If they fail, then no subsequent tests are ran.
+
+if(waffle_build_tests)
+ add_custom_target(check
+ DEPENDS waffle-unittest gl_basic_test
+ COMMAND ${CMAKE_BINARY_DIR}/tests/unittests/waffle-unittest
+ COMMAND ${CMAKE_BINARY_DIR}/tests/functional/gl_basic_test
+ )
+endif(waffle_build_tests)
+
+# ------------------------------------------------------------------------------
# Print summary
# ------------------------------------------------------------------------------
diff --git a/tests/unittests/CMakeLists.txt b/tests/unittests/CMakeLists.txt
index 6684efa..72f15bd 100644
--- a/tests/unittests/CMakeLists.txt
+++ b/tests/unittests/CMakeLists.txt
@@ -14,14 +14,3 @@ target_link_libraries(waffle-unittest
waffle
waffle_test
)
-
-# ----------------------------------------------------------------------------
-# Target: waffle-check
-# ----------------------------------------------------------------------------
-
-add_custom_target(waffle-check
- DEPENDS waffle-unittest
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/waffle-unittest
- )
-
-add_dependencies(check waffle-check)