Skip to content

Commit

Permalink
Bomb out immediately if or aren't set
Browse files Browse the repository at this point in the history
Instead of spewing dozens of errors about file(TO_CMAKE_PATH) needing 3 parameters.
  • Loading branch information
jralls committed Mar 25, 2021
1 parent 4aefc55 commit 76a4389
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/cmake_modules/GncAddSchemeTargets.cmake
Expand Up @@ -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})
Expand Down

0 comments on commit 76a4389

Please sign in to comment.