Paweł Bylica
8 years ago
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
8 changed files with
16 additions and
75 deletions
-
BuildInfo.h.in
-
CMakeLists.txt
-
cmake/scripts/buildinfo.cmake
-
ethminer/MinerAux.h
-
ethminer/main.cpp
-
libdevcore/CMakeLists.txt
-
libdevcore/Common.cpp
-
libdevcore/Common.h
|
|
@ -1,7 +1,5 @@ |
|
|
|
#pragma once |
|
|
|
|
|
|
|
#define ETH_PROJECT_VERSION "@PROJECT_VERSION@" |
|
|
|
#define ETH_COMMIT_HASH @ETH_COMMIT_HASH@ |
|
|
|
#define ETH_CLEAN_REPO @ETH_CLEAN_REPO@ |
|
|
|
#define ETH_BUILD_TYPE @ETH_BUILD_TYPE@ |
|
|
|
#define ETH_BUILD_PLATFORM @ETH_BUILD_PLATFORM@ |
|
|
|
#define ETH_BUILD_TYPE "@ETH_BUILD_TYPE@" |
|
|
|
#define ETH_BUILD_PLATFORM "@ETH_BUILD_PLATFORM@" |
|
|
|
|
|
@ -92,8 +92,6 @@ function(createBuildInfo) |
|
|
|
set(_cmake_build_type "${CMAKE_CFG_INTDIR}") |
|
|
|
endif() |
|
|
|
|
|
|
|
message("createBuildInfo()") |
|
|
|
|
|
|
|
# Generate header file containing useful build information |
|
|
|
add_custom_target(BuildInfo.h ALL |
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
|
|
@ -103,9 +101,6 @@ function(createBuildInfo) |
|
|
|
-P "${ETH_SCRIPTS_DIR}/buildinfo.cmake" |
|
|
|
) |
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}) |
|
|
|
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
|
|
|
set(SRC_LIST BuildInfo.h) |
|
|
|
endfunction() |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -17,26 +17,6 @@ if (NOT ETH_BUILD_PLATFORM) |
|
|
|
set(ETH_BUILD_PLATFORM "unknown") |
|
|
|
endif() |
|
|
|
|
|
|
|
execute_process( |
|
|
|
COMMAND git --git-dir=${ETH_SOURCE_DIR}/.git --work-tree=${ETH_SOURCE_DIR} rev-parse HEAD |
|
|
|
OUTPUT_VARIABLE ETH_COMMIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET |
|
|
|
) |
|
|
|
|
|
|
|
if (NOT ETH_COMMIT_HASH) |
|
|
|
set(ETH_COMMIT_HASH 0) |
|
|
|
endif() |
|
|
|
|
|
|
|
execute_process( |
|
|
|
COMMAND git --git-dir=${ETH_SOURCE_DIR}/.git --work-tree=${ETH_SOURCE_DIR} diff --shortstat |
|
|
|
OUTPUT_VARIABLE ETH_LOCAL_CHANGES OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET |
|
|
|
) |
|
|
|
|
|
|
|
if (ETH_LOCAL_CHANGES) |
|
|
|
set(ETH_CLEAN_REPO 0) |
|
|
|
else() |
|
|
|
set(ETH_CLEAN_REPO 1) |
|
|
|
endif() |
|
|
|
|
|
|
|
set(INFILE "${ETH_SOURCE_DIR}/BuildInfo.h.in") |
|
|
|
set(TMPFILE "${ETH_DST_DIR}/BuildInfo.h.tmp") |
|
|
|
set(OUTFILE "${ETH_DST_DIR}/BuildInfo.h") |
|
|
@ -45,4 +25,3 @@ configure_file("${INFILE}" "${TMPFILE}") |
|
|
|
|
|
|
|
include("${ETH_SOURCE_DIR}/cmake/EthUtils.cmake") |
|
|
|
replace_if_different("${TMPFILE}" "${OUTFILE}" CREATE) |
|
|
|
|
|
|
|
|
|
@ -46,7 +46,6 @@ |
|
|
|
#include <libethash-cuda/ethash_cuda_miner.h> |
|
|
|
#endif |
|
|
|
#include <jsonrpccpp/client/connectors/httpclient.h> |
|
|
|
#include "BuildInfo.h" |
|
|
|
#include "FarmClient.h" |
|
|
|
#if ETH_STRATUM |
|
|
|
#include <libstratum/EthStratumClient.h> |
|
|
|
|
|
@ -32,6 +32,8 @@ |
|
|
|
#include <fstream> |
|
|
|
#include <iostream> |
|
|
|
#include "MinerAux.h" |
|
|
|
#include "BuildInfo.h" |
|
|
|
|
|
|
|
using namespace std; |
|
|
|
using namespace dev; |
|
|
|
using namespace dev::eth; |
|
|
@ -57,7 +59,7 @@ void help() |
|
|
|
void version() |
|
|
|
{ |
|
|
|
cout << "ethminer version " << ETH_PROJECT_VERSION << endl; |
|
|
|
cout << "Build: " << DEV_QUOTED(ETH_BUILD_PLATFORM) << "/" << DEV_QUOTED(ETH_BUILD_TYPE) << endl; |
|
|
|
cout << "Build: " << ETH_BUILD_PLATFORM << "/" << ETH_BUILD_TYPE << endl; |
|
|
|
exit(0); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -5,5 +5,4 @@ find_package(Threads) |
|
|
|
|
|
|
|
add_library(devcore ${SOURCES} ${HEADERS}) |
|
|
|
target_link_libraries(devcore PUBLIC Boost::boost) |
|
|
|
target_link_libraries(devcore PRIVATE ${CMAKE_THREAD_LIBS_INIT}) |
|
|
|
#target_include_directories(devcore PRIVATE ..) |
|
|
|
target_link_libraries(devcore PRIVATE Threads::Threads) |
|
|
|
|
|
@ -1,27 +0,0 @@ |
|
|
|
/*
|
|
|
|
This file is part of cpp-ethereum. |
|
|
|
|
|
|
|
cpp-ethereum is free software: you can redistribute it and/or modify |
|
|
|
it under the terms of the GNU General Public License as published by |
|
|
|
the Free Software Foundation, either version 3 of the License, or |
|
|
|
(at your option) any later version. |
|
|
|
|
|
|
|
cpp-ethereum 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 General Public License for more details. |
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License |
|
|
|
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/ |
|
|
|
/** @file Common.cpp
|
|
|
|
* @author Gav Wood <i@gavwood.com> |
|
|
|
* @date 2014 |
|
|
|
*/ |
|
|
|
|
|
|
|
#include "Common.h" |
|
|
|
#include "Exceptions.h" |
|
|
|
#include "Log.h" |
|
|
|
#include "BuildInfo.h" |
|
|
|
using namespace std; |
|
|
|
using namespace dev; |
|
|
@ -48,10 +48,6 @@ |
|
|
|
// CryptoPP defines byte in the global namespace, so must we.
|
|
|
|
using byte = uint8_t; |
|
|
|
|
|
|
|
// Quote a given token stream to turn it into a string.
|
|
|
|
#define DEV_QUOTED_HELPER(s) #s |
|
|
|
#define DEV_QUOTED(s) DEV_QUOTED_HELPER(s) |
|
|
|
|
|
|
|
#define DEV_IGNORE_EXCEPTIONS(X) try { X; } catch (...) {} |
|
|
|
|
|
|
|
#define DEV_IF_NO_ELSE(X) if(!(X)){}else |
|
|
|