-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
152 lines (117 loc) · 4.21 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
cmake_minimum_required(VERSION 3.8)
if (APPLE)
set (CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING
"Minimum OS X deployment version" FORCE)
# Fix behavior of CMAKE_CXX_STANDARD when targeting macOS.
if (POLICY CMP0025)
cmake_policy(SET CMP0025 NEW)
endif ()
endif()
project(voiceSpoofingDetection
VERSION 1.3
DESCRIPTION "Voice spoofing detection and imagined speech experiments"
LANGUAGES CXX)
set(CMAKE_VERBOSE_MAKEFILE ON)
# C++ version
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
#set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
message(STATUS "***********************COMPILING FOR:***********************")
message(STATUS ${CMAKE_SYSTEM})
message(STATUS ${CMAKE_TOOLCHAIN_FILE})
message(STATUS "************************************************************")
###############################################
###############################################
### Executable and libraries configuration ###
###############################################
###############################################
# Executables and its objects
add_executable(voiceSpoofingDetection
src/main.cpp
src/lib/classifiers/NeuralNetwork.cpp
src/lib/classifiers/DistanceClassifier.cpp
src/lib/classifiers/featureVectorsUtils.cpp
src/lib/classifiers/SupportVectorMachine.cpp
src/lib/file/fileUtils.cpp
src/lib/gnuplot/gnuplotCalls.cpp
src/lib/linearAlgebra/linearAlgebra.cpp
src/lib/paraconsistent/paraconsistent.cpp
src/lib/statistics/statistics.cpp
src/lib/statistics/confusionMatrix.cpp
src/lib/utility/comparison.cpp
src/lib/vector/vectorUtils.cpp
src/lib/wave/Wav.cpp
src/lib/wave/filtersOperations.cpp
src/lib/wave/simpleSignalOperations.cpp
src/lib/wavelet/Types.cpp
src/lib/wavelet/waveletOperations.cpp
src/lib/wavelet/WaveletTransformResults.cpp
src/experiments/voiceSpoofing/01/Experiment01.cpp
src/experiments/voiceSpoofing/02/Experiment02.cpp
src/experiments/voiceSpoofing/03/Experiment03.cpp
src/experiments/voiceSpoofing/04/Experiment04.cpp
src/experiments/voiceSpoofing/05/Experiment05.cpp
src/experiments/voiceSpoofing/06/Experiment06.cpp
src/experiments/voiceSpoofing/07/Experiment07.cpp
src/experiments/voiceSpoofing/08/Experiment08.cpp
src/experiments/imagedSpeech/01/Experiment01.cpp
)
# User libraries
target_include_directories(voiceSpoofingDetection
PUBLIC src/lib/classifiers
PUBLIC src/lib/file
PUBLIC src/lib/gnuplot
PUBLIC src/lib/linearAlgebra
PUBLIC src/lib/matplotlib-cpp
PUBLIC src/lib/rapidcsv
PUBLIC src/lib/statistics
PUBLIC src/lib/utility
PUBLIC src/lib/vector
PUBLIC src/lib/wave
PUBLIC src/lib/wavelet
)
# System libraries (python)
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
target_link_libraries(voiceSpoofingDetection PUBLIC
Python3::Python
Python3::Module
)
find_package(Python3 COMPONENTS NumPy)
if(Python3_NumPy_FOUND)
target_link_libraries(voiceSpoofingDetection PUBLIC
Python3::NumPy
)
endif()
include_directories(${Python3_INCLUDE_DIRS})
include_directories(${Python3_NumPy_INCLUDE_DIRS})
# C++ version
target_compile_features(voiceSpoofingDetection PRIVATE cxx_std_20)
########################################
########################################
### Google Unit Testing suite setup ###
########################################
########################################
if (NOT APPLE)
# Locate GTest
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})
# Load paraconsistent tests
add_executable( paraconsistentTests
src/lib/paraconsistent/paraconsistentTest.cpp
src/lib/utility/comparison.cpp
src/lib/linearAlgebra/linearAlgebra.cpp
src/lib/paraconsistent/paraconsistent.cpp
)
# Link paraconsistentTests with what we want to test and the GTest and pthread library
target_link_libraries(paraconsistentTests PUBLIC ${GTEST_LIBRARIES} pthread)
# Load support vector machine tests
add_executable( supportVectorMachineTests
src/lib/vector/vectorUtils.cpp
src/lib/linearAlgebra/linearAlgebra.cpp
src/lib/classifiers/SupportVectorMachine.cpp
src/lib/classifiers/SupportVectorMachineTest.cpp
)
# Link supportVectorMachineTests with what we want to test and the GTest and pthread library
target_link_libraries( supportVectorMachineTests ${GTEST_LIBRARIES} pthread)
endif()