First off, I can make it work in the trivial case of literally hard-coding boost’s path in the CMakeLists.txt, as long as I just append it to the includes, and don’t say a word about the existence of something called “Boost”. The entire reason I’m trying to use CMake, though, is so that I can have a build system that assumes absolutely nothing whatsoever about the system the build takes place in (at least for libraries that have a CMake-included Find*.cmake. Seriously, I’ll figure out how to write modules for obscure 3rd party libraries, but this is boost we’re talking about).
The moment I start talking about anything called “Boost”, FindBoost.cmake fails miserably no matter what I do to help it along (apart from editing it or adding system-specific info to my build). find_package(Boost REQUIRED)
even fails when I set the environment variable Boost_INCLUDE_DIR
(I tried “/development_resources/boost_1_55_0
”, “C:/development_resources/boost_1_55_0
”, “C:\\development_resources\\boost_1_55_0
”, and “C:\development_resources\boost_1_55_0
”) and clear CMake’s cache. I’ve tried moving it from my custom folder to both “Program Files” and “Program Files (x86)” (figuring perhaps FindBoost.cmake tried these ‘default locations’).
And then, even when I give up (temporarily, for experimental purposes) and put set(BOOST_ROOT /development_resources/boost_1_55_0)
, then find_package(Boost COMPONENTS rational REQUIRED)
insists it can’t find required libraries for header-only libraries. If you’re telling my I have to compile boost anyway, there’s something seriously wrong. It is totally inconceivable in my mind that that could be the solution. That, and I think I had it compiled at one point anyway (maybe), but I’ve clean-slated boost on my system since, to try to flush out some of the troubles I was having. It’s possible I have not had it compiled at the same time as having told CMake where to find it properly. I don’t even know.
CMake isn’t looking very promising.