Skip to content

Commit

Permalink
Migrate to Conan 2 [skip appveyor]
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeu committed Nov 24, 2024
1 parent cc974e3 commit db33df5
Show file tree
Hide file tree
Showing 11 changed files with 729 additions and 1,065 deletions.
2 changes: 1 addition & 1 deletion .ci/travis_before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [[ "$COVERITY_SCAN_BRANCH" != 1 ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]] && [
fi

if [[ "${USE_CONAN:-no}" == "yes" ]]; then
pip3 install --user "conan>=1.60.2,<2"
pip3 install --user "conan>=2.9.3,<3"
fi

if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$HOMEBREW_DEPLOY" == "yes" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
if [ "${{ matrix.os }}" == "macos-latest" ]; then
echo "/Users/runner/Library/Python/${{ matrix.python-version }}/bin" >> $GITHUB_PATH
fi
pip install --disable-pip-version-check --user "conan>=1.62.0,<2"
pip install --disable-pip-version-check --user "conan>=2.9.3,<3"
- name: Configure (${{ matrix.configuration }})
run: |
if [ "${{ matrix.os }}" == "macos-latest" ]; then
Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
include(GNUInstallDirs)

include(cmake/options.cmake)
include(cmake/conan.cmake)

if(MATIO_USE_CONAN)
# Enable code injection to run for conan
set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES "cmake/conan_provider.cmake")
endif()

include(cmake/thirdParties.cmake)
include(cmake/staticAnalyzers.cmake)
include(cmake/compilerOptions.cmake)
Expand Down
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ VS_FILES = visual_studio/libmatio/libmatio.vcproj \
visual_studio/stdint_msvc.h

CMAKE_FILES = CMakeLists.txt \
conanfile.py \
cmake/compilerOptions.cmake \
cmake/conan.cmake \
cmake/conan_provider.cmake \
cmake/getopt.cmake \
cmake/options.cmake \
cmake/src.cmake \
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Table of Contents

* 'MATIO_USE_CONAN:BOOL=OFF'
This option enables the Conan package manager to resolve the
library dependencies. Only Conan 1.x is supported.
library dependencies. Only Conan 2.x is supported.
* 'MATIO_DEFAULT_FILE_VERSION:STRING=5'
This option sets the default MAT file version (4,5,7.3) that
will be used when writing.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ cmake --install .
The following matio specific options for building with CMake are available.

* `MATIO_USE_CONAN:BOOL=OFF`
This option enables the Conan package manager to resolve the library dependencies. Only Conan 1.x is supported.
This option enables the Conan package manager to resolve the library dependencies. Only Conan 2.x is supported.
* `MATIO_DEFAULT_FILE_VERSION:STRING=5`
This option sets the default MAT file version (4,5,7.3) that will be used when writing.
* `MATIO_EXTENDED_SPARSE:BOOL=ON`
Expand Down
Loading

0 comments on commit db33df5

Please sign in to comment.