Skip to content

Commit 2654e41

Browse files
committed
CMake: Allow excluding git submodule depends
Not every build system can handle git submodules, so expose an option to exclude these dependencies from the build
1 parent 3dc68bd commit 2654e41

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

CMakeLists.txt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
4040

4141
option(TESTING "Build tests" ON)
4242
option(TESTING_PROOFS "Build proofs tests" OFF)
43+
option(BUILD_INTERNAL_DEPS "Build internal dependencies from git submodules" ON)
4344
option(CLANG_FORMAT "Enable clang-format target" ON)
4445
option(CLANG_TIDY "Enable clang-tidy checks during compilation" OFF)
4546
option(COVERAGE "Enable generation of coverage info" OFF)
@@ -102,19 +103,23 @@ if (CLANG_FORMAT)
102103
include(cmake/clang-format.cmake)
103104
endif ()
104105

105-
add_subdirectory(deps)
106+
if (BUILD_INTERNAL_DEPS)
107+
add_subdirectory(deps)
108+
endif()
106109

107110
include_directories(
108111
# project includes
109112
${PROJECT_SOURCE_DIR}/core
110113
)
111114

112-
include_directories(
113-
SYSTEM
114-
# system includes
115-
deps/outcome
116-
${TINY_CBOR_INCLUDE_DIRS}
117-
)
115+
if (BUILD_INTERNAL_DEPS)
116+
include_directories(
117+
SYSTEM
118+
# system includes
119+
deps/outcome
120+
${TINY_CBOR_INCLUDE_DIRS}
121+
)
122+
endif()
118123

119124
add_subdirectory(core)
120125

0 commit comments

Comments
 (0)