diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake index 2757eb9ad..60ea3c90f 100644 --- a/cmake/EthCompilerSettings.cmake +++ b/cmake/EthCompilerSettings.cmake @@ -12,7 +12,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -DSHAREDLIB") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -DSHAREDLIB") + set(CMAKE_CXX_FLAGS "") + set(ETH_STATIC 1) else () message(FATAL_ERROR "Your C++ compiler does not support C++11. You have ${CMAKE_CXX_COMPILER_ID}") endif () @@ -27,36 +28,36 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG -DETH_RELEASE") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DETH_DEBUG") # Windows -if ("${TARGET_PLATFORM}" STREQUAL "w64") - set(CMAKE_SYSTEM_NAME Windows) - - set(CMAKE_CXX_LIBRARY_ARCHITECTURE x86_64-w64-mingw32) - set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) - set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) - set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) - set(CMAKE_AR x86_64-w64-mingw32-ar) - set(CMAKE_RANLIB x86_64-w64-mingw32-ranlib) - - set(CMAKE_EXECUTABLE_SUFFIX .exe) - - set(CMAKE_FIND_ROOT_PATH - /usr/x86_64-w64-mingw32 - ) - - include_directories(/usr/x86_64-w64-mingw32/include/cryptopp) - - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - - set(CMAKE_INSTALL_PREFIX /usr/x86_64-w64-mingw32) - set(ETH_BUILD_PLATFORM "windows") - set(ETH_STATIC 1) -else () - set(ETH_BUILD_PLATFORM ${CMAKE_SYSTEM_NAME}) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - set(ETH_SHARED 1) -endif() +#if ("${TARGET_PLATFORM}" STREQUAL "w64") +# set(CMAKE_SYSTEM_NAME Windows) +# +# set(CMAKE_CXX_LIBRARY_ARCHITECTURE x86_64-w64-mingw32) +# set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) +# set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) +# set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) +# set(CMAKE_AR x86_64-w64-mingw32-ar) +# set(CMAKE_RANLIB x86_64-w64-mingw32-ranlib) +# +# set(CMAKE_EXECUTABLE_SUFFIX .exe) +# +# set(CMAKE_FIND_ROOT_PATH +# /usr/x86_64-w64-mingw32 +# ) +# +# include_directories(/usr/x86_64-w64-mingw32/include/cryptopp) +# +# set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +# set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +# set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +# +# set(CMAKE_INSTALL_PREFIX /usr/x86_64-w64-mingw32) +# set(ETH_BUILD_PLATFORM "windows") +# set(ETH_STATIC 1) +#else () +# set(ETH_BUILD_PLATFORM ${CMAKE_SYSTEM_NAME}) +# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") +# set(ETH_SHARED 1) +#endif() diff --git a/libdevcore/CMakeLists.txt b/libdevcore/CMakeLists.txt index 5bcff1ead..c6f3b735d 100644 --- a/libdevcore/CMakeLists.txt +++ b/libdevcore/CMakeLists.txt @@ -19,8 +19,8 @@ else() add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS}) endif() -target_link_libraries(${EXECUTABLE} ${Boost_THREAD_LIBRARY}) target_link_libraries(${EXECUTABLE} ${Boost_SYSTEM_LIBRARY}) +target_link_libraries(${EXECUTABLE} ${Boost_THREAD_LIBRARY}) if (APPLE) find_package(Threads REQUIRED) diff --git a/libdevcore/RLP.h b/libdevcore/RLP.h index 3101f63d6..2eedbaba2 100644 --- a/libdevcore/RLP.h +++ b/libdevcore/RLP.h @@ -28,10 +28,10 @@ #include #include #include -#include -#include -#include -#include +#include "vector_ref.h" +#include "Common.h" +#include "Exceptions.h" +#include "FixedHash.h" namespace dev { diff --git a/libevmcore/CMakeLists.txt b/libevmcore/CMakeLists.txt index b889e7163..472e112a1 100644 --- a/libevmcore/CMakeLists.txt +++ b/libevmcore/CMakeLists.txt @@ -5,6 +5,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB") aux_source_directory(. SRC_LIST) +include_directories(..) +include_directories(${Boost_INCLUDE_DIRS}) + set(EXECUTABLE evmcore) file(GLOB HEADERS "*.h") @@ -14,8 +17,6 @@ else() add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS}) endif() -include_directories(..) - target_link_libraries(${EXECUTABLE} devcore) install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) diff --git a/libevmcore/Instruction.cpp b/libevmcore/Instruction.cpp index 9062fd8ed..b4a4d9f3b 100644 --- a/libevmcore/Instruction.cpp +++ b/libevmcore/Instruction.cpp @@ -326,7 +326,11 @@ InstructionInfo dev::eth::instructionInfo(Instruction _inst) } catch (...) { +#ifndef BOOST_NO_EXCEPTIONS cwarn << "\n" << boost::current_exception_diagnostic_information(); +#else + cwarn << "\n"; +#endif return InstructionInfo({"", 0, 0, 0, false}); } } diff --git a/libjsqrc/CMakeLists.txt b/libjsqrc/CMakeLists.txt index 9c505df2b..b8beec2ff 100644 --- a/libjsqrc/CMakeLists.txt +++ b/libjsqrc/CMakeLists.txt @@ -1,20 +1,4 @@ cmake_policy(SET CMP0015 NEW) - -# Find Qt5 for Apple and update src_list for windows -if (APPLE) - # homebrew defaults to qt4 and installs qt5 as 'keg-only' - # which places it into /usr/local/opt insteadof /usr/local. - - set(CMAKE_PREFIX_PATH /usr/local/opt/qt5) - include_directories(/usr/local/opt/qt5/include /usr/local/include) -elseif ("${TARGET_PLATFORM}" STREQUAL "w64") - set(SRC_LIST ${SRC_LIST} ../windows/qt_plugin_import.cpp) -elseif (UNIX) - set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ";$ENV{QTDIR}/lib/cmake") -endif () - -find_package(Qt5Core) - set(CMAKE_AUTOMOC OFF) qt5_add_resources(JSQRC js.qrc)