diff --git a/ci/install.sh b/ci/install.sh index 9d249af7..05224406 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -34,14 +34,9 @@ pip install conan==1.11.2 pip install codecov conan --version conan config set storage.path=~/conanData -conan remote add conan-bincrafters https://api.bintray.com/conan/bincrafters/public-conan - -mkdir -p ~/.conan/profiles +conan profile new default --detect if [[ "$(uname -s)" == 'Linux' ]]; then - CC_VER=$(${CC} --version | head -1 | awk '{print $3}'| awk -F'.' '{ print $1"."$2 }') - printf "[settings]\nos=Linux\narch=x86_64\ncompiler=$CC\ncompiler.version=$CC_VER\ncompiler.libcxx=libstdc++\nbuild_type=Release\n" > ~/.conan/profiles/release -else - printf "[settings]\nos=Macos\narch=x86_64\ncompiler=apple-clang\ncompiler.version=9.0\ncompiler.libcxx=libc++\nbuild_type=Release\n" > ~/.conan/profiles/release + conan profile update settings.compiler.libcxx=libstdc++11 default fi diff --git a/ci/run.sh b/ci/run.sh index 69219119..4b07c7e6 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -25,7 +25,7 @@ fi mkdir build && cd build -conan install .. -o webready=True --build missing --profile release +conan install .. -o webready=True --build missing cmake ${CMAKE_OPTIONS} -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DCMAKE_INSTALL_PREFIX=install .. make -j2 diff --git a/conanfile.py b/conanfile.py index 604861d5..bf67befd 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,5 +1,6 @@ from conans import ConanFile from conans.tools import os_info +from conans.model.version import Version class Exiv2Conan(ConanFile): settings = 'os', 'compiler', 'build_type', 'arch' @@ -27,7 +28,10 @@ class Exiv2Conan(ConanFile): self.requires('libiconv/1.15@bincrafters/stable') if self.options.unitTests: - self.requires('gtest/1.8.0@bincrafters/stable') + if self.settings.compiler == "Visual Studio" and Version(self.settings.compiler.version.value) <= "12": + self.requires('gtest/1.8.0@bincrafters/stable') + else: + self.requires('gtest/1.8.1@bincrafters/stable') if self.options.webready and not os_info.is_macos: self.requires('libcurl/7.61.1@bincrafters/stable')