forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update OIS version to the latest. Update TF-M platform and settings. Update MDH components file naming and targets. Update toolchain library version. Create build-type profiles to set proper compiler and linker flags. Fix inet test issue - skip TestInetLayer test. Signed-off-by: ATmobica <artur.tynecki@arm.com>
- Loading branch information
Showing
15 changed files
with
363 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# | ||
# Copyright (c) 2023 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
# | ||
# @file | ||
# CMake profile configuration for target | ||
# | ||
|
||
# Set the default build type if none is specified | ||
if(NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE "Release" CACHE | ||
STRING "The build type" FORCE | ||
) | ||
endif() | ||
|
||
set(SUPPORTED_BUILD_TYPES Debug Release) | ||
|
||
# Force the build types to be case-insensitive for checking | ||
set(LOWERCASE_SUPPORTED_BUILD_TYPES ${SUPPORTED_BUILD_TYPES}) | ||
list(TRANSFORM LOWERCASE_SUPPORTED_BUILD_TYPES TOLOWER) | ||
string(TOLOWER ${CMAKE_BUILD_TYPE} LOWERCASE_CMAKE_BUILD_TYPE) | ||
|
||
if(NOT LOWERCASE_CMAKE_BUILD_TYPE IN_LIST LOWERCASE_SUPPORTED_BUILD_TYPES) | ||
message(FATAL_ERROR "Invalid build type '${CMAKE_BUILD_TYPE}'. Possible values:\n ${SUPPORTED_BUILD_TYPES}") | ||
endif() | ||
|
||
include(profiles/${LOWERCASE_CMAKE_BUILD_TYPE}) | ||
|
||
add_library(project_profile INTERFACE) | ||
set_profile_options(project_profile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Copyright (c) 2020-2021 Arm Limited | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Sets profile options | ||
function(set_profile_options target) | ||
set(profile_link_options "") | ||
|
||
if(${CMAKE_C_COMPILER_ID} STREQUAL GNU) | ||
list(APPEND profile_c_compile_options | ||
"-c" | ||
"-Og" | ||
"-g3" | ||
) | ||
target_compile_options(${target} | ||
INTERFACE | ||
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}> | ||
) | ||
|
||
list(APPEND profile_cxx_compile_options | ||
"-c" | ||
"-fno-rtti" | ||
"-Wvla" | ||
"-Og" | ||
"-g3" | ||
) | ||
target_compile_options(${target} | ||
INTERFACE | ||
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}> | ||
) | ||
|
||
list(APPEND profile_asm_compile_options | ||
"-c" | ||
"-x" "assembler-with-cpp" | ||
) | ||
target_compile_options(${target} | ||
INTERFACE | ||
$<$<COMPILE_LANGUAGE:ASM>:${profile_asm_compile_options}> | ||
) | ||
|
||
list(APPEND profile_link_options | ||
"-Wl,--gc-sections" | ||
"-Wl,-n" | ||
) | ||
|
||
target_link_options(${target} | ||
INTERFACE | ||
"-Wl,--gc-sections" | ||
"-Wl,-n" | ||
) | ||
else() | ||
message(FATAL_ERROR "Invalid compiler type '${CMAKE_C_COMPILER_ID}'. Possible values:\n GNU") | ||
endif() | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Copyright (c) 2020-2021 Arm Limited | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Sets profile options | ||
function(set_profile_options target) | ||
set(profile_link_options "") | ||
|
||
if(${CMAKE_C_COMPILER_ID} STREQUAL GNU) | ||
list(APPEND profile_c_compile_options | ||
"-c" | ||
"-O2" | ||
"-g3" | ||
) | ||
target_compile_options(${target} | ||
INTERFACE | ||
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}> | ||
) | ||
|
||
list(APPEND profile_cxx_compile_options | ||
"-c" | ||
"-fno-rtti" | ||
"-Wvla" | ||
"-O2" | ||
"-g3" | ||
) | ||
target_compile_options(${target} | ||
INTERFACE | ||
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}> | ||
) | ||
|
||
list(APPEND profile_asm_compile_options | ||
"-c" | ||
"-x" "assembler-with-cpp" | ||
) | ||
target_compile_options(${target} | ||
INTERFACE | ||
$<$<COMPILE_LANGUAGE:ASM>:${profile_asm_compile_options}> | ||
) | ||
|
||
list(APPEND profile_link_options | ||
"-Wl,--gc-sections" | ||
"-Wl,-n" | ||
) | ||
|
||
target_link_options(${target} | ||
INTERFACE | ||
"-Wl,--gc-sections" | ||
"-Wl,-n" | ||
) | ||
else() | ||
message(FATAL_ERROR "Invalid compiler type '${CMAKE_C_COMPILER_ID}'. Possible values:\n GNU") | ||
endif() | ||
|
||
target_compile_definitions(${target} | ||
INTERFACE | ||
NDEBUG | ||
) | ||
endfunction() |
Oops, something went wrong.