ryanhaining / cppitertools

Implementation of python itertools and builtin iteration functions for C++17
https://twitter.com/cppitertools
BSD 2-Clause "Simplified" License
1.37k stars 115 forks source link

Appveyor MSVC 2019 build failing #67

Closed ryanhaining closed 4 years ago

ryanhaining commented 4 years ago

the build log includes a CMake error:

CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR) (Required is at least
  version "1.60.0")
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/CMake/share/cmake-3.15/Modules/FindBoost.cmake:2161 (find_package_handle_standard_args)
  CMakeLists.txt:12 (find_package)

Appveyor only has Boost 1.71.0 for MSVC 2019, but the highest it has for MSVC 2017 is Boost 1.69.0.

The BOOST_ROOT environment variable in the appveyor setting is set to C:\Libraries\boost_1_64_0, but of course this only works for MSVC 2017

Both MSVC 2017 and 2019 work when they have their respective correct BOOST_ROOT

ryanhaining commented 4 years ago

Not the cleanest solution but, I deleted the environment variable and instead updated the build script to find the latest version of boost in C:\Libraries and use that:


$boostRoot=(Get-ChildItem C:\Libraries\boost_*).FullName | Sort -Descending | select -first 1
cmake "-DBOOST_ROOT=$boostRoot" .```