Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boost / fmt / expected as system dependency and not submodule #2

Merged
merged 14 commits into from
Aug 16, 2022
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
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ CheckOptions:
- {key: readability-identifier-naming.StaticConstantCase, value: CamelCase}
- {key: readability-identifier-naming.StaticConstantPrefix, value: k}
- {key: readability-identifier-naming.TemplateParameterCase, value: CamelCase}
- {key: readability-identifier-naming.TemplateParameterCase, value: k}
- {key: readability-identifier-naming.TemplateParameterPrefix, value: k}

- {key: readability-identifier-naming.GlobalVariableCase, value: Camel_Snake_Case}
- {key: readability-identifier-naming.StaticVariableCase, value: Camel_Snake_Case}
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,25 @@ jobs:
uses: hendrikmuhs/ccache-action@v1

- name: install deps
run: sudo apt-get install libgtest-dev clang-tidy-10 -y
run: |
sudo apt-get install libgtest-dev clang-tidy-10 libboost-all-dev -y
git clone https://github.com/fmtlib/fmt.git
cd fmt
git checkout 8.1.1
mkdir build
cd build
cmake .. -DFMT_TEST=OFF -DBUILD_SHARED_LIBS=ON
make -j8
sudo make install
cd ../..
git clone https://github.com/TartanLlama/expected.git
cd expected
git checkout 96d547c03d2feab8db64c53c3744a9b4a7c8f2c5
mkdir build
cd build
cmake ..
sudo make install
cd ../..

- name: clang-tidy
run: ./farm_ng_tidy.sh
Expand Down
9 changes: 0 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +0,0 @@
[submodule "thirdparty/preprocessor"]
path = thirdparty/preprocessor
url = https://github.com/boostorg/preprocessor
[submodule "thirdparty/fmt"]
path = thirdparty/fmt
url = git@github.com:fmtlib/fmt.git
[submodule "thirdparty/expected"]
path = thirdparty/expected
url = git@github.com:TartanLlama/expected.git
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ set(CMAKE_CXX_FLAGS "")

set(EXPECTED_BUILD_TESTS FALSE)

add_subdirectory(thirdparty/preprocessor)
add_subdirectory(thirdparty/expected)
add_subdirectory(thirdparty/fmt)
find_package(fmt REQUIRED)
find_package(Boost 1.71.0 REQUIRED system)

add_subdirectory(farm_ng_core)
2 changes: 1 addition & 1 deletion farm_ng_core/enum/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (FARM_NG_CORE_TESTS)
foreach(test_basename ${FNG_ENUM_TESTS})
farm_ng_core_add_test(${test_basename}
PARENT_LIBRARY farm_ng_core_enum
LINK_LIBRARIES farm_ng_core_logging
LINK_LIBRARIES farmngcore_logging
LABELS small)
endforeach()
endif()
13 changes: 6 additions & 7 deletions farm_ng_core/logging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,25 @@ set(base_logging_src_prefixes
format
logger)

add_library(farm_ng_core_logging INTERFACE
add_library(farmngcore_logging INTERFACE
expected.h
format.h
logger.h)

target_link_libraries(farm_ng_core_logging INTERFACE
boost_preprocessor
expected
fmt::fmt-header-only
target_link_libraries(farmngcore_logging INTERFACE
Boost::system
fmt::fmt
pthread
)

target_include_directories(farm_ng_core_logging INTERFACE
target_include_directories(farmngcore_logging INTERFACE
../..
)

if (FARM_NG_CORE_TESTS)
foreach(test_basename ${base_logging_src_prefixes})
farm_ng_core_add_test(${test_basename}
PARENT_LIBRARY farm_ng_core_logging
PARENT_LIBRARY farmngcore_logging
LINK_LIBRARIES
LABELS small)
endforeach()
Expand Down
10 changes: 5 additions & 5 deletions farm_ng_core/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(base_enum_src_prefixes erase
uri)


add_library(farm_ng_core_utils INTERFACE
add_library(farmngcore_utils INTERFACE
erase.h
filesystem.h
stopwatch.h
Expand All @@ -24,19 +24,19 @@ add_library(farm_ng_core_utils INTERFACE
variant_utils.h
void.h)

target_link_libraries(farm_ng_core_utils INTERFACE
farm_ng_core_enum farm_ng_core_logging
target_link_libraries(farmngcore_utils INTERFACE
farm_ng_core_enum farmngcore_logging
)

target_include_directories(farm_ng_core_utils INTERFACE
target_include_directories(farmngcore_utils INTERFACE
../..
)


if (FARM_NG_CORE_TESTS)
foreach(test_basename ${base_enum_src_prefixes})
farm_ng_core_add_test(${test_basename}
PARENT_LIBRARY farm_ng_core_utils
PARENT_LIBRARY farmngcore_utils
LABELS small)
endforeach()
endif()
2 changes: 1 addition & 1 deletion farm_ng_core/utils/uri.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct Uri {
Uri(const UriSchemeType& scheme,
const std::string& authority,
const std::string& path,
const std::string& query)
const std::string& query = "")
: scheme(scheme), authority(authority), path(path), query(query) {}

/// Returns string representation of uri.
Expand Down
1 change: 0 additions & 1 deletion thirdparty/expected
Submodule expected deleted from 96d547
1 change: 0 additions & 1 deletion thirdparty/fmt
Submodule fmt deleted from b6f4ce
1 change: 0 additions & 1 deletion thirdparty/preprocessor
Submodule preprocessor deleted from 69614b