[geary/wip/728002-webkit2] Don't build and run tests by default.



commit c49cdd33668be7ac226ba7fa745316d9745d3756
Author: Michael James Gratton <mike vee net>
Date:   Mon Jan 30 23:01:49 2017 +1100

    Don't build and run tests by default.
    
    * CMakeLists.txt: Remove tests from default target list.
    
    * test/CMakeLists.txt: Don't depend on the client executable, just the
      resources file.

 CMakeLists.txt      |    2 +-
 test/CMakeLists.txt |    6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aacb525..1fa4a48 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -153,7 +153,7 @@ include(GlibCompileResourcesSupport)
 #
 # We don't use CMake's enable_testing/add_test built-ins because they
 # use ctest. It's not called "test" because that is cmake reserved.
-add_custom_target(tests ALL geary-test)
+add_custom_target(tests geary-test)
 add_dependencies(tests geary-test)
 
 #
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c050287..b5f5495 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -91,8 +91,6 @@ OPTIONS
     ${VALAC_OPTIONS}
 )
 
-add_executable(geary-test ${TEST_VALA_C} ${RESOURCES_C})
-# Depend on geary so things like GResources, GSetting, etc are
-# compiled before the tests are built and run.
-add_dependencies(geary-test geary)
+# Exclude from all so tests aren't built by default
+add_executable(geary-test EXCLUDE_FROM_ALL ${TEST_VALA_C} ${RESOURCES_C})
 target_link_libraries(geary-test ${DEPS_LIBRARIES} geary-client geary-engine)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]