Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[submodule "flatbuffers"]
path = flatbuffers
path = third_party/flatbuffers
url = https://github.com/google/flatbuffers.git
[submodule "spdlog"]
path = spdlog
path = third_party/spdlog
url = https://github.com/gabime/spdlog.git
[submodule "cpputest"]
path = cpputest
path = third_party/cpputest
url = https://github.com/cpputest/cpputest.git
[submodule "fmt"]
path = fmt
path = third_party/fmt
url = https://github.com/fmtlib/fmt.git
[submodule "CLI11"]
path = CLI11
path = third_party/CLI11
url = https://github.com/CLIUtils/CLI11.git
[submodule "taskflow"]
path = taskflow
path = third_party/taskflow
url = https://github.com/taskflow/taskflow.git
[submodule "tiny-process-library"]
path = tiny-process-library
path = third_party/tiny-process-library
url = https://gitlab.com/eidheim/tiny-process-library.git
41 changes: 4 additions & 37 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,53 +69,20 @@ include(cmake/tool/cppcheck.cmake)
include(cmake/tool/doxygen.cmake)

# Libraries

# TODO, Update FLATBUFFERS option to conditionally compile FLATC

# Set flatbuffer specific options here
set(FLATBUFFERS_BUILD_CPP17 ON CACHE BOOL "Flatbuffers C++17 support")
set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "Flatbuffers build tests")
set(FLATBUFFERS_BUILD_FLATC ${BUILDCC_FLATBUFFERS_FLATC} CACHE BOOL "Flatbuffers build flatc")
set(FLATBUFFERS_BUILD_FLATHASH OFF CACHE BOOL "Flatbuffers build flathash")
set(FLATBUFFERS_BUILD_FLATLIB OFF CACHE BOOL "Flatbuffers build flatlib")
set(FLATBUFFERS_LIBCXX_WITH_CLANG OFF CACHE BOOL "Flatbuffers LIBCXX")
set(FLATBUFFERS_INSTALL ON CACHE BOOL "Enable the installation of targets.")
set(FLATBUFFERS_ENABLE_PCH ${BUILDCC_PRECOMPILE_HEADERS} CACHE BOOL "Flatbuffers PCH")
add_subdirectory(flatbuffers)
include(cmake/target/flatbuffers.cmake)

set(FMT_INSTALL ON CACHE BOOL "Fmt install")
add_subdirectory(fmt)
# TODO, Remove fmt library generation and install target
# set_target_properties(fmt PROPERTIES EXCLUDE_FROM_ALL ON)
include(cmake/target/fmt.cmake)

# set(SPDLOG_BUILD_SHARED ON CACHE BOOL "Spdlog built as dynamic library")
set(SPDLOG_INSTALL ON CACHE BOOL "Spdlog install")
set(SPDLOG_FMT_EXTERNAL OFF CACHE BOOL "Spdlog FMT external lib")
set(SPDLOG_FMT_EXTERNAL_HO ON CACHE BOOL "Spdlog FMT header only external lib")
set(SPDLOG_ENABLE_PCH ${BUILDCC_PRECOMPILE_HEADERS} CACHE BOOL "Spdlog PCH")
add_subdirectory(spdlog)
# TODO, Remove spdlog library generation and install target
# set_target_properties(spdlog PROPERTIES EXCLUDE_FROM_ALL ON)
include(cmake/target/spdlog.cmake)

include(cmake/target/cli11.cmake)

set(TF_BUILD_TESTS OFF CACHE BOOL "TF Tests")
set(TF_BUILD_EXAMPLES OFF CACHE BOOL "TF Examples")
add_subdirectory(taskflow)
include(cmake/target/taskflow.cmake)

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

if (${TESTING})
set(C++11 ON CACHE BOOL "CppUTests C++11 support")
set(CPPUTEST_FLAGS OFF CACHE BOOL "CppUTests Flags off")
set(WERROR ON CACHE BOOL "CppUTests all errors")
set(LONGLONG ON CACHE BOOL "CppUTests Long Long support")
set(TESTS OFF CACHE BOOL "CppUTests tests off")
set(TESTS_BUILD_DISCOVER OFF CACHE BOOL "CppUTests Tests discover")
set(VERBOSE_CONFIG OFF CACHE BOOL "Config print to screen")
add_subdirectory(cpputest)
include(cmake/target/cpputest.cmake)
endif()

# Coverage
Expand Down
2 changes: 1 addition & 1 deletion cmake/target/cli11.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_subdirectory(CLI11)
add_subdirectory(third_party/CLI11)
file(GLOB CLI_INCLUDE_HEADERS "${CLI11_SOURCE_DIR}/include/CLI/*.hpp")

