Files
edgetx-gx12/companion/src/tests/CMakeLists.txt
T
Neil HorneandGitHub a9812688b0 Companion 2.5 (#555)
* Introduce yaml in Companion

* EdgeTX Companion
Replace some OpenTX refs
Data conversion to v220
Update Timers ui to cater for mode field split

* Fix some simulators crashing when started from Companion

* Disable firmware and app update checking and downloads from companion

* Some more rebranding

* Disable manual download actions and another rebrand

* Fix cmake warning

* Fix mode ON conversion gtests and enable switch in model edit

* Stop update message when updates turned off

* OpenTX #8580 Fixes missing negative sign for telemetry sources

* OpenTX #8604 fix curves tooltip colors

* OpenTX #8616 Fix release notes url references

* OpenTX #8548 Align file sync folder references

* OpenTX #8548 Link field once

* OpenTX #8550 Confirmation prompt before write models and settings to radio

* OpenTX #8550 Translate strings

* Title and splash images

* Change DEB package maintainer

* Start NV14

* NV14 continued

* NV14 sim

* Timer countdownStart data conversion and ui fixes

* Fix screen width

* Merge OpenTX PR 8675

* NV14 sim add computer keys and mouse to activate some functions

* Only allow supported protocols for each module on conversion

* Clear mismatched modules on conversion

* Replace colorlcd theme and layout blobs with detailed data structs in companion

* NV14 has 2 topbar zones

* Fix layout init

* Fix layout init again

* Reset to eepromimportexport.h to main branch

* Import/export does not like enum fields

* Model edit add custom screens tab for color and bw telemetry

* Free memory
2021-09-08 10:56:39 +10:00

32 lines
1.4 KiB
CMake

if(GTEST_INCDIR AND GTEST_SRCDIR AND Qt5Widgets_FOUND)
add_library(gtests-companion-lib STATIC EXCLUDE_FROM_ALL ${GTEST_SRCDIR}/src/gtest-all.cc )
target_include_directories(gtests-companion-lib PUBLIC ${GTEST_INCDIR} ${GTEST_INCDIR}/gtest ${GTEST_SRCDIR})
add_definitions(-DGTESTS)
set(TESTS_PATH ${COMPANION_SRC_DIRECTORY}/tests)
set(RADIO_TESTS_PATH ${RADIO_SRC_DIR}/tests)
configure_file(${TESTS_PATH}/location.h.in ${CMAKE_CURRENT_BINARY_DIR}/location.h @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(WIN32)
target_include_directories(gtests-companion-lib PUBLIC ${WIN_INCLUDE_DIRS})
target_link_libraries(gtests-companion-lib PRIVATE ${WIN_LINK_LIBRARIES})
endif(WIN32)
file(GLOB TEST_SRC_FILES ${TESTS_PATH}/*.cpp)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 ${WARNING_FLAGS}")
use_cxx11() # ensure gnu++11 in CXX_FLAGS with CMake < 3.1
add_executable(gtests-companion EXCLUDE_FROM_ALL ${TEST_SRC_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/location.h.in)
add_dependencies(gtests-companion gtests-companion-lib)
target_link_libraries(gtests-companion gtests-companion-lib simulation firmwares storage common)
message(STATUS "Added optional gtests-companion target")
else()
message(WARNING "WARNING: gtests target will not be available (check that GTEST_INCDIR, GTEST_SRCDIR, and Qt5Widgets are configured).")
endif()