Skip to content

Commit 8592f11

Browse files
authored
Move submodules to third_party folder (#119)
1 parent 8dd6e94 commit 8592f11

File tree

16 files changed

+56
-49
lines changed

16 files changed

+56
-49
lines changed

.gitmodules

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
[submodule "flatbuffers"]
2-
path = flatbuffers
2+
path = third_party/flatbuffers
33
url = https://github.com/google/flatbuffers.git
44
[submodule "spdlog"]
5-
path = spdlog
5+
path = third_party/spdlog
66
url = https://github.com/gabime/spdlog.git
77
[submodule "cpputest"]
8-
path = cpputest
8+
path = third_party/cpputest
99
url = https://github.com/cpputest/cpputest.git
1010
[submodule "fmt"]
11-
path = fmt
11+
path = third_party/fmt
1212
url = https://github.com/fmtlib/fmt.git
1313
[submodule "CLI11"]
14-
path = CLI11
14+
path = third_party/CLI11
1515
url = https://github.com/CLIUtils/CLI11.git
1616
[submodule "taskflow"]
17-
path = taskflow
17+
path = third_party/taskflow
1818
url = https://github.com/taskflow/taskflow.git
1919
[submodule "tiny-process-library"]
20-
path = tiny-process-library
20+
path = third_party/tiny-process-library
2121
url = https://gitlab.com/eidheim/tiny-process-library.git

CMakeLists.txt

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -69,53 +69,20 @@ include(cmake/tool/cppcheck.cmake)
6969
include(cmake/tool/doxygen.cmake)
7070

7171
# Libraries
72-
73-
# TODO, Update FLATBUFFERS option to conditionally compile FLATC
74-
75-
# Set flatbuffer specific options here
76-
set(FLATBUFFERS_BUILD_CPP17 ON CACHE BOOL "Flatbuffers C++17 support")
77-
set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "Flatbuffers build tests")
78-
set(FLATBUFFERS_BUILD_FLATC ${BUILDCC_FLATBUFFERS_FLATC} CACHE BOOL "Flatbuffers build flatc")
79-
set(FLATBUFFERS_BUILD_FLATHASH OFF CACHE BOOL "Flatbuffers build flathash")
80-
set(FLATBUFFERS_BUILD_FLATLIB OFF CACHE BOOL "Flatbuffers build flatlib")
81-
set(FLATBUFFERS_LIBCXX_WITH_CLANG OFF CACHE BOOL "Flatbuffers LIBCXX")
82-
set(FLATBUFFERS_INSTALL ON CACHE BOOL "Enable the installation of targets.")
83-
set(FLATBUFFERS_ENABLE_PCH ${BUILDCC_PRECOMPILE_HEADERS} CACHE BOOL "Flatbuffers PCH")
84-
add_subdirectory(flatbuffers)
8572
include(cmake/target/flatbuffers.cmake)
8673

87-
set(FMT_INSTALL ON CACHE BOOL "Fmt install")
88-
add_subdirectory(fmt)
89-
# TODO, Remove fmt library generation and install target
90-
# set_target_properties(fmt PROPERTIES EXCLUDE_FROM_ALL ON)
74+
include(cmake/target/fmt.cmake)
9175

92-
# set(SPDLOG_BUILD_SHARED ON CACHE BOOL "Spdlog built as dynamic library")
93-
set(SPDLOG_INSTALL ON CACHE BOOL "Spdlog install")
94-
set(SPDLOG_FMT_EXTERNAL OFF CACHE BOOL "Spdlog FMT external lib")
95-
set(SPDLOG_FMT_EXTERNAL_HO ON CACHE BOOL "Spdlog FMT header only external lib")
96-
set(SPDLOG_ENABLE_PCH ${BUILDCC_PRECOMPILE_HEADERS} CACHE BOOL "Spdlog PCH")
97-
add_subdirectory(spdlog)
98-
# TODO, Remove spdlog library generation and install target
99-
# set_target_properties(spdlog PROPERTIES EXCLUDE_FROM_ALL ON)
76+
include(cmake/target/spdlog.cmake)
10077

10178
include(cmake/target/cli11.cmake)
10279

103-
set(TF_BUILD_TESTS OFF CACHE BOOL "TF Tests")
104-
set(TF_BUILD_EXAMPLES OFF CACHE BOOL "TF Examples")
105-
add_subdirectory(taskflow)
80+
include(cmake/target/taskflow.cmake)
10681

107-
add_subdirectory(tiny-process-library)
10882
include(cmake/target/tpl.cmake)
10983

11084
if (${TESTING})
111-
set(C++11 ON CACHE BOOL "CppUTests C++11 support")
112-
set(CPPUTEST_FLAGS OFF CACHE BOOL "CppUTests Flags off")
113-
set(WERROR ON CACHE BOOL "CppUTests all errors")
114-
set(LONGLONG ON CACHE BOOL "CppUTests Long Long support")
115-
set(TESTS OFF CACHE BOOL "CppUTests tests off")
116-
set(TESTS_BUILD_DISCOVER OFF CACHE BOOL "CppUTests Tests discover")
117-
set(VERBOSE_CONFIG OFF CACHE BOOL "Config print to screen")
118-
add_subdirectory(cpputest)
85+
include(cmake/target/cpputest.cmake)
11986
endif()
12087

12188
# Coverage

cmake/target/cli11.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
add_subdirectory(CLI11)
1+
add_subdirectory(third_party/CLI11)
22
file(GLOB CLI_INCLUDE_HEADERS "${CLI11_SOURCE_DIR}/include/CLI/*.hpp")
33

