-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repairing MacOs build on develop (#3977)
* Turn macos on on CI Signed-off-by: safinsaf <[email protected]> * Debug matrix Signed-off-by: safinsaf <[email protected]> * Check comment body Signed-off-by: safinsaf <[email protected]> * Check new line Signed-off-by: safinsaf <[email protected]> * Check new line Signed-off-by: safinsaf <[email protected]> * Check new line Signed-off-by: safinsaf <[email protected]> * Remove debug data Signed-off-by: safinsaf <[email protected]> * Try gcc for mac Signed-off-by: safinsaf <[email protected]> * Try gcc-10 Signed-off-by: safinsaf <[email protected]> * Debug macos Signed-off-by: safinsaf <[email protected]> * Update gen matrix file Signed-off-by: safinsaf <[email protected]> * Added patch which is fixing vcpkg dependency build of GTest library on MacOS by removing -Werror flag Signed-off-by: Grzegorz Bazior (Yodiss PSA) <[email protected]> * Disabled compilation of iroha-lib for MacOS Signed-off-by: Grzegorz Bazior (Yodiss PSA) <[email protected]> * Move to clang Signed-off-by: safinsaf <[email protected]> --------- Signed-off-by: safinsaf <[email protected]> Signed-off-by: Grzegorz Bazior (Yodiss PSA) <[email protected]> Co-authored-by: safinsaf <[email protected]> Co-authored-by: Grzegorz Bazior (Yodiss PSA) <[email protected]>
- Loading branch information
1 parent
8ba7fc3
commit 80c0636
Showing
5 changed files
with
86 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,55 @@ | ||
####### irohalib_tx_example: | ||
add_executable(irohalib_tx_example | ||
TxExample.cpp | ||
) | ||
if (APPLE) | ||
message("iroha-lib does not support MacOS currently!") | ||
else() | ||
###### irohalib_tx_example: | ||
add_executable(irohalib_tx_example | ||
TxExample.cpp | ||
) | ||
|
||
target_link_libraries(irohalib_tx_example | ||
iroha_lib_model | ||
logger_manager | ||
) | ||
target_link_libraries(irohalib_tx_example | ||
iroha_lib_model | ||
logger_manager | ||
) | ||
|
||
add_install_step_for_bin(irohalib_tx_example) | ||
add_install_step_for_bin(irohalib_tx_example) | ||
|
||
|
||
####### irohalib_batch_example: | ||
add_executable(irohalib_batch_example | ||
BatchExample.cpp | ||
) | ||
###### irohalib_batch_example: | ||
add_executable(irohalib_batch_example | ||
BatchExample.cpp | ||
) | ||
|
||
target_link_libraries(irohalib_batch_example | ||
iroha_lib_model | ||
logger_manager | ||
) | ||
target_link_libraries(irohalib_batch_example | ||
iroha_lib_model | ||
logger_manager | ||
) | ||
|
||
add_install_step_for_bin(irohalib_batch_example) | ||
add_install_step_for_bin(irohalib_batch_example) | ||
|
||
|
||
####### irohalib_query_example: | ||
add_executable(irohalib_query_example | ||
QueryExample.cpp | ||
) | ||
###### irohalib_query_example: | ||
add_executable(irohalib_query_example | ||
QueryExample.cpp | ||
) | ||
|
||
target_link_libraries(irohalib_query_example | ||
iroha_lib_model | ||
logger_manager | ||
) | ||
target_link_libraries(irohalib_query_example | ||
iroha_lib_model | ||
logger_manager | ||
) | ||
|
||
add_install_step_for_bin(irohalib_query_example) | ||
add_install_step_for_bin(irohalib_query_example) | ||
|
||
|
||
####### irohalib_domainassetcreation_example: | ||
add_executable(irohalib_domainassetcreation_example | ||
DomainAssetCreation.cpp | ||
) | ||
###### irohalib_domainassetcreation_example: | ||
add_executable(irohalib_domainassetcreation_example | ||
DomainAssetCreation.cpp | ||
) | ||
|
||
target_link_libraries(irohalib_domainassetcreation_example | ||
iroha_lib_model | ||
logger_manager | ||
gflags | ||
) | ||
target_link_libraries(irohalib_domainassetcreation_example | ||
iroha_lib_model | ||
logger_manager | ||
gflags | ||
) | ||
|
||
add_install_step_for_bin(irohalib_domainassetcreation_example) | ||
add_install_step_for_bin(irohalib_domainassetcreation_example) | ||
endif() |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake | ||
index 11ac1140a..5226367cd 100644 | ||
--- a/ports/gtest/portfile.cmake | ||
+++ b/ports/gtest/portfile.cmake | ||
@@ -12,6 +12,7 @@ vcpkg_from_github( | ||
0002-Fix-z7-override.patch | ||
fix-main-lib-path.patch | ||
fix-build-failure-in-gcc-11.patch | ||
+ removing-werror-compiler-flag.patch | ||
) | ||
|
||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT) | ||
diff --git a/ports/gtest/removing-werror-compiler-flag.patch b/ports/gtest/removing-werror-compiler-flag.patch | ||
new file mode 100644 | ||
index 000000000..2b7339da4 | ||
--- /dev/null | ||
+++ b/ports/gtest/removing-werror-compiler-flag.patch | ||
@@ -0,0 +1,20 @@ | ||
+diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake | ||
+index 4439cb9..e385a5a 100644 | ||
+--- a/googletest/cmake/internal_utils.cmake | ||
++++ b/googletest/cmake/internal_utils.cmake | ||
+@@ -82,13 +82,13 @@ macro(config_compiler_and_linker) | ||
+ # http://stackoverflow.com/questions/3232669 explains the issue. | ||
+ set(cxx_base_flags "${cxx_base_flags} -wd4702") | ||
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||
+- set(cxx_base_flags "-Wall -Wshadow -Werror -Wconversion") | ||
++ set(cxx_base_flags "-Wall -Wshadow -Wconversion") | ||
+ set(cxx_exception_flags "-fexceptions") | ||
+ set(cxx_no_exception_flags "-fno-exceptions") | ||
+ set(cxx_strict_flags "-W -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wredundant-decls") | ||
+ set(cxx_no_rtti_flags "-fno-rtti") | ||
+ elseif (CMAKE_COMPILER_IS_GNUCXX) | ||
+- set(cxx_base_flags "-Wall -Wshadow -Werror") | ||
++ set(cxx_base_flags "-Wall -Wshadow") | ||
+ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0) | ||
+ set(cxx_base_flags "${cxx_base_flags} -Wno-error=dangling-else") | ||
+ endif() |