FC Updates from BitShares and myself #21

Closed
nathanielhourt wants to merge 687 commits from dapp-support into latest-fc
4 changed files with 1228 additions and 1185 deletions
Showing only changes of commit c9b3d57b0e - Show all commits

View file

@ -1,8 +1,8 @@
#
# Defines fc library target.
CMAKE_MINIMUM_REQUIRED( VERSION 3.1.2 FATAL_ERROR )
PROJECT( fc )
CMAKE_MINIMUM_REQUIRED( VERSION 3.2 )
set( CMAKE_CXX_STANDARD 14 )
SET( CMAKE_CXX_STANDARD_REQUIRED ON )
@ -22,9 +22,7 @@ INCLUDE(GetGitRevisionDescription)
INCLUDE(CheckLibraryExists)
INCLUDE(CheckLibcxxAtomic)
if (APPLE)
INCLUDE(Legacy)
endif (APPLE)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/Legacy)
get_git_head_revision(GIT_REFSPEC FC_GIT_REVISION_SHA)
get_git_unix_timestamp(FC_GIT_REVISION_UNIX_TIMESTAMP)
@ -160,7 +158,7 @@ ELSE(WIN32)
ENDIF(NOT APPLE)
ENDIF(WIN32)
FIND_PACKAGE(Boost 1.57 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
FIND_PACKAGE(Boost CONFIG COMPONENTS ${BOOST_COMPONENTS})
IF($ENV{OPENSSL_ROOT_DIR})

View file

@ -0,0 +1,18 @@
# This overrides `find_package(Boost ... CONFIG ... )` calls
# - calls the CMAke's built-in `FindBoost.cmake` and adds `pthread` library dependency
MESSAGE(STATUS "Using custom FindBoost config")
find_package(Boost 1.57 REQUIRED COMPONENTS ${Boost_FIND_COMPONENTS})
# Inject `pthread` dependency to Boost if needed
if (UNIX AND NOT CYGWIN)
list(FIND Boost_FIND_COMPONENTS thread _using_boost_thread)
if (_using_boost_thread GREATER -1)
find_library(BOOST_THREAD_LIBRARY NAMES pthread DOC "The threading library used by boost-thread")
if (BOOST_THREAD_LIBRARY)
MESSAGE(STATUS "Adding Boost thread lib dependency: ${BOOST_THREAD_LIBRARY}")
list(APPEND Boost_LIBRARIES ${BOOST_THREAD_LIBRARY})
endif ()
endif ()
endif ()

View file

@ -0,0 +1,27 @@
# If you are running recent enough version of CMake you shall consider updating/removing these lines ...
MESSAGE(STATUS "Configuring build scripts for older CMake versions")
# This patches your current boost searching routine so that `pthread` library is included if needed
# - this is here to fix some older CMake + Boost configurations
set(Boost_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../Boost" PARENT_SCOPE)
if (APPLE OR USE_LEGACY_FIND_BOOST)
MESSAGE(STATUS "Configuring for custom FindBoost.cmake")
# Custom FindBoost.cmake
# - overrides `find_package( Boost )` functionality
# - it's a modified https://github.com/Kitware/CMake/blob/363825cd55595b7de62fcf610836f6156a9f1a31/Modules/FindBoost.cmake
# - adds additional Boost search path
# - adds pthread as an dependency if needed
######
# This is using an old version of FindBoost.cmake irregardless of your CMake version
# - this will be removed in future release
# - improves Boost library search in some Apple OS configrations
# - this can be fixed with properly setting BOOST_LIBRARYDIR
#####
MESSAGE(DEPRECATION "Custom FindBoost.cmake will be deprecated in some future release. If you are using some of the affected configurations try setting the BOOST_LIBRARYDIR variable.")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Boost")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE)
endif ()