if (${BUILDCC_INSTALL})
Expand Down
8 changes: 8 additions & 0 deletions cmake/target/cpputest.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set(C++11 ON CACHE BOOL "CppUTests C++11 support")
set(CPPUTEST_FLAGS OFF CACHE BOOL "CppUTests Flags off")
set(WERROR ON CACHE BOOL "CppUTests all errors")
set(LONGLONG ON CACHE BOOL "CppUTests Long Long support")
set(TESTS OFF CACHE BOOL "CppUTests tests off")
set(TESTS_BUILD_DISCOVER OFF CACHE BOOL "CppUTests Tests discover")
set(VERBOSE_CONFIG OFF CACHE BOOL "Config print to screen")
add_subdirectory(third_party/cpputest)
21 changes: 18 additions & 3 deletions cmake/target/flatbuffers.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
set(FBS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flatbuffers/include/flatbuffers")

# TODO, Update FLATBUFFERS option to conditionally compile FLATC

# Set flatbuffer specific options here
set(FLATBUFFERS_BUILD_CPP17 ON CACHE BOOL "Flatbuffers C++17 support")
set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "Flatbuffers build tests")
set(FLATBUFFERS_BUILD_FLATC ${BUILDCC_FLATBUFFERS_FLATC} CACHE BOOL "Flatbuffers build flatc")
set(FLATBUFFERS_BUILD_FLATHASH OFF CACHE BOOL "Flatbuffers build flathash")
set(FLATBUFFERS_BUILD_FLATLIB OFF CACHE BOOL "Flatbuffers build flatlib")
set(FLATBUFFERS_LIBCXX_WITH_CLANG OFF CACHE BOOL "Flatbuffers LIBCXX")
set(FLATBUFFERS_INSTALL ON CACHE BOOL "Enable the installation of targets.")
set(FLATBUFFERS_ENABLE_PCH ${BUILDCC_PRECOMPILE_HEADERS} CACHE BOOL "Flatbuffers PCH")
add_subdirectory(third_party/flatbuffers)

set(FBS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/flatbuffers/include/flatbuffers")
set(FBS_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/flatbuffers/include")
file(GLOB FLATBUFFERS_INCLUDE_HEADERS "${FBS_DIR}/*.h")
if(${BUILDCC_PRECOMPILE_HEADERS})
list(APPEND FLATBUFFERS_INCLUDE_HEADERS ${FBS_DIR}/pch/pch.h)
Expand All @@ -8,12 +23,12 @@ add_library(flatbuffers_header_only INTERFACE
${FLATBUFFERS_INCLUDE_HEADERS}
)
target_include_directories(flatbuffers_header_only INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/flatbuffers/include>
$<BUILD_INTERFACE:${FBS_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>
)

if (${BUILDCC_INSTALL})
install(TARGETS flatbuffers_header_only DESTINATION lib EXPORT flatbuffers_header_onlyConfig)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/flatbuffers/include/ DESTINATION "include")
install(DIRECTORY ${FBS_INCLUDE_DIR} DESTINATION "include")
install(EXPORT flatbuffers_header_onlyConfig DESTINATION "lib/cmake/flatbuffers_header_only")
endif()
4 changes: 4 additions & 0 deletions cmake/target/fmt.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(FMT_INSTALL ON CACHE BOOL "Fmt install")
add_subdirectory(third_party/fmt)
# TODO, Remove fmt library generation and install target
# set_target_properties(fmt PROPERTIES EXCLUDE_FROM_ALL ON)
8 changes: 8 additions & 0 deletions cmake/target/spdlog.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# set(SPDLOG_BUILD_SHARED ON CACHE BOOL "Spdlog built as dynamic library")
set(SPDLOG_INSTALL ON CACHE BOOL "Spdlog install")
set(SPDLOG_FMT_EXTERNAL OFF CACHE BOOL "Spdlog FMT external lib")
set(SPDLOG_FMT_EXTERNAL_HO ON CACHE BOOL "Spdlog FMT header only external lib")
set(SPDLOG_ENABLE_PCH ${BUILDCC_PRECOMPILE_HEADERS} CACHE BOOL "Spdlog PCH")
add_subdirectory(third_party/spdlog)
# TODO, Remove spdlog library generation and install target
# set_target_properties(spdlog PROPERTIES EXCLUDE_FROM_ALL ON)
3 changes: 3 additions & 0 deletions cmake/target/taskflow.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(TF_BUILD_TESTS OFF CACHE BOOL "TF Tests")
set(TF_BUILD_EXAMPLES OFF CACHE BOOL "TF Examples")
add_subdirectory(third_party/taskflow)
4 changes: 3 additions & 1 deletion cmake/target/tpl.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
add_subdirectory(third_party/tiny-process-library)

if (${BUILDCC_INSTALL})
install(TARGETS tiny-process-library
EXPORT tiny-process-library-config
Expand All @@ -11,5 +13,5 @@ if (${BUILDCC_INSTALL})
DESTINATION lib/cmake/tiny-process-library
)

install(FILES tiny-process-library/process.hpp DESTINATION include)
install(FILES third_party/tiny-process-library/process.hpp DESTINATION include)
endif()