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

2018-08-09 Thread Wheeler, Gavin via CMake
Hi Chris,

Thanks fort that suggestion too. Right now I have boost integrated using the 
pre-built libs and the program I need it for is working - so I’m loath to 
change it.

However, I’ll keep this for future reference, I’m sure it will come in handy.

Best Regards,

Gavin

From: ch...@simply-italian.co.uk  On Behalf Of 
Chris Wilson
Sent: 08 August 2018 12:29
To: Wheeler, Gavin 
Cc: cmake@cmake.org
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

Hi all,

I solved this problem (or a very similar one) by using a CMake 
superbuild<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fboxbackup%2Fboxbackup%2Fblob%2Fmaster%2Finfrastructure%2Fcmake%2Fwindows%2FCMakeLists.txt=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7C15ca36a76a0a473b2b5208d5fd222ce3%7C8370cf1416f34c16b83c724071654356%7C0=mlCc8Yqqnmxo7yaEg3SzuAg%2FGvYXseuo7WW5YgGkQw4%3D=0>
 which builds Boost and then my project, like this:

# Version of Boost to download, unpack, and compile Box Backup against:
set(BOOST_VERSION1.62.0)
# Hash of the Boost download file, to be verified after download:
set(BOOST_HASH SHA1=5fd97433c3f859d8cbab1eaed4156d3068ae3648)
...
string(REPLACE "." "_" BOOST_VERSION_UNDERSCORES ${BOOST_VERSION})
ExternalProject_Add(boost
URL 
"http://downloads.sourceforge.net/project/boost/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_UNDERSCORES}.tar.bz2<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdownloads.sourceforge.net%2Fproject%2Fboost%2Fboost%2F%24%7BBOOST_VERSION%7D%2Fboost_%24%7BBOOST_VERSION_UNDERSCORES%7D.tar.bz2=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7C15ca36a76a0a473b2b5208d5fd222ce3%7C8370cf1416f34c16b83c724071654356%7C0=3jIIq9zc4JfBlW0Owf39zmKTDK%2BW%2FFQsnFcESEryyd0%3D=0>"
URL_HASH ${BOOST_HASH}
# DOWNLOAD_NO_PROGRESS 1
# Disable automatic updating (untarring) as it's slow and not necessary
UPDATE_DISCONNECTED 1
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo "No configure step needed"
BUILD_COMMAND ${CMAKE_COMMAND} -E echo "No build step needed"
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "No install step needed"
)
...
ExternalProject_Add(boxbackup
DEPENDS zlib openssl pcre boost
SOURCE_DIR ${boxbackup_dir}/infrastructure/cmake
CMAKE_ARGS
  -DZLIB_ROOT=${install_dir}
  -DOPENSSL_ROOT_DIR=${install_dir}
  -DPCRE_ROOT=${install_dir}
  -DBOOST_ROOT=${CMAKE_BINARY_DIR}/Source/boost
  -DBOX_SUPPORT_READLINE=OFF
  -DCMAKE_INSTALL_PREFIX=${install_dir}
  -DAPPVEYOR_MODE=1
  -DDEBUG=${DEBUG}
  ${boxbackup_cmake_args}
  ${SUB_CMAKE_EXTRA_ARGS}
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "No install step needed"
STEP_TARGETS configure build
)

Having set BOOST_ROOT, FindBoost should just work.

In this case, I didn't need to compile any of Boost, only its headers, but if 
you do need to, then you can change its CONFIGURE_COMMAND and BUILD_COMMAND.

Hope this helps.

Thanks, Chris.


On 8 August 2018 at 10:53, Wheeler, Gavin 
mailto:gavin.whee...@kcl.ac.uk>> wrote:
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-boun...@cmake.org<mailto:cmake-boun...@cmake.org>] On 
Behalf Of Mateusz Loskot
Sent: 07 August 2018 17:34
To: cmake@cmake.org<mailto:cmake@cmake.org>
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

On 7 August 2018 at 18:15, Wheeler, Gavin 
mailto:gavin.whee...@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%2Fdata=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0sdata=2ORH%2BnLCBqCDNIwIrs7%2FkcdPZhtP8hYE%2FVKrBe%2FYpDQ%3Dreserved=0
 release branch")
