Skip to content

Commit dace5bf

Browse files
committed
bumps
1 parent 401f1d5 commit dace5bf

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

CMakeLists.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,32 @@ set(CUSTOM_HEADER_DIR "${PROJECT_NAME}")
1515
set(CXX_DISABLE_WERROR TRUE)
1616
set(CMAKE_VERBOSE_MAKEFILE TRUE)
1717

18+
# Check if the submodule cmake have been initialized
19+
set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake")
20+
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake/base.cmake")
21+
if(${CMAKE_VERSION} VERSION_LESS "3.14.0")
22+
message(
23+
FATAL_ERROR
24+
"\nPlease run the following command first:\ngit submodule update --init\n"
25+
)
26+
else()
27+
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
28+
include(FetchContent)
29+
FetchContent_Declare(
30+
"jrl-cmakemodules"
31+
GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git")
32+
FetchContent_MakeAvailable("jrl-cmakemodules")
33+
FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES)
34+
endif()
35+
endif()
36+
1837
# JRL-cmakemodule setup
19-
include(cmake/base.cmake)
38+
include("${JRL_CMAKE_MODULES}/base.cmake")
2039

2140
# Project definition
2241
compute_project_args(PROJECT_ARGS LANGUAGES CXX)
2342
project(${PROJECT_NAME} ${PROJECT_ARGS})
43+
check_minimal_cxx_standard(14 ENFORCE)
2444

2545
# Project dependencies
2646
add_project_dependency(Eigen3 REQUIRED)

0 commit comments

Comments
 (0)