-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
executable file
·40 lines (30 loc) · 1.49 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
cmake_minimum_required(VERSION 3.5)
project(twitse)
option(VCTCXO "DAC controlled VCTCXO" OFF)
if (VCTCXO)
message(STATUS "DAC/VCTCXO enabled")
add_definitions(-DVCTCXO)
endif()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -std=c++11")
# silence the Qt deprecation warnings that arrived somewhere around 5.15
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
# silence spd log "template-id not allowed for constructor in C++20" on gcc 14.2-ish. Update to fix.
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-template-id-cdtor")
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
# These C flags are intended to match a Raspberry Pi 3. For other versions they should be adjusted accordingly.
# See "GCC compiler optimization for ARM-based systems" https://gist.github.com/fm4dd/c663217935dc17f0fc73c9c81b0aa845
# -Wno-psabi silence gcc 7.1 on rpi
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi -march=armv8-a+crc -mfloat-abi=hard -mfpu=neon-fp-armv8 -mtune=cortex-a53")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftree-vectorize -ffast-math -funsafe-math-optimizations -pipe -O2 -g0")
endif()
set(CMAKE_AUTOMOC ON)
set(TWITSEROOT ${CMAKE_CURRENT_SOURCE_DIR})
set(ignoreMe ${CMAKE_PREFIX_PATH})
set(ignoreMe ${QT_QMAKE_EXECUTABLE})
add_custom_target(README SOURCES README.md doc/software.md doc/RPI.md doc/VCTCXO.md .travis.yml)
add_subdirectory(control)
add_subdirectory(util)
add_subdirectory(network)
add_subdirectory(server)
add_subdirectory(client)
add_subdirectory(dataanalysis)