Cmake file complete for build on ThumbDV_Release

Next will be working on the other two builds
This commit is contained in:
Hayley 2019-07-10 12:29:16 -05:00
parent b3bb649501
commit e7049021f1

View file

@ -4,15 +4,18 @@ project(thumbdv)
set(CMAKE_C_STANDARD 11)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION gnu)
set(CMAKE_VERBOSE_MAKEFILE ON)
## Setting up the four types of builds we have
set(CMAKE_CONFIGURATION_TYPES "ThumbDV_Debug;ThumbDV_Release" CACHE STRING "" FORCE)
include_directories(.)
include_directories(include)
include_directories(lib)
include_directories(SmartSDR_Interface)
include_directories(ThumbDV)
include_directories(SmartSDR_Interface)
link_directories(/src/flex/smoothlake/firmware/src/Firmware/lib
/src/flex/smartsdr-dsp/DSP_API/lib)
add_executable(thumbdv
SmartSDR_Interface/cmd_basics.c
@ -34,8 +37,43 @@ add_executable(thumbdv
ThumbDV/slow_data.c
ThumbDV/thumbDV.c
circular_buffer.c
main.c
resampler.c)
resampler.c
main.c)
if (CMAKE_BUILD_TYPE MATCHES ThumbDV_Release)
target_compile_options(thumbdv PRIVATE
-U_FORTIFY_SOURCE
-c
-fmessage-length=0
-lpthread
-MMD
-MP)
endif()
TARGET_LINK_LIBRARIES(thumbdv PRIVATE
ftd2xx
rt
pthread
dl
m)
if (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES ThumbDV_Debug)
target_compile_definitions(thumbdv PRIVATE
DEBUG)
endif()
target_link_options(thumbdv INTERFACE
-Map=Firmware.map)
target_compile_options(thumbdv PRIVATE
-O3
-mcpu=cortex-a8
-mfpu=neon
-mfloat-abi=softfp
-ftree-vectorize
-Wall
)
add_custom_command(TARGET thumbdv POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:thumbdv> /nfsroots/microburst/home/root)