]> jfr.im git - irc/weechat/weechat.git/commitdiff
core: add CMake test called "notests" when tests are not compiled
authorSébastien Helleu <redacted>
Fri, 6 Jan 2023 06:53:39 +0000 (07:53 +0100)
committerSébastien Helleu <redacted>
Fri, 6 Jan 2023 06:53:39 +0000 (07:53 +0100)
Now the command `make test` executes properly and returns 0 when test are not
compiled.

CMakeLists.txt
ChangeLog.adoc

index c477a8869f987819f45bd47c2d8a295259265522..9b67ab02c88b879419037029be303cb9e1eb39e2 100644 (file)
@@ -241,6 +241,9 @@ if(ENABLE_TESTS)
   else()
     message(SEND_ERROR "CppUTest not found")
   endif()
+else()
+  enable_testing()
+  add_test(NAME notests COMMAND true)
 endif()
 
 configure_file(config.h.cmake config.h @ONLY)
index 674ad2aac6fab211876086e031d9f5a2f8d69f5c..a756ef3672aca64866a8a174ab37437b81b64cba 100644 (file)
@@ -65,6 +65,7 @@ Tests::
 
 Build::
 
+  * core: add CMake test called "notests" when tests are not compiled
   * core: rename scripts: build-debian.sh to build_debian.sh, build-test.sh to build_test.sh, git-version.sh to set_git_version.sh
   * debian: change dependency guile-2.2-dev to guile-3.0-dev
   * python: remove support of Python 2.x