-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
49 lines (43 loc) · 2.02 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
cmake_minimum_required(VERSION 3.9)
project(qudot)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
list(APPEND CMAKE_CXX_FLAGS "-Wall -O3 -march=native -DBOOST_LOG_DYN_LINK")
find_package(OpenMP REQUIRED) # Find the package
#Bring the headers, into the project
include_directories(include /usr/include/mkl /usr/include/tbb)
link_directories($ENV{MKLROOT}/lib/intel64 $ENV{TBBROOT}/lib/intel64/gcc4.7)
#Can manually add the sources using the set command as follows:
#set(SOURCES src/mainapp.cpp src/Student.cpp)
#However, the file(GLOB...) allows for wildcard additions:
#file(GLOB SOURCES "src/*.cpp")
message("C++ compiler flags: ${CMAKE_CXX_FLAGS_RELEASE}")
set(QUDOTVM_SRC
${PROJECT_SOURCE_DIR}/src/common.cpp
${PROJECT_SOURCE_DIR}/include/qudot/fenwicktree.hpp
${PROJECT_SOURCE_DIR}/src/gates/qugate.cpp
${PROJECT_SOURCE_DIR}/src/qumvn.cpp
${PROJECT_SOURCE_DIR}/src/quworld.cpp
${PROJECT_SOURCE_DIR}/src/bytecodes.cpp
${PROJECT_SOURCE_DIR}/src/qudotconfig.cpp
${PROJECT_SOURCE_DIR}/src/qureg.cpp
${PROJECT_SOURCE_DIR}/src/gatestackframe.cpp
${PROJECT_SOURCE_DIR}/src/qudotvm.cpp
${PROJECT_SOURCE_DIR}/src/qufrequency.cpp
${PROJECT_SOURCE_DIR}/src/gates/X.cpp
${PROJECT_SOURCE_DIR}/src/gates/Y.cpp
${PROJECT_SOURCE_DIR}/src/gates/H.cpp
${PROJECT_SOURCE_DIR}/src/gates/R.cpp
${PROJECT_SOURCE_DIR}/src/intrinsics/qft.cpp
${PROJECT_SOURCE_DIR}/src/intrinsics/qftinv.cpp
${PROJECT_SOURCE_DIR}/src/intrinsics/fulladder.cpp
${PROJECT_SOURCE_DIR}/src/intrinsics/comparator.cpp
${PROJECT_SOURCE_DIR}/src/components/feynmanunit.cpp
${PROJECT_SOURCE_DIR}/src/components/heisenbergunit.cpp
${PROJECT_SOURCE_DIR}/src/components/mwlu.cpp
${PROJECT_SOURCE_DIR}/src/components/eprunit.cpp
${PROJECT_SOURCE_DIR}/src/scalemem.cpp
)
add_library(qudot SHARED ${QUDOTVM_SRC})
add_executable(qudotvm ${PROJECT_SOURCE_DIR}/src/qudotapp.cpp ${QUDOTVM_SRC})
target_link_libraries(qudotvm mkl_intel_ilp64 mkl_tbb_thread mkl_core tbb tbbmalloc stdc++ pthread /usr/lib/libboost_log.so.1.76.0 m dl ${OpenMP_CXX_LIBRARIES})