44
if (${BUILDCC_INSTALL})

cmake/target/cpputest.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
set(C++11 ON CACHE BOOL "CppUTests C++11 support")
2+
set(CPPUTEST_FLAGS OFF CACHE BOOL "CppUTests Flags off")
3+
set(WERROR ON CACHE BOOL "CppUTests all errors")
4+
set(LONGLONG ON CACHE BOOL "CppUTests Long Long support")
5+
set(TESTS OFF CACHE BOOL "CppUTests tests off")
6+
set(TESTS_BUILD_DISCOVER OFF CACHE BOOL "CppUTests Tests discover")
7+
set(VERBOSE_CONFIG OFF CACHE BOOL "Config print to screen")
8+
add_subdirectory(third_party/cpputest)

cmake/target/flatbuffers.cmake

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
set(FBS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flatbuffers/include/flatbuffers")
1+
2+
# TODO, Update FLATBUFFERS option to conditionally compile FLATC
3+
4+
# Set flatbuffer specific options here
5+
set(FLATBUFFERS_BUILD_CPP17 ON CACHE BOOL "Flatbuffers C++17 support")
6+
set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "Flatbuffers build tests")
7+
set(FLATBUFFERS_BUILD_FLATC ${BUILDCC_FLATBUFFERS_FLATC} CACHE BOOL "Flatbuffers build flatc")
8+
set(FLATBUFFERS_BUILD_FLATHASH OFF CACHE BOOL "Flatbuffers build flathash")
9+
set(FLATBUFFERS_BUILD_FLATLIB OFF CACHE BOOL "Flatbuffers build flatlib")
10+
set(FLATBUFFERS_LIBCXX_WITH_CLANG OFF CACHE BOOL "Flatbuffers LIBCXX")
11+
set(FLATBUFFERS_INSTALL ON CACHE BOOL "Enable the installation of targets.")
12+
set(FLATBUFFERS_ENABLE_PCH ${BUILDCC_PRECOMPILE_HEADERS} CACHE BOOL "Flatbuffers PCH")
13+
add_subdirectory(third_party/flatbuffers)
14+
15+
set(FBS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/flatbuffers/include/flatbuffers")
16+
set(FBS_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/flatbuffers/include")
217
file(GLOB FLATBUFFERS_INCLUDE_HEADERS "${FBS_DIR}/*.h")
318
if(${BUILDCC_PRECOMPILE_HEADERS})
419
list(APPEND FLATBUFFERS_INCLUDE_HEADERS ${FBS_DIR}/pch/pch.h)
@@ -8,12 +23,12 @@ add_library(flatbuffers_header_only INTERFACE
823
${FLATBUFFERS_INCLUDE_HEADERS}
924
)
1025
target_include_directories(flatbuffers_header_only INTERFACE
11-
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/flatbuffers/include>
26+
$<BUILD_INTERFACE:${FBS_INCLUDE_DIR}>
1227
$<INSTALL_INTERFACE:include>
1328
)
1429

1530
if (${BUILDCC_INSTALL})
1631
install(TARGETS flatbuffers_header_only DESTINATION lib EXPORT flatbuffers_header_onlyConfig)
17-
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/flatbuffers/include/ DESTINATION "include")
32+
install(DIRECTORY ${FBS_INCLUDE_DIR} DESTINATION "include")
1833
install(EXPORT flatbuffers_header_onlyConfig DESTINATION "lib/cmake/flatbuffers_header_only")
1934
endif()

cmake/target/fmt.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set(FMT_INSTALL ON CACHE BOOL "Fmt install")
2+
add_subdirectory(third_party/fmt)
3+
# TODO, Remove fmt library generation and install target
4+
# set_target_properties(fmt PROPERTIES EXCLUDE_FROM_ALL ON)

cmake/target/spdlog.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# set(SPDLOG_BUILD_SHARED ON CACHE BOOL "Spdlog built as dynamic library")
2+
set(SPDLOG_INSTALL ON CACHE BOOL "Spdlog install")
3+
set(SPDLOG_FMT_EXTERNAL OFF CACHE BOOL "Spdlog FMT external lib")
4+
set(SPDLOG_FMT_EXTERNAL_HO ON CACHE BOOL "Spdlog FMT header only external lib")
5+
set(SPDLOG_ENABLE_PCH ${BUILDCC_PRECOMPILE_HEADERS} CACHE BOOL "Spdlog PCH")
6+
add_subdirectory(third_party/spdlog)
7+
# TODO, Remove spdlog library generation and install target
8+
# set_target_properties(spdlog PROPERTIES EXCLUDE_FROM_ALL ON)

cmake/target/taskflow.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set(TF_BUILD_TESTS OFF CACHE BOOL "TF Tests")
2+
set(TF_BUILD_EXAMPLES OFF CACHE BOOL "TF Examples")
3+
add_subdirectory(third_party/taskflow)

cmake/target/tpl.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
add_subdirectory(third_party/tiny-process-library)
2+
13
if (${BUILDCC_INSTALL})
24
install(TARGETS tiny-process-library
35
EXPORT tiny-process-library-config
@@ -11,5 +13,5 @@ if (${BUILDCC_INSTALL})
1113
DESTINATION lib/cmake/tiny-process-library
1214
)
1315

14-
install(FILES tiny-process-library/process.hpp DESTINATION include)
16+
install(FILES third_party/tiny-process-library/process.hpp DESTINATION include)
1517
endif()

0 commit comments

Comments
 (0)