Make cmake work better - #26
Conversation
| # Download JSON.hpp | ||
| if (NOT EXISTS ${CMAKE_BINARY_DIR}/external/json/json.hpp) | ||
| message(STATUS "Downloading nlohmann's json.hpp library...") | ||
| file(DOWNLOAD https://raw.githubusercontent.com/nlohmann/json/develop/src/json.hpp ${CMAKE_BINARY_DIR}/external/json/json.hpp SHOW_PROGRESS) |
There was a problem hiding this comment.
Perhaps it's an option to get it from the master branch?
| find_package(Threads REQUIRED) | ||
|
|
||
| # Disable tests for JSON | ||
| set(BuildTests OFF CACHE INTERNAL "" FORCE) |
There was a problem hiding this comment.
not review related but I this can be deleted if I'm correct, since nlohmann/json is only used as its raw header file instead of full repo w/ CMakeLists.txt.
|
I found some new CMake code that lets me clone the whole nlohmann repo via ExternalProject as part of the build process and not build their cmake file. This will work better instead of the weird file download. I didn't do that before because ExternalProject wants to build nlohmann's tests and I didn't know how to disable it. |
|
originally I moved away from cloning nlohmann because it takes up a 200mb download (and disk space), most of it tests and benchmarks. I accidentally closed this, so that's what's the close/reopen is. |
|
I'll see if I can make it so it only does a clone of one depth of history. If it's still too much I can just make it download like it does now. I misunderstood the original comment, I can add an option to download from the master branch (or any branch I guess for that matter) |
|
I meant it more that the master branch I expect to be more stable than the develop branch. If a shallow clone doesn't result in much disk usage I'm fine with that, too |
bd801f0 to
8a5e842
Compare
f25a03f to
e8dacb6
Compare
Make cmake figure out stuff instead of us figuring it out for cmake,
allowing us to compile on other platforms with more ease.
Added curl as a requirement in CMake.
Fixed finding threading for both C++11 and boost in cmake.
Download nlohmann's json library instead of keeping a local copy.
…date. Websocketpp has updated and brought some bug fixes on their develop branch which fixed a lot of issues with systems that had newer openssl installations. (Fixes builds on my arch system)
1560266 to
fd185c2
Compare
I have added some stuff to make cmake work a bit better between not just linux distributions but also on windows if you decide to port the project to windows.
The following fixes were made: