Merge branch 'phoenix' of https://github.com/InvictusInnovations/fc into phoenix
This commit is contained in:
commit
89f5bde073
2 changed files with 14 additions and 3 deletions
|
|
@ -44,7 +44,9 @@ IF( WIN32 )
|
|||
FIND_PACKAGE(Boost 1.53 REQUIRED COMPONENTS thread date_time system filesystem program_options signals serialization chrono unit_test_framework context)
|
||||
# For Boost 1.53 on windows, coroutine was not in BOOST_LIBRARYDIR and do not need it to build, but if boost versin >= 1.54, find coroutine otherwise will cause link errors
|
||||
IF(NOT "${Boost_VERSION}" MATCHES "1.53(.*)")
|
||||
SET(BOOST_LIBRARIES_TEMP ${Boost_LIBRARIES})
|
||||
FIND_PACKAGE(Boost 1.54 REQUIRED COMPONENTS coroutine)
|
||||
SET(Boost_LIBRARIES ${BOOST_LIBRARIES_TEMP} ${Boost_LIBRARIES})
|
||||
ENDIF()
|
||||
|
||||
ELSE(WIN32)
|
||||
|
|
@ -55,7 +57,11 @@ ELSE(WIN32)
|
|||
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so")
|
||||
|
||||
IF(NOT APPLE )
|
||||
include_directories( ${Boost_INCLUDE_DIR} )
|
||||
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/vendor/salsa20 )
|
||||
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/include )
|
||||
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/vendor/easylzma/src )
|
||||
IF(NOT APPLE ) # then unix
|
||||
# Unix build:
|
||||
SET(SALSA_SRC vendor/salsa20/salsa20.s)
|
||||
SET(rt_library rt )
|
||||
|
|
@ -167,6 +173,7 @@ IF(WIN32)
|
|||
target_compile_options(fc PUBLIC /EHa)
|
||||
ELSE()
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall" )
|
||||
|
||||
IF(APPLE)
|
||||
target_compile_options(fc PUBLIC -std=c++11 -stdlib=libc++ -Wall)
|
||||
ELSE()
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include <fc/io/sstream.hpp>
|
||||
#include <fc/log/logger.hpp>
|
||||
//#include <utfcpp/utf8.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
namespace fc
|
||||
{
|
||||
|
|
@ -585,8 +587,10 @@ namespace fc
|
|||
}
|
||||
variant json::from_file( const fc::path& p )
|
||||
{
|
||||
auto tmp = std::make_shared<fc::ifstream>( p, ifstream::binary );
|
||||
buffered_istream bi( tmp );
|
||||
//auto tmp = std::make_shared<fc::ifstream>( p, ifstream::binary );
|
||||
//auto tmp = std::make_shared<std::ifstream>( p.generic_string().c_str(), std::ios::binary );
|
||||
//buffered_istream bi( tmp );
|
||||
std::ifstream bi( p.generic_string().c_str(), std::ios::binary );
|
||||
return variant_from_stream( bi );
|
||||
}
|
||||
variant json::from_stream( buffered_istream& in )
|
||||
|
|
|
|||
Loading…
Reference in a new issue