-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
89 lines (83 loc) · 2.39 KB
/
CMakeLists.txt
File metadata and controls
89 lines (83 loc) · 2.39 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
cmake_minimum_required(VERSION 3.12)
project(qubic-cli CXX)
set (CMAKE_CXX_STANDARD 17)
# keep the lists sorted alphabetically
SET(FILES ${CMAKE_SOURCE_DIR}/asset_utils.cpp
${CMAKE_SOURCE_DIR}/connection.cpp
${CMAKE_SOURCE_DIR}/contracts.cpp
${CMAKE_SOURCE_DIR}/file_upload.cpp
${CMAKE_SOURCE_DIR}/key_utils.cpp
${CMAKE_SOURCE_DIR}/main.cpp
${CMAKE_SOURCE_DIR}/msvault.cpp
${CMAKE_SOURCE_DIR}/node_utils.cpp
${CMAKE_SOURCE_DIR}/nostromo.cpp
${CMAKE_SOURCE_DIR}/oracle_utils.cpp
${CMAKE_SOURCE_DIR}/proposal.cpp
${CMAKE_SOURCE_DIR}/qbond.cpp
${CMAKE_SOURCE_DIR}/qearn.cpp
${CMAKE_SOURCE_DIR}/qpi_adapter.cpp
${CMAKE_SOURCE_DIR}/qswap.cpp
${CMAKE_SOURCE_DIR}/quottery.cpp
${CMAKE_SOURCE_DIR}/qutil.cpp
${CMAKE_SOURCE_DIR}/qvault.cpp
${CMAKE_SOURCE_DIR}/qx.cpp
${CMAKE_SOURCE_DIR}/sc_utils.cpp
${CMAKE_SOURCE_DIR}/test_utils.cpp
${CMAKE_SOURCE_DIR}/wallet_utils.cpp
${CMAKE_SOURCE_DIR}/utils.cpp
)
SET(HEADER_FILES
argparser.h
asset_utils.h
common_functions.h
connection.h
contracts.h
defines.h
fourq_qubic.h
global.h
k12_and_key_utils.h
key_utils.h
logger.h
msvault.h
node_utils.h
nostromo.h
qpi_adapter.h
oracle_utils.h
prompt.h
proposal.h
qbond.h
qearn.h
qswap.h
qswap_struct.h
quottery.h
qutil.h
qvault.h
qx.h
qx_struct.h
sanity_check.h
sc_utils.h
structs.h
test_utils.h
utils.h
wallet_utils.h
)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
ADD_EXECUTABLE(qubic-cli main.cpp ${FILES} ${HEADER_FILES})
set_property(TARGET qubic-cli PROPERTY COMPILE_WARNING_AS_ERROR ON)
target_include_directories(qubic-cli PUBLIC ${CMAKE_SOURCE_DIR}/submodules)
target_include_directories(qubic-cli PUBLIC ${CMAKE_SOURCE_DIR}/submodules/core)
target_include_directories(qubic-cli PUBLIC ${CMAKE_SOURCE_DIR}/submodules/core/src)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_compile_options(${PROJECT_NAME} PRIVATE -mrdrnd -mavx2)
endif()
# to make clang++ shut up about "first argument in call to 'memcpy' is a pointer to non-trivially copyable type 'id'"
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-nontrivial-memaccess)
endif()
ADD_LIBRARY(fourq-qubic SHARED fourq_qubic.cpp)
set_property(TARGET fourq-qubic PROPERTY SOVERSION 1)
target_compile_options(fourq-qubic PRIVATE -DBUILD_4Q_LIB)
install(TARGETS fourq-qubic LIBRARY)
install(TARGETS qubic-cli RUNTIME)