-
-
Notifications
You must be signed in to change notification settings - Fork 232
Description
Hi all. I know there some closed issues about Boost, specifically its use in the Gigasecond and Meetup questions. For example: #311
I also see that adding instructions for installing Boost was considered but it was thought that students could Google the install instructions relevant to their setup.
That said, I just had a heck of a time getting Boost installed with Visual Studios 2019 in order to attempt the Gigasecond question. It turned out that I had to add/change three lines in the CMakeLists.txt
file, but finding those three lines took a long time.
After I installed the Boost Binaries for Windows I had to hint in CMakeLists.txt
the location of my Boost binaries, and then change the version number for find_package
:
set(BOOST_ROOT "C:/local/boost_1_72_0")
find_package(Boost 1.72 REQUIRED COMPONENTS date_time)
Then in order for the boost
namespace and the ptime
symbol to resolve in my source code I had to add an INCLUDE_DIRECTORIES
to CMakeLists.txt
:
# Added below the above find_package statement.
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
Do y'all think the INCLUDE_DIRECTORIES
statement should be added to the provided CMakeLists.txt
file with a note about the BOOST_ROOT
in the readme?
Knowing these three things up front would have saved me a few hours of Googling and experimentation.