[geary/bug/776421-make-client-unit-testable: 1/8] Stop cmake warning that we are using an internal target name.



commit b7224d6da36d5c42d6c206eb2b019e3acc20bbb5
Author: Michael James Gratton <mike vee net>
Date:   Mon Dec 26 10:31:02 2016 +1030

    Stop cmake warning that we are using an internal target name.
    
    * CMakeLists.txt: Rename "test" to "tests"
    
    * Makefile.in: Chase target name, add a compatibility target for the old
      name.

 CMakeLists.txt |    6 +++---
 Makefile.in    |    8 ++++++--
 2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d091bd..09146f6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,9 +151,9 @@ include(GlibCompileResourcesSupport)
 # Unit tests.
 #
 # We don't use CMake's enable_testing/add_test built-ins because they
-# use ctest.
-add_custom_target(test ALL geary-test)
-add_dependencies(test geary-test)
+# use ctest. It's not called "test" because that is cmake reserved.
+add_custom_target(tests ALL geary-test)
+add_dependencies(tests geary-test)
 
 #
 # Uninstall target
diff --git a/Makefile.in b/Makefile.in
index 81575c6..61a9730 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -37,12 +37,16 @@ distclean: clean
        @-rm -rf $(BUILD_DIR)
        @-rm -f Makefile
 
+.PHONY: tests
+tests:
+       @$(MAKE) -C $(BUILD_DIR) $@
+
 .PHONY: test
 test:
-       @$(MAKE) -C $(BUILD_DIR) $@
+       @$(MAKE) -C $(BUILD_DIR) tests
 
 .PHONY: dist
-dist: test
+dist: tests
        @$(MAKE) -C $(BUILD_DIR) dist
        @cp build/*.xz .
 


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