-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (29 loc) · 1.24 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
cmake_minimum_required(VERSION 2.8)
project(ethsnarks-cheerp)
set(CMAKE_VERBOSE_MAKEFILE on)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build.cheerp)
set(USE_ASM OFF)
set(WITH_PROCPS OFF)
set(DEBUG OFF)
set(WITH_SUPERCOP OFF)
set(ETHSNARKS_DISABLE_UTILS ON)
set(ETHSNARKS_NO_THREADS ON)
set(CMAKE_CXX_FLAGS "--std=c++11 -O3 -target cheerp -cheerp-mode=wasm -cheerp-linear-heap-size=256 -fexceptions")
set(CMAKE_C_FLAGS "-O3 -target cheerp -cheerp-mode=wasm")
set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/installroot)
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH on)
set(GMP_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/installroot/lib/libgmp.a)
set(GMP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/installroot/include)
set(GMP_LIBRARIES ${CMAKE_CURRENT_SOURCE_DIR}/installroot/lib/libgmp.a)
set(GMPXX_LIBRARIES libgmpxx)
include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/installroot/include)
add_subdirectory(ethsnarks)
include_directories(ethsnarks/src)
include_directories(
${DEPENDS_DIR}/libsnark
${DEPENDS_DIR}/libsnark/depends/libff
${DEPENDS_DIR}/libfqfft)
add_executable(test_primes test/primes.c)
target_link_libraries(test_primes ${GMP_LIBRARY})
add_executable(test_cheerp test/test_cheerp.cpp)
target_link_libraries(test_cheerp ff)