message(STATUS "The auto-download can be disabled with
GIL_DISABLE_FINDBOOST_D

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

2018-08-08 Thread Wheeler, Gavin
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-boun...@cmake.org] On Behalf Of Mateusz Loskot
Sent: 07 August 2018 17:34
To: cmake@cmake.org
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

On 7 August 2018 at 18:15, Wheeler, Gavin  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%2Fdata=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0sdata=2ORH%2BnLCBqCDNIwIrs7%2FkcdPZhtP8hYE%2FVKrBe%2FYpDQ%3Dreserved=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.cmakedata=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0sdata=W9QJth1ZQZiT2VlDaub2rUgsS8BnhT7Ps5STKlzqma8%3Dreserved=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%2F1731data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0sdata=MaRqgu7Rz8TwUvwQD%2FgIfm6bPje3spWfzDwwA%2BIQ5rA%3Dreserved=0
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fcmake%2Fcmake%2Fissues%2F17701data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0sdata=eB9j5AGT7EW1TPeGXHxIyvstvLIjk8NlscleVeOPFJk%3Dreserved=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.netdata=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0sdata=LyXA5Iv76X0qxQKYT1ts6%2Fvtc%2F2v%2BEa9g778QoL6%2BdI%3Dreserved=0
-- 

Powered by 
https://emea01.safelinks.protection.outlook.com/?url=www.kitware.comdata=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0sdata=%2BUZyhXV9EXuLreYKa2Kx9yAnlzN9X5%2Fpw8%2FeV%2BUrCoE%3Dreserved=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_FAQdata=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0sdata=L2gB6A4DMwOI%2BwD%2FK2lwDRQf%2BaHJ4K9gi52cYRG2fSk%3Dreserved=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.htmldata=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0sdata=Tjljc0Fic6aB7lm2Idu0TOj%2B2MAT8iGNBESYsJ0rqR4%3Dreserved=0
CMake Consulting: 
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Fconsulting.htmldata=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0sdata=jeQYQWP0dYxBfc6vF7gSllG3k%2BDxmSjufD8h58SWOkA%3Dreserved=0
CMake Training Courses: 
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Ftraining.htmldata=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0sdata=JmQKOS6nZLEMKNi%2BS02zn

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

2018-08-07 Thread Mateusz Loskot
On 7 August 2018 at 18:15, Wheeler, Gavin  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://gitlab.kitware.com/cmake/ release branch")
message(STATUS "The auto-download can be disabled with
GIL_DISABLE_FINDBOOST_DOWNLOAD=ON")
file(DOWNLOAD
  
"https://gitlab.kitware.com/cmake/cmake/raw/release/Modules/FindBoost.cmake;
  "${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://gitlab.kitware.com/cmake/cmake/merge_requests/1731
https://gitlab.kitware.com/cmake/cmake/issues/17701

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

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

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

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


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

2018-08-07 Thread Wheeler, Gavin
Hi,

Thanks for the suggestions and apologies for my tardiness in getting back on 
this issue. I'm replying with my experiences for other to use as a future 
reference, hopefully they can avoid some of the frustration I've encountered.

I spent half a day on this with two colleagues who are well versed in using 
CMake, and we found a simple solution.

DON'T BOTHER!

"Windows + CMake + source boost "build seems intractable, or at the very least 
intractable enough to basically be impossible, or at any rate just not worth 
bothering with.

If are using Windows and you rate your sanity and time higher than you rate the 
ability to use CMake and a source build of boost together I suggest you do the 
following...


1.   Look in C:\Program Files\CMake\share\cmake-3.9\Modules\FindBoost.cmake

2.   Search for _Boost_KNOWN_VERSIONS

3.   Download the binary build of the newest version listed from 
https://sourceforge.net/projects/boost/files/boost-binaries/

4.   If Windows Defender has a wobbly and your IT policy won't allow you to 
ignore the wobble then move back thorugh older versions until one works

5.   Install the boost to the default location and default settings

6.   Run CMake with the following sort of thing...

find_package(Boost REQUIRED COMPONENTS system filesystem thread date_time 
iostreams)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})


7.   ...relax and make a nice cup of tea

Best Regards,

Gavin


