Skip to content

Commit

Permalink
Fix triplet
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane Gouache committed Apr 17, 2024
1 parent da5bcbc commit 696e1e4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/hosted-pure-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: windows-latest
triplet: x64-windows
triplet: x64-windows-static
- os: ubuntu-latest
triplet: x64-linux
- os: macos-latest
Expand All @@ -45,6 +45,9 @@ jobs:
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg/bincache
# Let's use GitHub Action cache as storage for the vcpkg Binary Caching feature.
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
# Allow setting triplet to something else than platform's default
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}


steps:
# Set env vars needed for vcpkg to leverage the GitHub Action cache as a storage
Expand Down
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# CMakeLists.txt

# Ensure to pick up the default triplet from the environment if any. This helps
# driving the vcpkg triplet in the same way either when starting vcpkg directly,
# or when letting CMake start vcpkg at configure/generate time.
# Note: this logic must happen before PROJECT command.
if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET)
set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "The vcpkg triplet")
endif()

cmake_minimum_required(VERSION 3.20)
project(khiops-gcs)

Expand All @@ -10,4 +19,6 @@ find_package(spdlog REQUIRED)
add_library(khiopsdriver_file_gcs SHARED src/gcsplugin.cpp)
add_executable(KhiopsPluginTest src/main.cpp)

target_link_libraries(khiopsdriver_file_gcs PRIVATE google-cloud-cpp::storage PRIVATE spdlog::spdlog)
target_link_libraries(khiopsdriver_file_gcs
PRIVATE google-cloud-cpp::storage
PRIVATE spdlog::spdlog)

0 comments on commit 696e1e4

Please sign in to comment.