forked from Zilliqa/Zilliqa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[master] ZIL-4812: support compilation on Mac (Zilliqa#3020)
* ZIL-4812: 1. Remove flag enabling duplicate targets (not supported in Xcode). 2. Remove incorrect CMake variables used to depend on websocketpp. * ZIL-4812: use the same CMAKE_BUILD_TYPE in our cmake scripts that compile dependencies in submodules. * ZIL-4812: 1. Suppress some warnings on AppleClang. 2. Don't include unsupported headers when compiling on Mac. 3. Temporarily leave an empty implementation in 2 functions displaying memory information. * ZIL-4812: some fixes of unnecessary / incorrct flags & target in CMakeLists.txt * ZIL-4812: fix compilation error when appending to a Json::arrayValue * ZIL-4812: 1. Fix some dependencies & include paths. 2. Protection against multiple inclusion of LLVMExtraTools.cmake 3. Workaround against an issue related to protobuf when compiled by vcpkg on x64-osx-dynamic. 4. Some CMakeLists.txt cleanup.
- Loading branch information
1 parent
29be3bb
commit 10bce36
Showing
18 changed files
with
125 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
add_library(AccountData Account.cpp AccountStoreTemp.cpp AccountStoreBase.cpp AccountStoreSC.cpp AccountStoreTrie.cpp AccountStore.cpp AccountStoreAtomic.cpp Transaction.cpp LogEntry.cpp TransactionReceipt.cpp ScillaClient.cpp BloomFilter.cpp EvmClient.cpp EvmClient.h InvokeType.h AccountStoreSCEvm.cpp) | ||
target_include_directories(AccountData PUBLIC ${PROJECT_SOURCE_DIR}/src) | ||
target_link_libraries (AccountData PUBLIC Server Block BlockHeader Message Trie Utils Persistence TraceableDB EthCrypto ${JSONCPP_LINK_TARGETS}) | ||
target_link_libraries (AccountData PUBLIC Server Block BlockHeader Message Trie Utils Persistence TraceableDB EthCrypto jsonrpc::client) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
protobuf_generate_cpp(PROTO_SRC PROTO_HEADER ZilliqaMessage.proto) | ||
|
||
add_library (Message ${PROTO_HEADER} ${PROTO_SRC} Messenger.cpp MessengerAccountStoreBase.cpp MessengerAccountStoreTrie.cpp) | ||
#target_compile_options(Message PRIVATE "-Wno-unused-variable") | ||
#target_compile_options(Message PRIVATE "-Wno-unused-parameter") | ||
add_library (MessageCommon STATIC ${PROTO_SRC}) | ||
target_link_libraries (MessageCommon PUBLIC protobuf::libprotobuf) | ||
|
||
add_library (Message Messenger.cpp MessengerAccountStoreBase.cpp MessengerAccountStoreTrie.cpp) | ||
get_target_property(MESSAGE_COMPILE_FLAGS Message COMPILE_OPTIONS ) | ||
message(STATUS "Message compile flags old = ${MESSAGE_COMPILE_FLAGS}") | ||
list(REMOVE_ITEM MESSAGE_COMPILE_FLAGS -Wextra -Werror) | ||
message(STATUS "Message compile flags new = ${MESSAGE_COMPILE_FLAGS}") | ||
set_target_properties(Message PROPERTIES COMPILE_OPTIONS "${MESSAGE_COMPILE_FLAGS}") | ||
target_include_directories (Message PUBLIC ${PROJECT_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src) | ||
target_link_libraries (Message PUBLIC protobuf::libprotobuf AccountData Block BlockHeader MiningData Utils CoinbaseData) | ||
target_link_libraries (Message PUBLIC MessageCommon AccountData Block BlockHeader MiningData CoinbaseData) | ||
|
||
add_library (MessageSWInfo ${PROTO_HEADER} ${PROTO_SRC} MessengerSWInfo.cpp) | ||
#target_compile_options(MessageSWInfo PRIVATE "-Wno-unused-variable") | ||
#target_compile_options(MessageSWInfo PRIVATE "-Wno-unused-parameter") | ||
add_library (MessageSWInfo MessengerSWInfo.cpp) | ||
get_target_property(MESSAGESWINFO_COMPILE_FLAGS MessageSWInfo COMPILE_OPTIONS ) | ||
message(STATUS "MessageSWInfo compile flags old = ${MESSAGESWINFO_COMPILE_FLAGS}") | ||
list(REMOVE_ITEM MESSAGESWINFO_COMPILE_FLAGS -Wextra -Werror) | ||
message(STATUS "MessageSWInfo compile flags new = ${MESSAGESWINFO_COMPILE_FLAGS}") | ||
set_target_properties(MessageSWInfo PROPERTIES COMPILE_OPTIONS "${MESSAGESWINFO_COMPILE_FLAGS}") | ||
target_include_directories (MessageSWInfo PUBLIC ${PROJECT_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src) | ||
target_link_libraries (MessageSWInfo PUBLIC protobuf::libprotobuf Utils) | ||
target_link_libraries (MessageSWInfo PUBLIC MessageCommon) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.