diff --git a/.gitmodules b/.gitmodules index a74f4d3..586db29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "external/pybind11"] path = external/pybind11 url = https://github.com/pybind/pybind11 +[submodule "external/libcatalogs"] + path = external/libcatalogs + url = https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/SciQLOP_Repos/libcatalogs diff --git a/CMakeLists.txt b/CMakeLists.txt index 5398b04..1cdf32f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ OPTION (CPPCHECK "Analyzes the source code with cppcheck" OFF) OPTION (CLANG_TIDY "Analyzes the source code with Clang Tidy" OFF) OPTION (IWYU "Analyzes the source code with Include What You Use" OFF) -OPTION (Catalog "builds catalog API" OFF) +OPTION (Catalog "builds catalog API" ON) set(CMAKE_CXX_STANDARD 17) @@ -27,6 +27,13 @@ if (NOT pybind11_FOUND) add_subdirectory(external/pybind11) endif() +find_package(catalogs CONFIG QUIET) +if (NOT CatalogueAPI_FOUND) + execute_process(COMMAND git submodule init external/libcatalogs WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + execute_process(COMMAND git submodule update external/libcatalogs WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + add_subdirectory(external/libcatalogs) +endif() + macro(declare_test testname testexe sources libraries) add_executable(${testexe} ${sources}) target_link_libraries(${testexe} ${libraries}) diff --git a/external/libcatalogs b/external/libcatalogs new file mode 160000 index 0000000..f2fa281 --- /dev/null +++ b/external/libcatalogs @@ -0,0 +1 @@ +Subproject commit f2fa281306099e7136a288dd70fd97d0e33afa15