This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
77 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Copyright (C) 2018 Bluzelle | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License, version 3, | ||
# as published by the Free Software Foundation. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
include(ExternalProject) | ||
include(ProcessorCount) | ||
|
||
message(STATUS "Boost: ${REQUIRED_BOOST}") | ||
|
||
set(BOOST_TARBALL "boost_${REQUIRED_BOOST}") | ||
string(REPLACE "." "_" BOOST_TARBALL ${BOOST_TARBALL}) | ||
string(APPEND BOOST_TARBALL ".tar.gz") | ||
|
||
set(BOOST_LIBS "chrono,program_options,random,regex,system,thread,log,serialization") | ||
|
||
# Prevent travis gcc crashes... | ||
if (DEFINED ENV{TRAVIS}) | ||
set(BUILD_FLAGS -j8) | ||
else() | ||
ProcessorCount(N) | ||
if(NOT N EQUAL 0) | ||
set(BUILD_FLAGS -j${N}) | ||
endif() | ||
endif() | ||
|
||
ExternalProject_Add(boost | ||
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/boost" | ||
URL "http://sourceforge.net/projects/boost/files/boost/${REQUIRED_BOOST}/${BOOST_TARBALL}" | ||
TIMEOUT 30 | ||
INSTALL_COMMAND "" | ||
CONFIGURE_COMMAND "${CMAKE_CURRENT_BINARY_DIR}/boost/src/boost/bootstrap.sh" "--with-libraries=${BOOST_LIBS}" | ||
BUILD_COMMAND "${CMAKE_CURRENT_BINARY_DIR}/boost/src/boost/b2" link=static "${BUILD_FLAGS} " | ||
BUILD_IN_SOURCE true | ||
DOWNLOAD_NO_PROGRESS true | ||
) | ||
|
||
set_property(DIRECTORY PROPERTY CLEAN_NO_CUSTOM ${CMAKE_CURRENT_BINARY_DIR}/boost) | ||
|
||
ExternalProject_Get_Property(boost source_dir) | ||
set(Boost_INCLUDE_DIRS ${source_dir}) | ||
include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) | ||
|
||
set(Boost_LIBRARIES | ||
${source_dir}/stage/lib/libboost_log.a | ||
${source_dir}/stage/lib/libboost_program_options.a | ||
${source_dir}/stage/lib/libboost_system.a | ||
${source_dir}/stage/lib/libboost_thread.a | ||
pthread | ||
${source_dir}/stage/lib/libboost_serialization.a | ||
${source_dir}/stage/lib/libboost_date_time.a | ||
${source_dir}/stage/lib/libboost_log_setup.a | ||
${source_dir}/stage/lib/libboost_filesystem.a | ||
${source_dir}/stage/lib/libboost_regex.a | ||
${source_dir}/stage/lib/libboost_chrono.a | ||
${source_dir}/stage/lib/libboost_atomic.a | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
add_executable(swarm main.cpp) | ||
add_dependencies(swarm jsoncpp rocksdb) | ||
add_dependencies(swarm boost jsoncpp rocksdb) | ||
target_include_directories(swarm PRIVATE ${JSONCPP_INCLUDE_DIRS} ${ROCKSDB_INCLUDE_DIRS}) | ||
target_link_libraries(swarm node http raft pbft audit crud chaos options ethereum bootstrap storage crypto proto ${Protobuf_LIBRARIES} status ${ROCKSDB_LIBRARIES} ${Boost_LIBRARIES} ${JSONCPP_LIBRARIES} pthread) |
This file was deleted.
Oops, something went wrong.