@@ -27,13 +27,33 @@ set(CUSTOM_HEADER_DIR "sot/torque_control")
2727set (CXX_DISABLE_WERROR TRUE )
2828set (DOXYGEN_USE_MATHJAX YES )
2929
30+ # Check if the submodule cmake have been initialized
31+ set (JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR} /cmake" )
32+ if (NOT EXISTS "${CMAKE_SOURCE_DIR} /cmake/base.cmake" )
33+ if (${CMAKE_VERSION} VERSION_LESS "3.14.0" )
34+ message (
35+ FATAL_ERROR
36+ "\n Please run the following command first:\n git submodule update --init\n "
37+ )
38+ else ()
39+ message (STATUS "JRL cmakemodules not found. Let's fetch it." )
40+ include (FetchContent)
41+ FetchContent_Declare(
42+ "jrl-cmakemodules"
43+ GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git" )
44+ FetchContent_MakeAvailable("jrl-cmakemodules" )
45+ FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES)
46+ endif ()
47+ endif ()
48+
3049# JRL-cmakemodule setup
31- include (cmake /base.cmake)
32- include (cmake /boost.cmake)
50+ include (" ${JRL_CMAKE_MODULES} /base.cmake" )
51+ include (" ${JRL_CMAKE_MODULES} /boost.cmake" )
3352
3453# Project definition
3554compute_project_args(PROJECT_ARGS LANGUAGES CXX)
3655project (${PROJECT_NAME} ${PROJECT_ARGS} )
56+ check_minimal_cxx_standard(14 ENFORCE)
3757
3858if (INITIALIZE_WITH_NAN)
3959 message (STATUS "Initialize with NaN all the Eigen entries." )
@@ -63,6 +83,8 @@ if(Boost_VERSION GREATER 107299)
6383 add_definitions (-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
6484endif ()
6585
86+ include ("${JRL_CMAKE_MODULES} /python.cmake" )
87+
6688# Main Library
6789set (${PROJECT_NAME} _HEADERS
6890 include /${CUSTOM_HEADER_DIR} /joint-torque-controller.hh
0 commit comments