Skip to content

Commit

Permalink
ci: remove conan install
Browse files Browse the repository at this point in the history
- Add prefix
- Add print libraries
  • Loading branch information
spjuanjoc committed Apr 17, 2024
1 parent dc575f1 commit 132ad27
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ jobs:
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Install third-party packages
shell: bash
working-directory: ${{runner.workspace}}/build
run: conan install $GITHUB_WORKSPACE

- name: CMake Configure
working-directory: ${{runner.workspace}}/build
env:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ conan_cmake_run(CONANFILE conanfile.txt

## Find third-party packages
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_BINARY_DIR})
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${CMAKE_BINARY_DIR})
find_package(fmt REQUIRED)


## Target
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
target_include_directories(${PROJECT_NAME} PRIVATE include)
target_link_libraries(${PROJECT_NAME} PRIVATE fmt::fmt)
#target_sources(${PROJECT_NAME} ${SOURCES})
Expand Down
12 changes: 10 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@ set_compiler_options(${TEST_NAME})

## Find third-party packages
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_BINARY_DIR})
find_package(fmt REQUIRED)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${CMAKE_BINARY_DIR})
find_package(Catch2 REQUIRED)
find_package(fmt REQUIRED)


message(STATUS "catch2_LIBRARIES: ${catch2_LIBRARIES}")

## Target
target_link_libraries(${TEST_NAME} PRIVATE ${PROJECT_NAME} ${catch2_LIBRARIES} ${fmt_LIBRARIES})
target_link_libraries(${TEST_NAME}
PRIVATE
${PROJECT_NAME}
${catch2_LIBRARIES}
${fmt_LIBRARIES}
)

target_include_directories(${TEST_NAME}
PRIVATE
Expand Down

0 comments on commit 132ad27

Please sign in to comment.