From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Dvir Yitzchaki
Sent: 15 July 2018 08:27
To: Innokentiy Alaytsev ; cmake@cmake.org
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?


I recommend using Hunter package manager:

https://docs.hunter.sh/en/latest/quick-start/boost-components.html<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.hunter.sh%2Fen%2Flatest%2Fquick-start%2Fboost-components.html=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Ce36bc216c96b4234004408d5ea267d17%7C8370cf1416f34c16b83c724071654356%7C0=iwvlHuibo8%2Fu3bGB1woxV5fcI7T6daJRHII5l37dzGc%3D=0>



Regards,

Dvir



-Original Message-
From: CMake mailto:cmake-boun...@cmake.org>> On Behalf 
Of Innokentiy Alaytsev
Sent: Thursday, July 12, 2018 13:29
To: cmake@cmake.org<mailto:cmake@cmake.org>
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?



Hello!



First of all, I suggest you use Boost imported targets instead of 
Boost_INCLUDE_DIRS and Boost_LIBRARY_DIRS and the

target_include_directories() and target_link_libraries() functions. Al this is 
to better support exporting CMake package if you need it. If you do not produce 
CMake package for use in some other projects, then just ignore this advice.



Second, just use  pre-built Boost binaries 
<https://dl.bintray.com/boostorg/release/1.67.0/binaries/<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdl.bintray.com%2Fboostorg%2Frelease%2F1.67.0%2Fbinaries%2F=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Ce36bc216c96b4234004408d5ea267d17%7C8370cf1416f34c16b83c724071654356%7C0=p7Gr9TztBZhINb3iTb9PZJs0oOSp3fu%2FkR5HtZs624M%3D=0>>
  . They are just fine. If your Windows Defender finds something in them then 
it's the problem in Windows Defender.



Best regards,

Innokentiy Alaytsev







--

Sent from: 
http://cmake.3232098.n2.nabble.com/<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.3232098.n2.nabble.com%2F=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Ce36bc216c96b4234004408d5ea267d17%7C8370cf1416f34c16b83c724071654356%7C0=Bn6BpFHeaEY%2FPICsFuyxhedwJz74DnCqPj6JwX1OCWU%3D=0>

--



Powered by 
www.kitware.com<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Ce36bc216c96b4234004408d5ea267d17%7C8370cf1416f34c16b83c724071654356%7C0=h%2B9%2FVFYma%2BR7EpgKMbW2SK0y8nmoVzSnUgUSauMofWI%3D=0>



Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cmake.org%2FWiki%2FCMake_FAQ=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Ce36bc216c96b4234004408d5ea267d17%7C8370cf1416f34c16b83c724071654356%7C0=8qV0sbl6p82iFJjdrr5BpcU1Gl6fmgB%2Ba%2Bl5TW3xMVU%3D=0>



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



CMake Support: 
http://cmake.org/cmake/help/support.html<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Fsupport.html=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Ce36bc216c96b4234004408d5ea267d17%7C8370cf1416f34c16b83c724071654356%7C0=TnN9QdIdT1U%2Ffpb%2Fco%2BTeQ7FjVnHmT%2BAi61qKomtbx8%3D=0>

CMake Consulting: 
http://cmake.org/cmake/help/consulting.html<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Fconsulting.ht

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

2018-07-15 Thread Dvir Yitzchaki
I recommend using Hunter package manager:

https://docs.hunter.sh/en/latest/quick-start/boost-components.html



Regards,

Dvir



-Original Message-
From: CMake  On Behalf Of Innokentiy Alaytsev
Sent: Thursday, July 12, 2018 13:29
To: cmake@cmake.org
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?



Hello!



First of all, I suggest you use Boost imported targets instead of 
Boost_INCLUDE_DIRS and Boost_LIBRARY_DIRS and the

target_include_directories() and target_link_libraries() functions. Al this is 
to better support exporting CMake package if you need it. If you do not produce 
CMake package for use in some other projects, then just ignore this advice.



Second, just use  pre-built Boost binaries 
<https://dl.bintray.com/boostorg/release/1.67.0/binaries/>  . They are just 
fine. If your Windows Defender finds something in them then it's the problem in 
Windows Defender.



Best regards,

Innokentiy Alaytsev







--

Sent from: http://cmake.3232098.n2.nabble.com/

