Add range-v3. #10737
Add range-v3. #10737
Conversation
@@ -108,6 +108,7 @@ mv solidity solc | |||
# Fetch jsoncpp dependency | |||
mkdir -p ./solc/deps/downloads/ 2>/dev/null || true | |||
wget -O ./solc/deps/downloads/jsoncpp-1.9.3.tar.gz https://github.com/open-source-parsers/jsoncpp/archive/1.9.3.tar.gz | |||
wget -O ./solc/deps/downloads/range-v3-0.11.0.tar.gz https://github.com/ericniebler/range-v3/archive/0.11.0.tar.gz |
ekpyron
on Jan 11, 2021
Author
Member
Not yet as an actual PPA build, no... but putting it there has it not-redownload, so it should work just as for jsoncpp.
@@ -40,7 +40,7 @@ set(sources | |||
) | |||
|
|||
add_library(solutil ${sources}) | |||
target_link_libraries(solutil PUBLIC jsoncpp Boost::boost Boost::filesystem Boost::system) | |||
target_link_libraries(solutil PUBLIC jsoncpp Boost::boost Boost::filesystem Boost::system range-v3) |
ekpyron
on Jan 11, 2021
Author
Member
It is - this pulls in the include directory only - it's an "INTERFACE" library for cmake - that's what they call header-only libraries.
ekpyron
on Jan 11, 2021
Author
Member
(We could have skipped it here, because the jsoncpp
will also already add build/deps/include
as include directory - but it's cleaner if we do it for range-v3
as well - but this does nothing else than exactly that plus making cmake aware of the dependency, s.t. it actually executes the ExternalProject_Add
stuff.)
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> | ||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} | ||
-DBUILD_TESTING=OFF | ||
-DRANGES_CXX_STD=17 |
chriseth
on Jan 11, 2021
Contributor
Is it possible to take this from our config? If not, can you add a comment to where we set it so that we don't forget to update this?
ekpyron
on Jan 11, 2021
Author
Member
Changed it. Actually we probably wouldn't even need it, since this actually doesn't build anything, since we disable tests and examples, but still - it now uses ${CMAKE_CXX_STANDARD}
which is set by us.
That was easy :-). |
Oh nice! |
@ekpyron well, you used external project, so of course it was going to be easy :) (There's precedent for that in the build system.) |
Yeah, well, thanks for #8860 (comment) ;-). |
I mean: I still think it's evil and mean, if |
Refs #8860