gnucash maint: Bomb out immediately if or aren't set

John Ralls jralls at code.gnucash.org
Thu Mar 25 16:54:15 EDT 2021


Updated	 via  https://github.com/Gnucash/gnucash/commit/76a4389a (commit)
	from  https://github.com/Gnucash/gnucash/commit/4aefc55a (commit)



commit 76a4389a9212d33e626b9441d5c57f490f6737d0
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Mar 25 13:53:14 2021 -0700

    Bomb out immediately if  or  aren't set
    
    Instead of spewing dozens of errors about file(TO_CMAKE_PATH) needing 3 parameters.

diff --git a/common/cmake_modules/GncAddSchemeTargets.cmake b/common/cmake_modules/GncAddSchemeTargets.cmake
index 225147f1d..3dea80613 100644
--- a/common/cmake_modules/GncAddSchemeTargets.cmake
+++ b/common/cmake_modules/GncAddSchemeTargets.cmake
@@ -203,6 +203,9 @@ function(gnc_add_scheme_targets _TARGET)
   set(_GUILE_LOAD_COMPILED_PATH "${current_bindir}")
   # VERSION_GREATER_EQUAL introduced in CMake 3.7.
   if(MINGW64 AND (${GUILE_EFFECTIVE_VERSION} VERSION_GREATER_EQUAL 2.2))
+    if (NOT (DEFINED ENV{GUILE_LOAD_PATH} AND DEFINED ENV{GUILE_LOAD_COMPILED_PATH}))
+      message(FATAL_ERROR "$GUILE_LOAD_PATH and $GUILE_LOAD_COMPILED_PATH must be defined in the environment to configure GnuCash on Microsoft Windows.")
+    endif()
     file(TO_CMAKE_PATH $ENV{GUILE_LOAD_PATH} guile_load_path)
     file(TO_CMAKE_PATH $ENV{GUILE_LOAD_COMPILED_PATH} guile_load_compiled_path)
     list(APPEND _GUILE_LOAD_PATH ${guile_load_path})



Summary of changes:
 common/cmake_modules/GncAddSchemeTargets.cmake | 3 +++
 1 file changed, 3 insertions(+)



More information about the gnucash-changes mailing list