--



Powered by www.kitware.com<http://www.kitware.com>



Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ



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



CMake Support: http://cmake.org/cmake/help/support.html

CMake Consulting: http://cmake.org/cmake/help/consulting.html

CMake Training Courses: http://cmake.org/cmake/help/training.html



Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html



Follow this link to subscribe/unsubscribe:

https://cmake.org/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

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

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


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

2018-07-12 Thread Innokentiy Alaytsev
Hello!

First of all, I suggest you use Boost imported targets instead of
Boost_INCLUDE_DIRS and Boost_LIBRARY_DIRS and the
target_include_directories() and target_link_libraries() functions. Al this
is to better support exporting CMake package if you need it. If you do not
produce CMake package for use in some other projects, then just ignore this
advice.

Second, just use  pre-built Boost binaries
  . They are just
fine. If your Windows Defender finds something in them then it's the problem
in Windows Defender.

Best regards,
Innokentiy Alaytsev



--
Sent from: http://cmake.3232098.n2.nabble.com/
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

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

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


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

2018-07-12 Thread Wheeler, Gavin
Hello! First the short version...

Can anyone give me a set of instructions to download, build and setup the 
latest Boost (currently 1.67) on Windows 10 for VS 2017 64bit such that the 
following will work...

find_package(Boost REQUIRED COMPONENTS system filesystem thread date_time 
iostreams)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})

Including...

- Steps to follow when building and installing Boost
- What environment variables to set and what to set them to, e.g. boost, boost 
library, boost include directories
- What to set in the CMake file so that Boost will be correctly included

I ask about building Boost as well as CMake because it seems to me that unless 
Boost is built in a way that matches CMake expectations it just won't work.

Some background...

I've inherited a project with the above in, along with depndencies on ITK, VTK 
and zlib - all of which I have set up in CMake OK. However, Boost appears to be 
immune to working with CMake. There are various suggestions on the web, but 
nothing consistent, and nothing I've found whcih will work.

I've spent 2 days building Boost (this isn't solely due to CMake, the Boost 
build instructions are all over the place and their latest installer contains a 
trojan according to Windows defender) and configuring CMake in various ways, 
getting frustrated setting various environmental variables, and the nebulous 
target that is a Boost source install.

I can fix this by manually setting all of the library paths and doing some 
fixing up in the resultant project files, but I shouldn't really have to.

Surely it shouldn't be this difficult! Hopefully if there is a clear set of 
instructions from start to finish it will save others future anguish.

For building Boost I ended up using b2 and the following steps install (based 
on https://www.boost.org/doc/libs/1_67_0/more/getting_started/windows.html) and 
having tried following the instructions to the letter I ended up with...

- Download Boost, e.g. from 
https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.7z
- Extract to e.g. C:\thirdparty\boost\boost_1_67_0
- Build the bootstrapper, as per section 5.2.1 in 
https://www.boost.org/doc/libs/1_67_0/more/getting_started/windows.html
- Build the binaries, simlar to section 5.2.2 in the above, but using
- b2 --build-dir=C:\thirdparty\boost-install\boost_1_67_0 toolset=msvc 
--build-type=complete install
- Why the change?
- Building the Boost build tools didn't seem to affect the building of the 
install
- The inital install command in their instructions didn't seem to actually 
install the headers and libs
- Using stage only seems to collect the lib files together, not the headers
- So I end up with a libs folder and an include folder

I then try to set the following environment variables (as system ones, rather 
than as user ones)

- BOOST_ROOT - to the boost folder of the downloaded and extracted boost
- BOOST_INCLUDEDIR - to the include folder of the installed boost
- BOOST_LIBRARYDIR - the the lib folder of the installed boost

As well as lots of other directories which seemed like they might work.

Then in the CMake (based upon suggestions from the web) I've tried things 
like...

set(Boost_USE_STATIC_LIBSON)
set(Boost_USE_MULTITHREADED  ON)
set(Boost_USE_STATIC_RUNTIMEOFF)

...and...

SET(Boost_ADDITIONAL_VERSIONS "1.67" "1.67.0")

...and...

set (Boost_DETAILED_FAILURE_MSG ON)
set (BOOST_DEBUG ON)

... to no avail






-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

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

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake