From 4cf919c030ba8a63c446e599b54991451113f4a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 20 Mar 2017 20:12:18 +0100 Subject: [PATCH] Remove some old dependencies --- CMakeLists.txt | 5 - cmake/EthDependencies.cmake | 35 ---- cmake/FindGmp.cmake | 34 ---- cmake/FindMiniupnpc.cmake | 49 ------ cmake/FindReadline.cmake | 34 ---- cmake/FindWindowsSDK.cmake | 322 ---------------------------------- cmake/Findv8.cmake | 69 -------- libethcore/CMakeLists.txt | 7 - libethcore/EthashCPUMiner.cpp | 55 +----- 9 files changed, 1 insertion(+), 609 deletions(-) delete mode 100644 cmake/FindGmp.cmake delete mode 100644 cmake/FindMiniupnpc.cmake delete mode 100644 cmake/FindReadline.cmake delete mode 100644 cmake/FindWindowsSDK.cmake delete mode 100644 cmake/Findv8.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 80bd61158..e3d689458 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,10 +80,6 @@ function(configureProject) add_definitions(-DETH_GUI) endif() - if (CPUID_FOUND) - add_definitions(-DETH_CPUID) - endif() - if (CURL_FOUND) add_definitions(-DETH_CURL) endif() @@ -216,7 +212,6 @@ message("-- CMAKE_BUILD_TYPE Build type ${CMAKE_BU message("-- TARGET_PLATFORM Target platform ${TARGET_PLATFORM}") message("--------------------------------------------------------------- features") message("-- Chromium support ${ETH_HAVE_WEBENGINE}") -message("-- Hardware identification support ${CPUID_FOUND}") message("-- HTTP Request support ${CURL_FOUND}") message("-- VMTRACE VM execution tracing ${VMTRACE}") message("-- PROFILING Profiling support ${PROFILING}") diff --git a/cmake/EthDependencies.cmake b/cmake/EthDependencies.cmake index 40dfdd59b..2adc59570 100644 --- a/cmake/EthDependencies.cmake +++ b/cmake/EthDependencies.cmake @@ -68,47 +68,12 @@ if (JSONRPC) message(" - microhttpd dll : ${MHD_DLLS}") endif() #JSONRPC -# TODO readline package does not yet check for correct version number -# TODO make readline package dependent on cmake options -# TODO get rid of -DETH_READLINE -find_package (Readline 6.3.8) -if (READLINE_FOUND) - message (" - readline header: ${READLINE_INCLUDE_DIRS}") - message (" - readline lib : ${READLINE_LIBRARIES}") - add_definitions(-DETH_READLINE) -endif () - -# TODO miniupnpc package does not yet check for correct version number -# TODO make miniupnpc package dependent on cmake options -# TODO get rid of -DMINIUPNPC -find_package (Miniupnpc 1.8.2013) -if (MINIUPNPC_FOUND) - message (" - miniupnpc header: ${MINIUPNPC_INCLUDE_DIRS}") - message (" - miniupnpc lib : ${MINIUPNPC_LIBRARIES}") - add_definitions(-DETH_MINIUPNPC) -endif() - -# TODO gmp package does not yet check for correct version number -# TODO it is also not required in msvc build -find_package (Gmp 6.0.0) -if (GMP_FOUND) - message(" - gmp header: ${GMP_INCLUDE_DIRS}") - message(" - gmp lib : ${GMP_LIBRARIES}") -endif() - # curl is only requried for tests # TODO specify min curl version, on windows we are currently using 7.29 find_package (CURL) message(" - curl header: ${CURL_INCLUDE_DIRS}") message(" - curl lib : ${CURL_LIBRARIES}") -# cpuid required for eth -find_package (Cpuid) -if (CPUID_FOUND) - message(" - cpuid header: ${CPUID_INCLUDE_DIRS}") - message(" - cpuid lib : ${CPUID_LIBRARIES}") -endif() - find_package (OpenCL) if (OpenCL_FOUND) message(" - opencl header: ${OpenCL_INCLUDE_DIRS}") diff --git a/cmake/FindGmp.cmake b/cmake/FindGmp.cmake deleted file mode 100644 index 4570b35fa..000000000 --- a/cmake/FindGmp.cmake +++ /dev/null @@ -1,34 +0,0 @@ -# Find gmp -# -# Find the gmp includes and library -# -# if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH -# -# This module defines -# GMP_INCLUDE_DIRS, where to find header, etc. -# GMP_LIBRARIES, the libraries needed to use gmp. -# GMP_FOUND, If false, do not try to use gmp. - -# only look in default directories -find_path( - GMP_INCLUDE_DIR - NAMES gmp.h - DOC "gmp include dir" -) - -find_library( - GMP_LIBRARY - NAMES gmp - DOC "gmp library" -) - -set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR}) -set(GMP_LIBRARIES ${GMP_LIBRARY}) - -# handle the QUIETLY and REQUIRED arguments and set GMP_FOUND to TRUE -# if all listed variables are TRUE, hide their existence from configuration view -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(gmp DEFAULT_MSG - GMP_INCLUDE_DIR GMP_LIBRARY) -mark_as_advanced (GMP_INCLUDE_DIR GMP_LIBRARY) - diff --git a/cmake/FindMiniupnpc.cmake b/cmake/FindMiniupnpc.cmake deleted file mode 100644 index 0bf8b5c0f..000000000 --- a/cmake/FindMiniupnpc.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# Find miniupnpc -# -# Find the miniupnpc includes and library -# -# if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH -# -# This module defines -# MINIUPNPC_INCLUDE_DIRS, where to find header, etc. -# MINIUPNPC_LIBRARIES, the libraries needed to use gmp. -# MINIUPNPC_FOUND, If false, do not try to use gmp. - -# only look in default directories -find_path( - MINIUPNPC_INCLUDE_DIR - NAMES miniupnpc/miniupnpc.h - DOC "miniupnpc include dir" -) - -find_library( - MINIUPNPC_LIBRARY - NAMES miniupnpc - DOC "miniupnpc library" -) - -set(MINIUPNPC_INCLUDE_DIRS ${MINIUPNPC_INCLUDE_DIR}) -set(MINIUPNPC_LIBRARIES ${MINIUPNPC_LIBRARY}) - -# debug library on windows -# same naming convention as in QT (appending debug library with d) -# boost is using the same "hack" as us with "optimized" and "debug" -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - - find_library( - MINIUPNPC_LIBRARY_DEBUG - NAMES miniupnpcd - DOC "miniupnpc debug library" - ) - - set(MINIUPNPC_LIBRARIES "iphlpapi" optimized ${MINIUPNPC_LIBRARIES} debug ${MINIUPNPC_LIBRARY_DEBUG}) - -endif() - -# handle the QUIETLY and REQUIRED arguments and set MINIUPNPC_FOUND to TRUE -# if all listed variables are TRUE, hide their existence from configuration view -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(miniupnpc DEFAULT_MSG - MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY) -mark_as_advanced (MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY) - diff --git a/cmake/FindReadline.cmake b/cmake/FindReadline.cmake deleted file mode 100644 index c1cdfd33a..000000000 --- a/cmake/FindReadline.cmake +++ /dev/null @@ -1,34 +0,0 @@ -# Find readline -# -# Find the readline includes and library -# -# if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH -# -# This module defines -# READLINE_INCLUDE_DIRS, where to find header, etc. -# READLINE_LIBRARIES, the libraries needed to use readline. -# READLINE_FOUND, If false, do not try to use readline. - -# only look in default directories -find_path( - READLINE_INCLUDE_DIR - NAMES readline/readline.h - DOC "readling include dir" - ) - -find_library( - READLINE_LIBRARY - NAMES readline - DOC "readline library" - ) - -set(READLINE_INCLUDE_DIRS ${READLINE_INCLUDE_DIR}) -set(READLINE_LIBRARIES ${READLINE_LIBRARY}) - -# handle the QUIETLY and REQUIRED arguments and set READLINE_FOUND to TRUE -# if all listed variables are TRUE, hide their existence from configuration view -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(readline DEFAULT_MSG - READLINE_INCLUDE_DIR READLINE_LIBRARY) -mark_as_advanced (READLINE_INCLUDE_DIR READLINE_LIBRARY) - diff --git a/cmake/FindWindowsSDK.cmake b/cmake/FindWindowsSDK.cmake deleted file mode 100644 index 665a87f04..000000000 --- a/cmake/FindWindowsSDK.cmake +++ /dev/null @@ -1,322 +0,0 @@ -# - Find the Windows SDK aka Platform SDK -# -# Relevant Wikipedia article: http://en.wikipedia.org/wiki/Microsoft_Windows_SDK -# -# Variables: -# WINDOWSSDK_FOUND - if any version of the windows or platform SDK was found that is usable with the current version of visual studio -# WINDOWSSDK_LATEST_DIR -# WINDOWSSDK_LATEST_NAME -# WINDOWSSDK_FOUND_PREFERENCE - if we found an entry indicating a "preferred" SDK listed for this visual studio version -# WINDOWSSDK_PREFERRED_DIR -# WINDOWSSDK_PREFERRED_NAME -# -# WINDOWSSDK_DIRS - contains no duplicates, ordered most recent first. -# WINDOWSSDK_PREFERRED_FIRST_DIRS - contains no duplicates, ordered with preferred first, followed by the rest in descending recency -# -# Functions: -# windowssdk_name_lookup( ) - Find the name corresponding with the SDK directory you pass in, or -# NOTFOUND if not recognized. Your directory must be one of WINDOWSSDK_DIRS for this to work. -# -# get_windowssdk_from_component( ) - Given a library or include dir, -# find the Windows SDK root dir corresponding to it, or NOTFOUND if unrecognized. -# -# get_windowssdk_library_dirs( ) - Find the architecture-appropriate -# library directories corresponding to the SDK directory you pass in (or NOTFOUND if none) -# -# get_windowssdk_include_dirs( ) - Find the -# include directories corresponding to the SDK directory you pass in (or NOTFOUND if none) -# -# Requires these CMake modules: -# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) -# -# Original Author: -# 2012 Ryan Pavlik -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2012. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -set(_preferred_sdk_dirs) -set(_win_sdk_dirs) -set(_win_sdk_versanddirs) -if(MSVC_VERSION GREATER 1310) # Newer than VS .NET/VS Toolkit 2003 - - # Environment variable for SDK dir - if(EXISTS "$ENV{WindowsSDKDir}" AND (NOT "$ENV{WindowsSDKDir}" STREQUAL "")) - message(STATUS "Got $ENV{WindowsSDKDir} - Windows/Platform SDK directories: ${_win_sdk_dirs}") - list(APPEND _preferred_sdk_dirs "$ENV{WindowsSDKDir}") - endif() - - if(MSVC_VERSION LESS 1600) - # Per-user current Windows SDK for VS2005/2008 - get_filename_component(_sdkdir - "[HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" - ABSOLUTE) - if(EXISTS "${_sdkdir}") - list(APPEND _preferred_sdk_dirs "${_sdkdir}") - endif() - - # System-wide current Windows SDK for VS2005/2008 - get_filename_component(_sdkdir - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" - ABSOLUTE) - if(EXISTS "${_sdkdir}") - list(APPEND _preferred_sdk_dirs "${_sdkdir}") - endif() - endif() - - if(MSVC_VERSION LESS 1700) - # VC 10 and older has broad target support - set(_winsdk_vistaonly) - else() - # VC 11 by default targets Vista and later only, so we can add a few more SDKs that (might?) only work on vista+ - if("${CMAKE_VS_PLATFORM_TOOLSET}" MATCHES "_xp") - # This is the XP-compatible v110 toolset - elseif("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v100") - # This is the VS2010 toolset - else() - if(NOT WINDOWSSDK_FOUND AND NOT WindowsSDK_FIND_QUIETLY) - message(STATUS "FindWindowsSDK: Detected Visual Studio 2012 or newer, not using the _xp toolset variant: including SDK versions that drop XP support in search!") - endif() - # These versions have no XP (and possibly Vista pre-SP1) support - set(_winsdk_vistaonly) - if(NOT MSVC_VERSION LESS 1800) - list(APPEND _winsdk_vistaonly - # Windows Software Development Kit (SDK) for Windows 8.1 - # http://msdn.microsoft.com/en-gb/windows/desktop/bg162891 - v8.1) - endif() - list(APPEND _winsdk_vistaonly - # Included in Visual Studio 2012 - v8.0A - - # Microsoft Windows SDK for Windows 8 and .NET Framework 4.5 - # This is the first version to also include the DirectX SDK - # http://msdn.microsoft.com/en-US/windows/desktop/hh852363.aspx - v8.0 - - # Microsoft Windows SDK for Windows 7 and .NET Framework 4 - # http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b - v7.1 - ) - endif() - endif() - foreach(_winsdkver - ${_winsdk_vistaonly} - - # Included in Visual Studio 2013 - # Includes the v120_xp toolset - v8.1A - - # Included with VS 2012 Update 1 or later - # Introduces v110_xp toolset - v7.1A - - # Included with VS 2010 - v7.0A - - # Windows SDK for Windows 7 and .NET Framework 3.5 SP1 - # Works with VC9 - #http://www.microsoft.com/en-us/download/details.aspx?id=18950 - v7.0 - - # Two versions call themselves "v6.1": - # Older: - # Windows Vista Update & .NET 3.0 SDK - # http://www.microsoft.com/en-us/download/details.aspx?id=14477 - - # Newer: - # Windows Server 2008 & .NET 3.5 SDK - # may have broken VS9SP1? they recommend v7.0 instead, or a KB... - # http://www.microsoft.com/en-us/download/details.aspx?id=24826 - v6.1 - - # Included in VS 2008 - v6.0A - - # Microsoft Windows Software Development Kit for Windows Vista and .NET Framework 3.0 Runtime Components - # http://blogs.msdn.com/b/stanley/archive/2006/11/08/microsoft-windows-software-development-kit-for-windows-vista-and-net-framework-3-0-runtime-components.aspx - v6.0) - - get_filename_component(_sdkdir - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\${_winsdkver};InstallationFolder]" - ABSOLUTE) - if(EXISTS "${_sdkdir}") - list(APPEND _win_sdk_dirs "${_sdkdir}") - list(APPEND - _win_sdk_versanddirs - "Windows SDK ${_winsdkver}" - "${_sdkdir}") - endif() - endforeach() -endif() -if(MSVC_VERSION GREATER 1200) - foreach(_platformsdkinfo - "D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1_Microsoft Platform SDK for Windows Server 2003 R2" - "8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3_Microsoft Platform SDK for Windows Server 2003 SP1") - string(SUBSTRING "${_platformsdkinfo}" 0 36 _platformsdkguid) - string(SUBSTRING "${_platformsdkinfo}" 37 -1 _platformsdkname) - foreach(HIVE HKEY_LOCAL_MACHINE HKEY_CURRENT_USER) - get_filename_component(_sdkdir - "[${HIVE}\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\${_platformsdkguid};Install Dir]" - ABSOLUTE) - if(EXISTS "${_sdkdir}") - list(APPEND _win_sdk_dirs "${_sdkdir}") - list(APPEND _win_sdk_versanddirs "${_platformsdkname}" "${_sdkdir}") - endif() - endforeach() - endforeach() -endif() - -set(_win_sdk_versanddirs - "${_win_sdk_versanddirs}" - CACHE - INTERNAL - "mapping between windows sdk version locations and names" - FORCE) - -function(windowssdk_name_lookup _dir _outvar) - list(FIND _win_sdk_versanddirs "${_dir}" _diridx) - math(EXPR _nameidx "${_diridx} - 1") - if(${_nameidx} GREATER -1) - list(GET _win_sdk_versanddirs ${_nameidx} _sdkname) - else() - set(_sdkname "NOTFOUND") - endif() - set(${_outvar} "${_sdkname}" PARENT_SCOPE) -endfunction() - -if(_win_sdk_dirs) - # Remove duplicates - list(REMOVE_DUPLICATES _win_sdk_dirs) - list(GET _win_sdk_dirs 0 WINDOWSSDK_LATEST_DIR) - windowssdk_name_lookup("${WINDOWSSDK_LATEST_DIR}" - WINDOWSSDK_LATEST_NAME) - set(WINDOWSSDK_DIRS ${_win_sdk_dirs}) -endif() -if(_preferred_sdk_dirs) - list(GET _preferred_sdk_dirs 0 WINDOWSSDK_PREFERRED_DIR) - windowssdk_name_lookup("${WINDOWSSDK_LATEST_DIR}" - WINDOWSSDK_PREFERRED_NAME) - set(WINDOWSSDK_PREFERRED_FIRST_DIRS - ${_preferred_sdk_dirs} - ${_win_sdk_dirs}) - list(REMOVE_DUPLICATES WINDOWSSDK_PREFERRED_FIRST_DIRS) - set(WINDOWSSDK_FOUND_PREFERENCE ON) - - # In case a preferred dir was found that isn't found otherwise - #set(WINDOWSSDK_DIRS ${WINDOWSSDK_DIRS} ${WINDOWSSDK_PREFERRED_FIRST_DIRS}) - #list(REMOVE_DUPLICATES WINDOWSSDK_DIRS) -else() - set(WINDOWSSDK_PREFERRED_DIR "${WINDOWSSDK_LATEST_DIR}") - set(WINDOWSSDK_PREFERRED_NAME "${WINDOWSSDK_LATEST_NAME}") - set(WINDOWSSDK_PREFERRED_FIRST_DIRS ${WINDOWSSDK_DIRS}) - set(WINDOWSSDK_FOUND_PREFERENCE OFF) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(WindowsSDK - "No compatible version of the Windows SDK or Platform SDK found." - WINDOWSSDK_DIRS) - -if(WINDOWSSDK_FOUND) - if(NOT _winsdk_remembered_dirs STREQUAL WINDOWSSDK_DIRS) - set(_winsdk_remembered_dirs - "${WINDOWSSDK_DIRS}" - CACHE - INTERNAL - "" - FORCE) - if(NOT WindowsSDK_FIND_QUIETLY) - foreach(_sdkdir ${WINDOWSSDK_DIRS}) - windowssdk_name_lookup("${_sdkdir}" _sdkname) - message(STATUS " - Found ${_sdkname} at ${_sdkdir}") - endforeach() - endif() - endif() - - # Internal: Architecture-appropriate library directory names. - if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "ARM") - set(_winsdk_archbare /arm) # what the architecture used to be called in oldest SDKs - set(_winsdk_arch arm) # what the architecture used to be called - set(_winsdk_arch8 arm) # what the WDK for Win8+ calls this architecture - else() - if(CMAKE_SIZEOF_VOID_P MATCHES "8") - set(_winsdk_archbare /x64) # what the architecture used to be called in oldest SDKs - set(_winsdk_arch amd64) # what the architecture used to be called - set(_winsdk_arch8 x64) # what the WDK for Win8+ calls this architecture - else() - set(_winsdk_archbare ) # what the architecture used to be called in oldest SDKs - set(_winsdk_arch i386) # what the architecture used to be called - set(_winsdk_arch8 x86) # what the WDK for Win8+ calls this architecture - endif() - endif() - - function(get_windowssdk_from_component _component _var) - get_filename_component(_component "${_component}" ABSOLUTE) - file(TO_CMAKE_PATH "${_component}" _component) - foreach(_sdkdir ${WINDOWSSDK_DIRS}) - get_filename_component(_sdkdir "${_sdkdir}" ABSOLUTE) - string(LENGTH "${_sdkdir}" _sdklen) - file(RELATIVE_PATH _rel "${_sdkdir}" "${_component}") - # If we don't have any "parent directory" items... - if(NOT "${_rel}" MATCHES "[.][.]") - set(${_var} "${_sdkdir}" PARENT_SCOPE) - return() - endif() - endforeach() - # Fail. - set(${_var} "NOTFOUND" PARENT_SCOPE) - endfunction() - function(get_windowssdk_library_dirs _winsdk_dir _var) - set(_result) - foreach(_suffix - "lib${_winsdk_archbare}" # SDKs like 7.1A - "lib/w2k/${_winsdk_arch}" # Win2k min requirement - "lib/wxp/${_winsdk_arch}" # WinXP min requirement - "lib/wnet/${_winsdk_arch}" # Win Server 2003 min requirement - "lib/wlh/${_winsdk_arch}" # Win Vista ("Long Horn") min requirement - "lib/wlh/um/${_winsdk_arch8}" # Win Vista ("Long Horn") min requirement - "lib/win7/${_winsdk_arch}" # Win 7 min requirement - "lib/win7/um/${_winsdk_arch8}" # Win 7 min requirement - "lib/win8/um/${_winsdk_arch8}" # Win 8 min requirement - "lib/win8/km/${_winsdk_arch8}" # Win 8 min requirement - "lib/winv6.3/km/${_winsdk_arch8}" # Win 8.1 min requirement - "lib/winv6.3/um/${_winsdk_arch8}" # Win 8.1 min requirement - ) - # Check to see if a library actually exists here. - file(GLOB _libs "${_winsdk_dir}/${_suffix}/*.lib") - if(_libs) - list(APPEND _result "${_winsdk_dir}/${_suffix}") - endif() - endforeach() - if(NOT _result) - set(_result NOTFOUND) - endif() - set(${_var} ${_result} PARENT_SCOPE) - endfunction() - function(get_windowssdk_include_dirs _winsdk_dir _var) - set(_result) - foreach(_suffix - "Include" - "Include/shared" - "Include/um" - "Include/winrt" - "Include/km" - "Include/wdf" - ) - # Check to see if a header file actually exists here. - file(GLOB _headers "${_winsdk_dir}/${_suffix}/*.h") - if(_headers) - list(APPEND _result "${_winsdk_dir}/${_suffix}") - endif() - endforeach() - if(NOT _result) - set(_result NOTFOUND) - endif() - set(${_var} ${_result} PARENT_SCOPE) - endfunction() -endif() diff --git a/cmake/Findv8.cmake b/cmake/Findv8.cmake deleted file mode 100644 index e46ae7e39..000000000 --- a/cmake/Findv8.cmake +++ /dev/null @@ -1,69 +0,0 @@ -# Find v8 -# -# Find the v8 includes and library -# -# if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH -# -# This module defines -# V8_INCLUDE_DIRS, where to find header, etc. -# V8_LIBRARIES, the libraries needed to use v8. -# V8_FOUND, If false, do not try to use v8. - -# only look in default directories -find_path( - V8_INCLUDE_DIR - NAMES v8.h - DOC "v8 include dir" -) - -find_library( - V8_LIBRARY - NAMES v8 - DOC "v8 library" -) - -set(V8_INCLUDE_DIRS ${V8_INCLUDE_DIR}) -set(V8_LIBRARIES ${V8_LIBRARY}) - -# debug library on windows -# same naming convention as in qt (appending debug library with d) -# boost is using the same "hack" as us with "optimized" and "debug" -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - - find_library( - V8_LIBRARY - NAMES v8_base - DOC "v8 base library" - ) - - find_library( - V8_NO_SNAPSHOT_LIBRARY - NAMES v8_nosnapshot - DOC "v8 nosnapshot library" - ) - - set(V8_LIBRARIES ${V8_LIBRARY} ${V8_NO_SNAPSHOT_LIBRARY}) - - find_library( - V8_LIBRARY_DEBUG - NAMES v8_based - DOC "v8 base library" - ) - - find_library( - V8_NO_SNAPSHOT_LIBRARY_DEBUG - NAMES v8_nosnapshotd - DOC "v8 nosnapshot library" - ) - - set(V8_LIBRARIES "ws2_32" "winmm" optimized ${V8_LIBRARIES} debug ${V8_LIBRARY_DEBUG} ${V8_NO_SNAPSHOT_LIBRARY_DEBUG}) - -endif() - -# handle the QUIETLY and REQUIRED arguments and set V8_FOUND to TRUE -# if all listed variables are TRUE, hide their existence from configuration view -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(v8 DEFAULT_MSG - V8_INCLUDE_DIR V8_LIBRARY) -mark_as_advanced (V8_INCLUDE_DIR V8_LIBRARY) - diff --git a/libethcore/CMakeLists.txt b/libethcore/CMakeLists.txt index 19485d288..2f5da1f34 100644 --- a/libethcore/CMakeLists.txt +++ b/libethcore/CMakeLists.txt @@ -6,10 +6,6 @@ aux_source_directory(. SRC_LIST) include_directories(BEFORE ..) include_directories(${Boost_INCLUDE_DIRS}) -if (CPUID_FOUND) - include_directories(${Cpuid_INCLUDE_DIRS}) -endif () - if (ETHASHCUDA) include_directories(${CUDA_INCLUDE_DIRS}) endif () @@ -28,9 +24,6 @@ endif () if (ETHASHCUDA) target_link_libraries(${EXECUTABLE} ethash-cuda) endif () -if (CPUID_FOUND) - target_link_libraries(${EXECUTABLE} ${CPUID_LIBRARIES}) -endif () install( TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} ) diff --git a/libethcore/EthashCPUMiner.cpp b/libethcore/EthashCPUMiner.cpp index 6c7097605..ac9301ded 100644 --- a/libethcore/EthashCPUMiner.cpp +++ b/libethcore/EthashCPUMiner.cpp @@ -26,34 +26,12 @@ #include #include #include -#if ETH_CPUID || !ETH_TRUE -#define HAVE_STDINT_H -#include -#endif using namespace std; using namespace dev; using namespace eth; unsigned EthashCPUMiner::s_numInstances = 0; -#if ETH_CPUID || !ETH_TRUE -static string jsonEncode(map const& _m) -{ - string ret = "{"; - - for (auto const& i: _m) - { - string k = boost::replace_all_copy(boost::replace_all_copy(i.first, "\\", "\\\\"), "'", "\\'"); - string v = boost::replace_all_copy(boost::replace_all_copy(i.second, "\\", "\\\\"), "'", "\\'"); - if (ret.size() > 1) - ret += ", "; - ret += "\"" + k + "\":\"" + v + "\""; - } - - return ret + "}"; -} -#endif - EthashCPUMiner::EthashCPUMiner(GenericMiner::ConstructionInfo const& _ci): GenericMiner(_ci), Worker("miner" + toString(index())) { @@ -107,36 +85,5 @@ void EthashCPUMiner::workLoop() std::string EthashCPUMiner::platformInfo() { - string baseline = toString(std::thread::hardware_concurrency()) + "-thread CPU"; -#if ETH_CPUID || !ETH_TRUE - if (!cpuid_present()) - return baseline; - struct cpu_raw_data_t raw; - struct cpu_id_t data; - if (cpuid_get_raw_data(&raw) < 0) - return baseline; - if (cpu_identify(&raw, &data) < 0) - return baseline; - map m; - m["vendor"] = data.vendor_str; - m["codename"] = data.cpu_codename; - m["brand"] = data.brand_str; - m["L1 cache"] = toString(data.l1_data_cache); - m["L2 cache"] = toString(data.l2_cache); - m["L3 cache"] = toString(data.l3_cache); - m["cores"] = toString(data.num_cores); - m["threads"] = toString(data.num_logical_cpus); - m["clocknominal"] = toString(cpu_clock_by_os()); - m["clocktested"] = toString(cpu_clock_measure(200, 0)); - /* - printf(" MMX : %s\n", data.flags[CPU_FEATURE_MMX] ? "present" : "absent"); - printf(" MMX-extended: %s\n", data.flags[CPU_FEATURE_MMXEXT] ? "present" : "absent"); - printf(" SSE : %s\n", data.flags[CPU_FEATURE_SSE] ? "present" : "absent"); - printf(" SSE2 : %s\n", data.flags[CPU_FEATURE_SSE2] ? "present" : "absent"); - printf(" 3DNow! : %s\n", data.flags[CPU_FEATURE_3DNOW] ? "present" : "absent"); - */ - return jsonEncode(m); -#else - return baseline; -#endif + return toString(std::thread::hardware_concurrency()) + "-thread CPU"; }