-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
50 lines (46 loc) · 1.3 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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
project (CircuitLock)
set (CMAKE_CXX_FLAGS_RELEASE "-O3")
set (CMAKE_CXX_FLAGS_DEBUG "-Wall -ggdb")
set (CMAKE_CXX_LINK_FLAGS "-O3")
set (CMAKE_DEBUG_POSTFIX "-g")
# set the installation to the source bin directory
set (BUILDLOC ${CMAKE_SOURCE_DIR})
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BUILDLOC}/bin)
if (NOT EXISTS ${BUILDLOC}/bin)
file (MAKE_DIRECTORY ${BUILDLOC}/bin)
endif()
add_executable(CircuitLock TechLibrary.cpp Wire.cpp Inst.cpp Circuit.cpp EncryptedCircuit.cpp CrackKey.cpp main.cpp)
target_link_libraries(CircuitLock boost_system boost_program_options)
# testing requires python
enable_testing()
add_test("test_simple"
python
${CMAKE_SOURCE_DIR}/integration_tests/test_simple.py
${BUILDLOC}
${CMAKE_SOURCE_DIR}
)
add_test("test_outcompare"
python
${CMAKE_SOURCE_DIR}/integration_tests/test_outcompare.py
${BUILDLOC}
${CMAKE_SOURCE_DIR}
)
add_test("test_simpxor"
python
${CMAKE_SOURCE_DIR}/integration_tests/test_simpxor.py
${BUILDLOC}
${CMAKE_SOURCE_DIR}
)
add_test("test_aluxor"
python
${CMAKE_SOURCE_DIR}/integration_tests/test_aluxor.py
${BUILDLOC}
${CMAKE_SOURCE_DIR}
)
add_test("test_seqxor"
python
${CMAKE_SOURCE_DIR}/integration_tests/test_seqxor.py
${BUILDLOC}
${CMAKE_SOURCE_DIR}
)