[CMake] Boost + CMake + Windows + Sanity -> Possible?

Wheeler, Gavin gavin.wheeler at kcl.ac.uk
Wed Aug 8 05:53:19 EDT 2018


Hi Mateusz,

I absolutely agree - use the latest CMake! That will help fix and bugs and ensure it works with more up-to-date versions of Boost.

My cut and paste instructions were from 2 different computers, and the one I wrote the mail on has an older version of CMake - I wasn't suggesting people purposely use an old version, more to use the steps with the latest version. I've just got a new development machine - so now I'm working with new CMake :)

So, if I may, I will add another step...

0. Download and install the latest CMake

Thank-you,

Gavin


-----Original Message-----
From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Mateusz Loskot
Sent: 07 August 2018 17:34
To: cmake at cmake.org
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

On 7 August 2018 at 18:15, Wheeler, Gavin <gavin.wheeler at kcl.ac.uk> wrote:
> [...]
> 1.       Look in C:\Program
> Files\CMake\share\cmake-3.9\Modules\FindBoost.cmake

Rule #1: never use CMake older than the latest release!

Rule #2: if you die hard for old CMake, force use of the latest FindBoost.cmake

if (CMAKE_VERSION VERSION_LESS 3.12)
  if (NOT EXISTS "${CMAKE_BINARY_DIR}/cmake/FindBoost.cmake")
    message(STATUS "You are using CMake older than 3.10")
    message(STATUS "FindBoost.cmake has likely been updated to detect newer or even not yet released Boost")
    message(STATUS "Downloading FindBoost.cmake from
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fcmake%2F&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=2ORH%2BnLCBqCDNIwIrs7%2FkcdPZhtP8hYE%2FVKrBe%2FYpDQ%3D&reserved=0 release branch")
    message(STATUS "The auto-download can be disabled with
GIL_DISABLE_FINDBOOST_DOWNLOAD=ON")
    file(DOWNLOAD
      "https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fcmake%2Fcmake%2Fraw%2Frelease%2FModules%2FFindBoost.cmake&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=W9QJth1ZQZiT2VlDaub2rUgsS8BnhT7Ps5STKlzqma8%3D&reserved=0"
      "${CMAKE_BINARY_DIR}/cmake/FindBoost.cmake")
  endif()
  list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_BINARY_DIR}/cmake)
endif()


The rules work most of the time, unless a lil' bug sneaks in eg.

https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fcmake%2Fcmake%2Fmerge_requests%2F1731&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=MaRqgu7Rz8TwUvwQD%2FgIfm6bPje3spWfzDwwA%2BIQ5rA%3D&reserved=0
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fcmake%2Fcmake%2Fissues%2F17701&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=eB9j5AGT7EW1TPeGXHxIyvstvLIjk8NlscleVeOPFJk%3D&reserved=0

Remember, FindBoost.cmake is *always* a step or two behind CMake release.

Best regards,
--
Mateusz Loskot, https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmateusz.loskot.net&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=LyXA5Iv76X0qxQKYT1ts6%2Fvtc%2F2v%2BEa9g778QoL6%2BdI%3D&reserved=0
-- 

Powered by https://emea01.safelinks.protection.outlook.com/?url=www.kitware.com&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=%2BUZyhXV9EXuLreYKa2Kx9yAnlzN9X5%2Fpw8%2FeV%2BUrCoE%3D&reserved=0

Please keep messages on-topic and check the CMake FAQ at: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cmake.org%2FWiki%2FCMake_FAQ&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=L2gB6A4DMwOI%2BwD%2FK2lwDRQf%2BaHJ4K9gi52cYRG2fSk%3D&reserved=0

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Fsupport.html&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=Tjljc0Fic6aB7lm2Idu0TOj%2B2MAT8iGNBESYsJ0rqR4%3D&reserved=0
CMake Consulting: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Fconsulting.html&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=jeQYQWP0dYxBfc6vF7gSllG3k%2BDxmSjufD8h58SWOkA%3D&reserved=0
CMake Training Courses: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Ftraining.html&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=JmQKOS6nZLEMKNi%2BS02znt9SX1fEDT9hBNfMJm89Lt0%3D&reserved=0

Visit other Kitware open-source projects at https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=01SHgapkca41kiv%2FRNuTM4DGl0rljDn6Vc1a70ZSSKg%3D&reserved=0

Follow this link to subscribe/unsubscribe:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcmake.org%2Fmailman%2Flistinfo%2Fcmake&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=Q9Nrpc%2FA52FFCvo%2B3JCU5XWBWMFqbtiq6OvG2Oc3pvA%3D&reserved=0


More information about the CMake mailing list