-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
64 lines (53 loc) · 1.82 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cmake_minimum_required (VERSION 3.17 FATAL_ERROR)
project (LattiQ
LANGUAGES CXX
DESCRIPTION "Experimental framework for lattice problems on variational quantum algorithms using FastVQA"
VERSION 0.1.0
)
set(CMAKE_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "../bin")
set(DISTRIBUTED OFF)
message(
"DISTRIBUTED=${DISTRIBUTED}"
)
find_package(FastVQA)
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
find_package(MPI)
if(MPI_FOUND AND DISTRIBUTED)
set(DISTRIBUTED_OPTS_FILES ${PROJECT_SOURCE_DIR}/src/lattiq_distributed.cpp)
else()
set(DISTRIBUTED_OPTS_FILES ${PROJECT_SOURCE_DIR}/src/lattiq.cpp)
endif()
file(GLOB SRC_ORIG
"${DISTRIBUTED_OPTS_FILES}"
${PROJECT_SOURCE_DIR}/src/lattice/lattice.cpp
${PROJECT_SOURCE_DIR}/src/lattice/lattice_utils.cpp
${PROJECT_SOURCE_DIR}/src/run_paper_experiment.cpp
${PROJECT_SOURCE_DIR}/src/symbolic_manipulation.cpp
)
file(GLOB SRC_ORIG_AVERAGEDSVP
${PROJECT_SOURCE_DIR}/src/lattice/lattice.cpp
${PROJECT_SOURCE_DIR}/src/lattice/lattice_utils.cpp
${PROJECT_SOURCE_DIR}/src/averaged_svp.cpp
${PROJECT_SOURCE_DIR}/src/averaged_svp_utils.cpp
${PROJECT_SOURCE_DIR}/src/experiment_runner.cpp
${PROJECT_SOURCE_DIR}/src/test_runner.cpp
)
add_subdirectory(src)
add_executable(${PROJECT_NAME} ${SRC_ORIG})
add_executable(averagedSvp ${SRC_ORIG_AVERAGEDSVP} ${PROJECT_SOURCE_DIR}/src/experiment_runner.cpp)
include_directories(
${PROJECT_SOURCE_DIR}/src
)
target_link_libraries(${PROJECT_NAME} fastVQA::FastVQA Eigen3::Eigen fplll gmpxx gmp) #lattice
target_compile_definitions(${PROJECT_NAME}
PRIVATE
QuEST_PREC=4
)
target_link_libraries(averagedSvp fastVQA::FastVQA Eigen3::Eigen fplll gmpxx gmp)
target_compile_definitions(averagedSvp
PRIVATE
QuEST_PREC=4
)