@@ -34,22 +34,13 @@ endif ()
34
34
35
35
set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
36
36
37
- include (CheckCXXCompilerFlag)
38
- include (cmake/toolchain-util.cmake)
39
- include (cmake/dependencies.cmake)
40
- include (cmake/functions.cmake)
41
- include (cmake/san.cmake)
42
-
43
37
# export compile commands for clang-tidy to analyse only changed files
44
38
set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
45
39
46
- print("C flags: ${CMAKE_C_FLAGS} " )
47
- print("CXX flags: ${CMAKE_CXX_FLAGS} " )
48
- print("Using CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} " )
49
-
50
40
option (TESTING "Build tests" ON )
51
41
option (TESTING_PROOFS "Build proofs tests" OFF )
52
42
option (TESTING_ACTORS "Build actors tests" OFF )
43
+ option (BUILD_INTERNAL_DEPS "Build internal dependencies from git submodules" ON )
53
44
option (CLANG_FORMAT "Enable clang-format target" ON )
54
45
option (CLANG_TIDY "Enable clang-tidy checks during compilation" OFF )
55
46
option (COVERAGE "Enable generation of coverage info" OFF )
@@ -60,6 +51,15 @@ option(MSAN "Enable memory sanitizer" OFF)
60
51
option (TSAN "Enable thread sanitizer" OFF )
61
52
option (UBSAN "Enable UB sanitizer" OFF )
62
53
54
+ include (CheckCXXCompilerFlag)
55
+ include (cmake/toolchain-util.cmake)
56
+ include (cmake/dependencies.cmake)
57
+ include (cmake/functions.cmake)
58
+ include (cmake/san.cmake)
59
+
60
+ print("C flags: ${CMAKE_C_FLAGS} " )
61
+ print("CXX flags: ${CMAKE_CXX_FLAGS} " )
62
+ print("Using CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} " )
63
63
64
64
## setup compilation flags
65
65
if ("${CMAKE_CXX_COMPILER_ID} " MATCHES "^(AppleClang|Clang|GNU)$" )
@@ -103,20 +103,24 @@ if (CLANG_FORMAT)
103
103
include (cmake/clang-format.cmake)
104
104
endif ()
105
105
106
- add_subdirectory (deps)
106
+ if (BUILD_INTERNAL_DEPS)
107
+ add_subdirectory (deps)
108
+ endif ()
107
109
108
110
include_directories (
109
111
# project includes
110
112
${PROJECT_SOURCE_DIR} /core
111
113
${PROJECT_SOURCE_DIR} /libs
112
114
)
113
115
114
- include_directories (
115
- SYSTEM
116
- # system includes
117
- deps/indicators/include
118
- deps/libsecp256k1/include
119
- )
116
+ if (BUILD_INTERNAL_DEPS)
117
+ include_directories (
118
+ SYSTEM
119
+ # system includes
120
+ deps/indicators/include
121
+ deps/libsecp256k1/include
122
+ )
123
+ endif ()
120
124
121
125
add_subdirectory (libs)
122
126
add_subdirectory (core)
0 commit comments