Skip to content

Commit

Permalink
add witout_tbb to version info and fix warning when use cmake v3.24+
Browse files Browse the repository at this point in the history
  • Loading branch information
bxq2011hust committed May 8, 2024
1 parent ffa2634 commit 23cc005
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake/CompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")

if (USE_LD_GOLD)
message("CompilerSettings: USE_LD_GOLD")
# message("CompilerSettings: USE_LD_GOLD")
execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if ("${LD_VERSION}" MATCHES "GNU gold")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
Expand Down
7 changes: 7 additions & 0 deletions cmake/Options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ macro(configure_project)
if(TESTS)
set(WITH_TBB ON)
endif()
if(NOT WITH_TBB)
if(NOT DEFINED COMPILE_OPTIONS)
set(COMPILE_OPTIONS "without_tbb")
else()
set(COMPILE_OPTIONS "${COMPILE_OPTIONS},without_tbb")
endif()
endif()
if (WITH_TBB)
add_definitions(-DWITH_TBB)
endif()
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ ExternalProject_Add(boost
https://jaist.dl.sourceforge.net/project/boost/boost/1.85.0/boost_1_85_0.tar.bz2
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/boost_1_85_0.tar.bz2
URL_HASH SHA256=7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617
DOWNLOAD_EXTRACT_TIMESTAMP true
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ${BOOST_BOOTSTRAP_COMMAND}
BUILD_COMMAND ${BOOST_BUILD_TOOL} stage
Expand Down
2 changes: 1 addition & 1 deletion cmake/ProjectCryptopp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ExternalProject_Add(cryptopp
DOWNLOAD_NO_PROGRESS 1
URL https://github.com/abdes/cryptopp-cmake/archive/f857b775bcb4ff24e4993d85cce811587f8b0616.tar.gz
URL_HASH SHA256=e8e350cddc1fdabe3cdd734348686850c66223d77d9d16f71aa7e5c51a57bf72
DOWNLOAD_EXTRACT_TIMESTAMP true
PATCH_COMMAND ${CMAKE_COMMAND} -E remove
3way.cpp
adler32.cpp
Expand Down Expand Up @@ -160,7 +161,6 @@ ExternalProject_Add(cryptopp
)
ExternalProject_Get_Property(cryptopp INSTALL_DIR)
add_library(Cryptopp STATIC IMPORTED)
message(STATUS "CMAKE_OSX_SYSROOT === ${CMAKE_OSX_SYSROOT}")

file(MAKE_DIRECTORY ${CRYPTOPP_INCLUDE_DIR}) # Must exist.

Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectEVMC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ExternalProject_Add(evmc
URL https://github.com/FISCO-BCOS/evmc/archive/4ce1c3b35346db162443a6975ac8801910533138.tar.gz
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/evmc-4ce1c3b3.tar.gz
URL_HASH SHA256=bc75110885ac5524dcbe8af0d3670add5b414697d8154ec2e885b1d6806f9332
DOWNLOAD_EXTRACT_TIMESTAMP true
# GIT_REPOSITORY https://github.com/FISCO-BCOS/evmc.git
# GIT_TAG e0bd9d5dc68ec3a00fe9a3c5e81c98946449a20d
PATCH_COMMAND ${SED_CMMAND} "s#evmc_last_error_msg()#evmc_last_error_msg(void)#g" include/evmc/loader.h COMMAND ${SED_CMMAND} "s#evmc_last_error_msg()#evmc_last_error_msg(void)#g" lib/loader/loader.c
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectEVMONE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ExternalProject_Add(evmone
URL https://github.com/FISCO-BCOS/evmone/archive/b004a8f2057bb2b91fabaa3b13449c62241bcaa8.tar.gz
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/evmone-b004a8f2.tar.gz
URL_HASH SHA256=17fa57d444420f128af315b88e35b55747bb19b6bc1ef63ea01360d3e381a261
DOWNLOAD_EXTRACT_TIMESTAMP true
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DBUILD_SHARED_LIBS=off
-DEVMC_ROOT=<INSTALL_DIR>
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectGroupSig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ExternalProject_Add(GroupSigLib
URL https://github.com/FISCO-BCOS/group-signature-lib/archive/8c30f008e1399afc5be8877231f92a5d90822ad5.tar.gz
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/group_sig_lib-8c30f008.tar.gz
URL_HASH SHA256=ea4cecd6c4cf300d661d006fa870151e84990fe757446738054c70046f0524d5
DOWNLOAD_EXTRACT_TIMESTAMP true
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCRYPTOPP_ROOT=<INSTALL_DIR>
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectJsonCpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ExternalProject_Add(jsoncpp
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/jsoncpp-1.7.7.tar.gz
https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/jsoncpp-1.7.7.tar.gz
URL_HASH SHA256=087640ebcf7fbcfe8e2717a0b9528fff89c52fcf69fa2a18cc2b538008098f97
DOWNLOAD_EXTRACT_TIMESTAMP true
CMAKE_COMMAND ${JSONCPP_CMAKE_COMMAND}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
# Build static lib but suitable to be included in a shared lib.
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectJsonRpcCpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ ExternalProject_Add(jsonrpccpp
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/jsonrcpcpp-0.7.0.tar.gz
https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/jsonrcpcpp-0.7.0.tar.gz
URL_HASH SHA256=669c2259909f11a8c196923a910f9a16a8225ecc14e6c30e2bcb712bab9097eb
DOWNLOAD_EXTRACT_TIMESTAMP true
# On Windows it tries to install this dir. Create it to prevent failure.
PATCH_COMMAND ${CMAKE_COMMAND} -E make_directory <SOURCE_DIR>/win32-deps/include
CMAKE_ARGS ${CMAKE_ARGS}
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectLevelDB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ExternalProject_Add(leveldb
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/leveldb-1.20.tar.gz
https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/leveldb-1.20.tar.gz
URL_HASH SHA256=f5abe8b5b209c2f36560b75f32ce61412f39a2922f7045ae764a2c23335b6664
DOWNLOAD_EXTRACT_TIMESTAMP true
BUILD_IN_SOURCE 1
LOG_CONFIGURE 1
LOG_BUILD 1
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectLibFF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ExternalProject_Add(libff
URL https://github.com/scipr-lab/libff/archive/03b719a7c81757071f99fc60be1f7f7694e51390.tar.gz
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/libff-03b719a7.tar.gz
URL_HASH SHA256=81b476089af43025c8f253cb1a9b5038a1c375baccffea402fa82042e608ab02
DOWNLOAD_EXTRACT_TIMESTAMP true
CMAKE_ARGS
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
Expand Down
2 changes: 2 additions & 0 deletions cmake/ProjectLibzdb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ExternalProject_Add(mysqlclient
https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/mysql-connector-c-6.1.11-src.tar.gz
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/mysql-connector-c-6.1.11-src.tar.gz
URL_HASH SHA256=c8664851487200162b38b6f3c8db69850bd4f0e4c5ff5a6d161dbfb5cb76b6c4
DOWNLOAD_EXTRACT_TIMESTAMP true
#please make sure MYSQL_TCP_PORT is set and not equal to 3306
CMAKE_ARGS -DMYSQL_TCP_PORT=3305 -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/deps/
BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/deps/lib/libmysqlclient.a
Expand All @@ -37,6 +38,7 @@ ExternalProject_Add(libzdb DEPENDS mysqlclient
URL https://tildeslash.com/libzdb/dist/libzdb-3.2.tar.gz
https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/libzdb-3.2.tar.gz
URL_HASH SHA256=005ddf4b29c6db622e16303298c2f914dfd82590111cea7cfd09b4acf46cf4f2
DOWNLOAD_EXTRACT_TIMESTAMP true
BUILD_IN_SOURCE 1
LOG_CONFIGURE 1
LOG_BUILD 1
Expand Down
3 changes: 2 additions & 1 deletion cmake/ProjectMHD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ ExternalProject_Add(mhd
DOWNLOAD_NO_PROGRESS 1
DOWNLOAD_NAME libmicrohttpd-0.9.63.tar.gz
URL https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.63.tar.gz
https://mirrors.ustc.edu.cn/gnu/libmicrohttpd/libmicrohttpd-0.9.63.tar.gz
https://mirrors.ustc.edu.cn/gnu/libmicrohttpd/libmicrohttpd-0.9.63.tar.gz
https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/libmicrohttpd-0.9.63.tar.gz
URL_HASH SHA256=37c36f1be177f0e37ef181a645cd3baac1000bd322a01c2eff70f3cc8c91749c
DOWNLOAD_EXTRACT_TIMESTAMP true
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ${MHD_CONFIG}
LOG_CONFIGURE 1
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectMPIR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ExternalProject_Add(mpir
URL https://github.com/FISCO-BCOS/mpir/archive/47910ac631c599774577b155a33fa3a372155c1d.tar.gz
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/mpir-cmake-47910ac6.tar.gz
URL_HASH SHA256=f09fab14ce96624ddfb2803f515326b9fbb503010258fd8b74d290ea205b463c
DOWNLOAD_EXTRACT_TIMESTAMP true
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_INSTALL_LIBDIR=lib
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectPaillier.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ExternalProject_Add(paillier
URL https://github.com/FISCO-BCOS/paillier-lib/archive/1daf3b23b01121e8522a8b264be933f6d236fdb8.tar.gz
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/paillier-1daf3b23.tar.gz
URL_HASH SHA256=574c8315961ea2ba9534a739675172a0e580ca140c9b2a6fb1008aaf608ae1c9
DOWNLOAD_EXTRACT_TIMESTAMP true
BUILD_IN_SOURCE 1
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectRocksDB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ExternalProject_Add(rocksdb
URL https://codeload.github.com/facebook/rocksdb/tar.gz/v6.29.3
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/rocksdb-v6.29.3.tar.gz
URL_HASH SHA256=724e4cba2db6668ff6a21ecabcce0782cd0c8e386796e7e9a14a8260e0600abd
DOWNLOAD_EXTRACT_TIMESTAMP true
# remove dynamic lib and gtest. NOTE: sed line number should update once RocksDB upgrade
PATCH_COMMAND ${SED_CMMAND} "s#-march=native#${MARCH_TYPE} ${COMPILER_FLAGS} #g" CMakeLists.txt COMMAND ${SED_CMMAND} "s#-Werror##g" CMakeLists.txt
BUILD_IN_SOURCE 1
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectSecp256k1.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ExternalProject_Add(secp256k1
URL https://github.com/FISCO-BCOS/secp256k1/archive/ac8ccf29b8c6b2b793bc734661ce43d1f952977a.tar.gz
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/secp256k1-ac8ccf29.tar.gz
URL_HASH SHA256=02f8f05c9e9d2badc91be8e229a07ad5e4984c1e77193d6b00e549df129e7c3a
DOWNLOAD_EXTRACT_TIMESTAMP true
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_LIST_DIR}/secp256k1/CMakeLists.txt <SOURCE_DIR>
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectSnappy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ExternalProject_Add(snappy
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/snappy-1.1.7.tar.gz
https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/snappy-1.1.7.tar.gz
URL_HASH SHA256=3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4
DOWNLOAD_EXTRACT_TIMESTAMP true
CMAKE_COMMAND ${CMAKE_COMMAND}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_INSTALL_LIBDIR=lib
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectTASSL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ExternalProject_Add(tassl
URL https://github.com/FISCO-BCOS/TASSL/archive/5d2100b378063bc9ffce0bb703784ab6053848ce.tar.gz
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/tassl_1.0.2-5d2100.tar.gz
URL_HASH SHA256=aab236c3da193192c6754dc86130bb5bb307aa2e4865fc01797a1c868c9b1971
DOWNLOAD_EXTRACT_TIMESTAMP true
# GIT_REPOSITORY https://github.com/jntass/TASSL.git
# GIT_TAG ccdfc64c5f56988f76abc0390a12ed9865bc49e9
# GIT_SHALLOW true
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectTBB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ExternalProject_Add(tbb
URL https://codeload.github.com/oneapi-src/oneTBB/tar.gz/refs/tags/v2021.12.0
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/oneTBB-2021.12.tar.gz
URL_HASH SHA256=c7bb7aa69c254d91b8f0041a71c5bcc3936acb64408a1719aec0b2b7639dd84f
DOWNLOAD_EXTRACT_TIMESTAMP true
BUILD_IN_SOURCE 1
LOG_CONFIGURE 1
LOG_BUILD 1
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectTCMalloc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ExternalProject_Add(gperftools
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/gperftools-2.7.tar.gz
https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/gperftools-2.7.tar.gz
URL_HASH SHA256=1ee8c8699a0eff6b6a203e59b43330536b22bbcbe6448f54c7091e5efb0763c9
DOWNLOAD_EXTRACT_TIMESTAMP true
BUILD_IN_SOURCE 1
LOG_CONFIGURE 1
LOG_BUILD 1
Expand Down
1 change: 1 addition & 0 deletions cmake/ProjectVRF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ ExternalProject_Add(libvrf
URL https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/libvrf-rust1.47_0303.tar.gz
https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/FISCO-BCOS/FISCO-BCOS/deps/libvrf-rust1.47-0303.tar.gz
URL_HASH SHA256=afcd18e52b57516f92f7a7901c0bdedcc488e43dd8401d0e06cf0963db15bd07
DOWNLOAD_EXTRACT_TIMESTAMP true
BUILD_IN_SOURCE 1
LOG_CONFIGURE 1
LOG_BUILD 1
Expand Down

0 comments on commit 23cc005

Please sign in to comment.