gnucash maint: Set CONFIGURATIONS property on tests only for Xcode.

John Ralls jralls at code.gnucash.org
Sat Apr 18 16:09:40 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/4b8649f7 (commit)
	from  https://github.com/Gnucash/gnucash/commit/ea552c7e (commit)



commit 4b8649f77bce81487317b8823aca520fac8a3816
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Apr 18 13:09:32 2020 -0700

    Set CONFIGURATIONS property on tests only for Xcode.
    
    Having it in the general case disabled a large number of tests.

diff --git a/common/cmake_modules/GncAddTest.cmake b/common/cmake_modules/GncAddTest.cmake
index cf75f23ec..3d510a4e8 100644
--- a/common/cmake_modules/GncAddTest.cmake
+++ b/common/cmake_modules/GncAddTest.cmake
@@ -78,7 +78,11 @@ function(gnc_add_test _TARGET _SOURCE_FILES TEST_INCLUDE_VAR_NAME TEST_LIBS_VAR_
     )
     set_tests_properties(${_TARGET} PROPERTIES ENVIRONMENT "GNC_UNINSTALLED=YES;GNC_BUILDDIR=${CMAKE_BINARY_DIR};${ARGN}")
   else()
-    add_test(NAME ${_TARGET} COMMAND ${_TARGET} CONFIGURATIONS Debug;Release)
+    if (CMAKE_GENERATOR STREQUAL Xcode)
+      add_test(NAME ${_TARGET} COMMAND ${_TARGET} CONFIGURATIONS Debug;Release)
+    else()
+      add_test(NAME ${_TARGET} COMMAND ${_TARGET})
+    endif()
     set_tests_properties(${_TARGET} PROPERTIES ENVIRONMENT "GNC_UNINSTALLED=YES;GNC_BUILDDIR=${CMAKE_BINARY_DIR}")
   endif()
   add_dependencies(check ${_TARGET})



Summary of changes:
 common/cmake_modules/GncAddTest.cmake | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list