-
Notifications
You must be signed in to change notification settings - Fork 14
/
CMakeLists.txt
78 lines (68 loc) · 2.32 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
cmake_minimum_required(VERSION 3.6)
project(vchsm VERSION 0.1 LANGUAGES CXX)
set(SRC_DIR CppAlgo/src)
# SIMD support (AVX here) (for all build types) and fast floating-point math mode
# this setting applies to all the targets defined after this
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX")
add_compile_options(/arch:AVX /fp:fast /Oi /Ot /GL)
else()
#set(CCMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx")
add_compile_options(-mavx -ffast-math -Ofast)
endif()
add_executable(vchsm
${SRC_DIR}/aaalsf.cpp
${SRC_DIR}/automaticth2wfw.cpp
${SRC_DIR}/bylevdurb.cpp
${SRC_DIR}/bymcaquat.cpp
${SRC_DIR}/clustkmeans.cpp
${SRC_DIR}/comp_delta.cpp
${SRC_DIR}/conv.cpp
${SRC_DIR}/convert_C.cpp
${SRC_DIR}/decomposephase.cpp
${SRC_DIR}/detalsf.cpp
${SRC_DIR}/DynamicTimeWarping.cpp
${SRC_DIR}/extractmfcc.cpp
${SRC_DIR}/f0analysisbyboersma.cpp
${SRC_DIR}/harmonicanalysis.cpp
${SRC_DIR}/HSManalyze.cpp
${SRC_DIR}/HSManalyze_mfcc.cpp
${SRC_DIR}/HSMptraining.cpp
${SRC_DIR}/HSMsynthesize.cpp
${SRC_DIR}/HSMwfwconvert.cpp
${SRC_DIR}/linphaseterm.cpp
${SRC_DIR}/lsfadap.cpp
CppAlgo/example/main.cpp
${SRC_DIR}/mfcc.cpp
${SRC_DIR}/modelSerialization.cpp
${SRC_DIR}/polarityanalysis.cpp
${SRC_DIR}/polytseb.cpp
${SRC_DIR}/PrepareParallelData.cpp
${SRC_DIR}/RealTimeConverter.cpp
${SRC_DIR}/stochalsf.cpp
${SRC_DIR}/stochasticanalysis.cpp
${SRC_DIR}/sumcos.cpp
${SRC_DIR}/train_C.cpp
${SRC_DIR}/trifbank.cpp
${SRC_DIR}/vec2frames.cpp
${SRC_DIR}/WavRW.cpp
)
# C++ 11
target_compile_features(vchsm PUBLIC cxx_std_14)
set_target_properties(vchsm PROPERTIES CXX_EXTENSIONS OFF)
# include directories
target_include_directories(vchsm PRIVATE CppAlgo/external/Eigen3.3.4)
target_include_directories(vchsm PRIVATE CppAlgo/include/vchsm)
# macro NDEBUG in release mode
target_compile_definitions(vchsm PRIVATE "$<$<CONFIG:RELEASE>:NDEBUG>")
# link to the thread lib for <thread>
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)
target_link_libraries(vchsm Threads::Threads)
# set the build type to default release if not specified by the user
if (NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
message(STATUS "Setting build type to ${CMAKE_BUILD_TYPE} since none was specified")
endif()
endif()