Skip to content

Commit

Permalink
Merge pull request #1704 from kerautret/fixConan
Browse files Browse the repository at this point in the history
Fix cmake conan download issue
  • Loading branch information
dcoeurjo authored Oct 21, 2023
2 parents ad47648 + 788b98f commit 8221544
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
- [ ] Documentation module page added or updated.
- [ ] New entry in the [ChangeLog.md](https://github.com/DGtal-team/DGtal/blob/master/ChangeLog.md) added.
- [ ] No warning raised in Debug mode.
- [ ] All continuous integration tests pass (Github Actions & appveyor)
- [ ] All continuous integration tests pass (Github Actions)
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

## Bug fixes
- *General*
- Fix conan file upload issue and log message. (Bertrand Kerautret,
[#1704](https://github.com/DGtal-team/DGtal/pull/1704))
- Fix of couple of doxygen warnings that cause errors on Github Actions
CI bots. (David Coeurjolly, [#1672](https://github.com/DGtal-team/DGtal/pull/1672))
- Removing "WITH_BENCHMARK" option as Google Benchmark is already included when building
Expand Down
25 changes: 23 additions & 2 deletions cmake/CheckDGtalDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,31 @@ if (ENABLE_CONAN)
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake"
TLS_VERIFY ON)
STATUS DOWNLOAD_STATUS
TLS_VERIFY ON)
list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
list(GET DOWNLOAD_STATUS 1 ERROR_MESSAGE)
# Check if download was successful.
if(${STATUS_CODE} EQUAL 0)
message(STATUS "Download completed successfully!")
else()
message(STATUS "Error occurred during download: ${ERROR_MESSAGE}")
message(STATUS "Trying turning TLS_VERIFY OFF")
file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake"
STATUS DOWNLOAD_STATUS
TLS_VERIFY OFF)
list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
list(GET DOWNLOAD_STATUS 1 ERROR_MESSAGE)
if(${STATUS_CODE} EQUAL 0)
message(STATUS "Download completed successfully!")
else()
message(FATAL_ERROR "Error occurred during download: ${ERROR_MESSAGE}")
endif()
endif()
endif()

include(${CMAKE_BINARY_DIR}/conan.cmake)
include("${CMAKE_BINARY_DIR}/conan.cmake")

conan_cmake_configure(REQUIRES zlib/1.2.13
boost/1.81.0
Expand Down

0 comments on commit 8221544

Please sign in to comment.