Skip to content

Commit

Permalink
Merge pull request #198 from skalenetwork/cleanup-CMAKE
Browse files Browse the repository at this point in the history
Cleanup cmake
  • Loading branch information
olehnikolaiev authored Mar 13, 2023
2 parents fb280f8 + 670648f commit f9fcfd0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion cmake/BlsFindClangFormat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 "" ) )
Expand Down
1 change: 0 additions & 1 deletion threshold_encryption/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit f9fcfd0

Please sign in to comment.