Skip to content
Snippets Groups Projects
Commit 54850d40 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

fetch submodule

parent d835aedf
No related branches found
No related tags found
No related merge requests found
...@@ -35,9 +35,28 @@ set(CXX_DISABLE_WERROR TRUE) ...@@ -35,9 +35,28 @@ set(CXX_DISABLE_WERROR TRUE)
set(CMAKE_VERBOSE_MAKEFILE TRUE) set(CMAKE_VERBOSE_MAKEFILE TRUE)
set(PROJECT_CUSTOM_HEADER_EXTENSION "hpp") set(PROJECT_CUSTOM_HEADER_EXTENSION "hpp")
# Check if the submodule cmake have been initialized
set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake")
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake/base.cmake")
if(${CMAKE_VERSION} VERSION_LESS "3.14.0")
message(
FATAL_ERROR
"\nPlease run the following command first:\ngit submodule update --init\n"
)
else()
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
include(FetchContent)
FetchContent_Declare(
"jrl-cmakemodules"
GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git")
FetchContent_MakeAvailable("jrl-cmakemodules")
FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES)
endif()
endif()
# JRL-cmakemodule setup # JRL-cmakemodule setup
include(cmake/base.cmake) include("${JRL_CMAKE_MODULES}/base.cmake")
include(cmake/boost.cmake) include("${JRL_CMAKE_MODULES}/boost.cmake")
# Project definition # Project definition
compute_project_args(PROJECT_ARGS LANGUAGES CXX) compute_project_args(PROJECT_ARGS LANGUAGES CXX)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment