jami
[Top][All Lists]
Advanced

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

[PATCH] Fix running tests when building out of the source tree.


From: Maxim Cournoyer
Subject: [PATCH] Fix running tests when building out of the source tree.
Date: Wed, 29 May 2024 01:32:29 -0400

CMake's enable_testing needs to be called from the root of the project
as well for CTest to discover the tests in the build tree.  This is
covered in CMake's manual in section 7.2.17 enable_testing.

---

 CMakeLists.txt       | 1 +
 tests/CMakeLists.txt | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e802357f..75cffda2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -884,5 +884,6 @@ qt_finalize_executable(${PROJECT_NAME})
 # tests
 if(BUILD_TESTING)
   message("Add Jami tests")
+  enable_testing()
   add_subdirectory(${TESTS_DIR})
 endif()
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 6ccd5558..3c8f94ce 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.16)
 
-enable_testing(true)
+enable_testing()
 
 set(QT_TESTING_MODULES
     ${QT_MODULES}

base-commit: 3b9fb0bfca321e546a9d7277208d8dd444737b00
-- 
2.41.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]