Skip to content

Commit

Permalink
Fix gcc ?
Browse files Browse the repository at this point in the history
  • Loading branch information
sguionni committed Oct 25, 2023
1 parent ce6c883 commit facf184
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake_util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Configure packages
working-directory: ${{env.CMAKELISTS_DIR}}
run: conan editable add .

- name: Build
working-directory: ${{env.CMAKELISTS_DIR}}
run: conan build test --build=missing --build=editable --settings=compiler.cppstd=20
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
**/build/
**/.vs/
**/.vscode/
**/Testing/
/data/
/external_project/
/RELEASE/
/.vscode/
*.code-workspace
**/out/
**/CMakePresets.json
**/CMakeUserPresets.json
**/CMakeSettings.json
26 changes: 11 additions & 15 deletions lib/util/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
message("VTX_UTIL")
message("vtx_util")
cmake_minimum_required(VERSION 3.23)
#include(cmake/configure-target.cmake)
project(VTX_UTIL)
project(vtx_util)

# Find packages.
find_package(glm REQUIRED)
find_package(spdlog REQUIRED)
find_package(nlohmann_json REQUIRED)
Expand All @@ -14,17 +13,14 @@ find_package(asio REQUIRED)
file(GLOB_RECURSE HEADERS include/*)
file(GLOB_RECURSE SOURCES src/*)

# Create library.
add_library(VTX_UTIL ${HEADERS} ${SOURCES})
#configureTarget(VTX_UTIL)
target_include_directories(VTX_UTIL PUBLIC include)
add_library(vtx_util ${HEADERS} ${SOURCES})
#configureTarget(vtx_util)
target_include_directories(vtx_util PUBLIC include)

# Link third parties.
target_link_libraries(VTX_UTIL PRIVATE glm::glm)
target_link_libraries(VTX_UTIL PRIVATE spdlog::spdlog)
target_link_libraries(VTX_UTIL PRIVATE nlohmann_json::nlohmann_json)
target_link_libraries(VTX_UTIL PRIVATE magic_enum::magic_enum)
target_link_libraries(VTX_UTIL PRIVATE asio::asio)
target_link_libraries(vtx_util PRIVATE glm::glm)
target_link_libraries(vtx_util PRIVATE spdlog::spdlog)
target_link_libraries(vtx_util PRIVATE nlohmann_json::nlohmann_json)
target_link_libraries(vtx_util PRIVATE magic_enum::magic_enum)
target_link_libraries(vtx_util PRIVATE asio::asio)

# Install.
install(TARGETS VTX_UTIL)
install(TARGETS vtx_util)
27 changes: 9 additions & 18 deletions lib/util/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
message("VTX_UTIL_TEST")
message("vtx_util_test")
cmake_minimum_required(VERSION 3.23)

project(VTX_UTIL_TEST)
project(vtx_util_test)

# Find packages.
find_package(VTX_UTIL CONFIG REQUIRED)
find_package(vtx_util CONFIG REQUIRED)
find_package(Catch2 REQUIRED)

# Catch2 configuration.
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
include(Catch)

# Create executable.
add_executable(VTX_UTIL_TEST src/main.cpp)
#configureTarget(VTX_UTIL_TEST)
add_executable(vtx_util_test src/main.cpp)
#configureTarget(vtx_util_test)

# Link third parties.
target_link_libraries(VTX_UTIL_TEST PRIVATE Catch2::Catch2WithMain)
target_link_libraries(VTX_UTIL_TEST PRIVATE vtx_util::vtx_util)
target_link_libraries(vtx_util_test PRIVATE vtx_util::vtx_util)
target_link_libraries(vtx_util_test PRIVATE Catch2::Catch2WithMain)

# Catch2.
include(CTest)
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
catch_discover_tests(VTX_UTIL_TEST)
endif()
include(Catch)
catch_discover_tests(vtx_util_test)

0 comments on commit facf184

Please sign in to comment.