From 351706c6640bb2b2847c2850b3f963542ddddd4e Mon Sep 17 00:00:00 2001 From: Oleh Nikolaiev Date: Mon, 13 Mar 2023 11:03:12 +0000 Subject: [PATCH 1/2] cleanup cmake --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 08845156..05a7091a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,7 +139,7 @@ if ( APPLE ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wparentheses -Wunused -Wno-error=deprecated-copy -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=maybe-uninitialized -Wunreachable-code -Wextra -fPIC -std=c++17") else() if (EMSCRIPTEN) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++17")#-Werror -Wall -Wparentheses -Wunused -Wno-error=deprecated-copy -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=maybe-uninitialized -Wunreachable-code -Wextra -Wno-error=int-in-bool-context + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++17") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wunreachable-code -Wextra -Wno-error=deprecated-copy -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=maybe-uninitialized -Wno-error=int-in-bool-context -fPIC -std=c++17") if( CMAKE_BUILD_TYPE STREQUAL "Debug" ) @@ -287,7 +287,6 @@ if(BUILD_TESTS) COMMAND ./bls_unit_test COMMAND ./dkg_unit_test COMMAND ./bls_test - COMMAND ./dkg_attack COMMAND ./utils_unit_test DEPENDS bls_unit_test dkg_unit_test WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} From 670648f74c18a91e0ce02b4e53bb41894769989a Mon Sep 17 00:00:00 2001 From: Oleh Nikolaiev Date: Mon, 13 Mar 2023 11:05:40 +0000 Subject: [PATCH 2/2] cleanup cmake --- cmake/BlsFindClangFormat.cmake | 2 +- threshold_encryption/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/BlsFindClangFormat.cmake b/cmake/BlsFindClangFormat.cmake index 1965411d..03bda64d 100644 --- a/cmake/BlsFindClangFormat.cmake +++ b/cmake/BlsFindClangFormat.cmake @@ -7,7 +7,7 @@ if( ( NOT DEFINED BLS_CLANG_FORMAT_BIN_NAME ) OR ( "${BLS_CLANG_FORMAT_BIN_NAME} # unset( BLS_CLANG_FORMAT_FOUND ) unset( BLS_CLANG_FORMAT_BIN_NAME ) - set( VARIANTS_OF_BLS_CLANG_FORMAT_BIN_NAME clang-format-10 ) # clang-format-7.0 clang-format-8.0 clang-format + set( VARIANTS_OF_BLS_CLANG_FORMAT_BIN_NAME clang-format-10 ) foreach( BLS_CLANG_FORMAT_WALK_VAR IN LISTS VARIANTS_OF_BLS_CLANG_FORMAT_BIN_NAME ) execute_process( COMMAND bash -c "which ${BLS_CLANG_FORMAT_WALK_VAR}" OUTPUT_VARIABLE BLS_CLANG_FORMAT_BIN_NAME ) if( ( DEFINED BLS_CLANG_FORMAT_BIN_NAME ) AND ( NOT "${BLS_CLANG_FORMAT_BIN_NAME}" STREQUAL "" ) ) diff --git a/threshold_encryption/CMakeLists.txt b/threshold_encryption/CMakeLists.txt index 1e901bc2..180eb340 100644 --- a/threshold_encryption/CMakeLists.txt +++ b/threshold_encryption/CMakeLists.txt @@ -52,7 +52,6 @@ target_link_libraries(te PRIVATE ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_L if (EMSCRIPTEN) add_executable(encrypt ../threshold_encryption/encryptMessage.cpp) - # "-Oz --closure=1 -s EXIT_RUNTIME=1 -s USE_PTHREADS=0 -s MODULARIZE -s EXPORTED_FUNCTIONS=['_encryptMessage'] -s EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]' -s ALLOW_MEMORY_GROWTH=1 --bind" set_target_properties(encrypt PROPERTIES LINK_FLAGS "-s EXIT_RUNTIME=1 -s USE_PTHREADS=0 -s MODULARIZE -s ALLOW_MEMORY_GROWTH=1 -s EXPORTED_RUNTIME_METHODS='[\"ccall\", \"allocate\", \"intArrayFromString\", \"ALLOC_NORMAL\", \"UTF8ToString\"]' -s MAIN_MODULE=1 --bind") target_include_directories(encrypt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${THIRD_PARTY_DIR}) target_link_libraries(encrypt PRIVATE te ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY})