Skip to content
Snippets Groups Projects
Verified Commit ea874767 authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake] If git repo is not found then set OGS_VERSION=NO_VERSION.

Allows for configuring build with sources from archive download.
parent 1060d244
No related branches found
No related tags found
No related merge requests found
...@@ -18,19 +18,20 @@ if(NOT _IS_GIT_REPO) ...@@ -18,19 +18,20 @@ if(NOT _IS_GIT_REPO)
) )
if(_IS_GIT_REPO GREATER 0) if(_IS_GIT_REPO GREATER 0)
set(_IS_GIT_REPO FALSE CACHE INTERNAL "") set(_IS_GIT_REPO FALSE CACHE INTERNAL "")
if(DEFINED OGS_VERSION) if(NOT DEFINED OGS_VERSION)
message( if(DEFINED $ENV{CI})
WARNING message(
"Using user-provided OGS_VERSION; Submodule setup is skipped!" FATAL_ERROR
) "No git repository found at ${PROJECT_SOURCE_DIR}! "
else() "Please use git to obtain the source code OR manually set the OGS_VERSION variable."
message( )
FATAL_ERROR else()
"No git repository found at ${PROJECT_SOURCE_DIR}! " set(OGS_VERSION "NO_VERSION")
"Please use git to obtain the source code! See " message(
"https://www.opengeosys.org/docs/devguide/getting-started/get-the-source-code/" WARNING "No git repository found at ${PROJECT_SOURCE_DIR}! "
" OR manually set the OGS_VERSION variable." "OGS_VERSION is set to NO_VERSION !"
) )
endif()
endif() endif()
else() else()
set(_IS_GIT_REPO TRUE CACHE INTERNAL "") set(_IS_GIT_REPO TRUE CACHE INTERNAL "")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment