Skip to content

Commit

Permalink
Update tweaktool to 2.1.5
Browse files Browse the repository at this point in the history
* Increased maximum message size for RPMsg backend from 63.5 KiB to
15.75 MiB
* Improved cross builds for aarch64
* Zephyr support, see https://www.zephyrproject.org/
* Dropped concerto build system, use cmake for TI PSDK builds
* Minimum required CMake version is 3.16
* Introduced new CMakePresets.json for convenience
* Removed pre-built nng, please build nng from source or download a
package for your OS
  • Loading branch information
petr-nechaev committed Nov 15, 2022
1 parent fca42b4 commit 478abaf
Show file tree
Hide file tree
Showing 98 changed files with 2,072 additions and 4,397 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
/out/*
/docker-build/*
CMakeSettings.json
/build*
CMakeUserPresets.json
38 changes: 29 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# ------------------------------------------------------------------------------
# Check CMake version
# ------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.16)

# ------------------------------------------------------------------------------
# Generate project version
Expand All @@ -40,6 +40,9 @@ if(POLICY CMP0092)
cmake_policy(SET CMP0092 NEW)
endif()

# search for additional CMake modules
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

# ------------------------------------------------------------------------------
# Create project
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -71,6 +74,7 @@ cmake_dependent_option(BUILD_CLI "Build command line client" ON "NOT MSVC" OFF)
option(WITH_DOXYGEN "Enable Doxygen-based documentation" OFF)
option(WITH_PYTHON "Build Python 3 binding" ON)
option(WITH_WIRE_NNG "Build NNG wire backend" ON)
option(WITH_TWEAK_GW "Build Tweak RPMSG<=>NNG Gateway app" OFF)
# cmake-format: on

set(WIRE_RPMSG_BACKENDS OFF TI_API CHRDEV)
Expand All @@ -91,7 +95,9 @@ set_property(CACHE TWEAK_COMMON_LOG_LEVEL PROPERTY STRINGS
# Global project configuration
# ------------------------------------------------------------------------------

set(CMAKE_POSITION_INDEPENDENT_CODE YES)
if (WITH_PYTHON)
set(CMAKE_POSITION_INDEPENDENT_CODE YES)
endif()

set(PROJECT_VENDOR "Cogent Embedded, Inc.")
add_definitions(-DPROJECT_VENDOR=\"${PROJECT_VENDOR}\")
Expand All @@ -101,6 +107,10 @@ add_definitions(-DPROJECT_DOMAIN=\"${PROJECT_DOMAIN}\")
add_definitions(-DPROJECT_SUMMARY=\"${PROJECT_SUMMARY}\")
add_definitions(-DPROJECT_FULL_NAME=\"${PROJECT_FULL_NAME}\")

if (CMAKE_SYSTEM_PROCESSOR STREQUAL "TI_ARM_R5F")
add_definitions(-DTI_ARM_R5F)
endif()

set(PROJECT_NAMESPACE tweak2)

set(GUI_TOOL_NAME tweak-gui)
Expand All @@ -109,9 +119,6 @@ set(GUI_TOOL_NAME tweak-gui)
# Dependencies
# ------------------------------------------------------------------------------

# search for additional CMake modules
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

if(BUILD_TESTS)

# Acutest has MIT license
Expand Down Expand Up @@ -146,9 +153,6 @@ include(GenerateExportHeader)
include(AppendToGlobalList)
include(TweakComponentInstall)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

if(CMAKE_BUILD_TYPE STREQUAL "Asan")
if(MSVC)
add_compile_options(/Zi /fsanitize=address
Expand Down Expand Up @@ -201,7 +205,7 @@ if(NO_DEPRECATED_COPY_SUPPORTED)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-copy>)
endif()

if(CMAKE_BUILD_TYPE STREQUAL "Release")
if(CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "TI")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-ffile-prefix-map=${CMAKE_CURRENT_LIST_DIR}=
CXX_FILE_PREFIX_MAP_SUPPORTED)
Expand Down Expand Up @@ -248,6 +252,10 @@ if(BUILD_GUI)
add_subdirectory(tweak-gui-qml)
endif()

if (WITH_TWEAK_GW)
add_subdirectory(tweak-gw)
endif()

# ------------------------------------------------------------------------------
# Generate CMake infrastructure
# ------------------------------------------------------------------------------
Expand All @@ -272,6 +280,18 @@ install(
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAMESPACE}
COMPONENT dev)

if(CMAKE_SYSTEM_NAME STREQUAL "Concerto")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/concerto.mak.in
${CMAKE_CURRENT_BINARY_DIR}/concerto.mak
@ONLY)

install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/concerto.mak"
DESTINATION ${CMAKE_INSTALL_PREFIX}
COMPONENT dev
)
endif()

# ------------------------------------------------------------------------------
# Building docs with collected sets of files
# ------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 478abaf

Please sign in to comment.