-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional patches for a more warning-free build
See also: lancaster-university/microbit-dal#467
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Author: wdoekes | ||
Date: 2022-05-01 | ||
Description: silence CMake complaining about CMAKE_FORCE_CXX_COMPILER | ||
It sure looks like more cmake code could be removed, but replacing this | ||
silences these warnings: | ||
CMake Deprecation Warning at CMakeForceCompiler.cmake:75 (message): | ||
The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set | ||
CMAKE_C_COMPILER and allow CMake to identify the compiler. | ||
|
||
--- a/yotta_targets/mbed-gcc/CMake/toolchain.cmake 2022-05-01 18:41:02.312968861 +0200 | ||
+++ b/yotta_targets/mbed-gcc/CMake/toolchain.cmake 2022-05-01 18:46:50.216029108 +0200 | ||
@@ -72,11 +72,8 @@ set(CMAKE_MODULE_LINKER_FLAGS_INIT | ||
) | ||
set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_MODULE_LINKER_FLAGS_INIT} -Wl,-wrap,main") | ||
|
||
-# Set the compiler to ARM-GCC | ||
-include(CMakeForceCompiler) | ||
- | ||
-cmake_force_c_compiler("${ARM_NONE_EABI_GCC}" GNU) | ||
-cmake_force_cxx_compiler("${ARM_NONE_EABI_GPP}" GNU) | ||
+set(CMAKE_C_COMPILER arm-none-eabi-gcc) | ||
+set(CMAKE_CXX_COMPILER arm-none-eabi-g++) | ||
|
||
# post-process elf files into .bin files: | ||
function(yotta_apply_target_rules target_type target_name) |
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,20 @@ | ||
Author: wdoekes | ||
Date: 2022-05-01 | ||
Description: silence CMake complaining about CMP0017 being removed | ||
I'm not sure if we need that CMP0017 ordering. Without it, the build | ||
still works, so removing might be fine. Before, we had these warnings: | ||
CMake Deprecation Warning at CMakeLists.txt:16 (cmake_policy): | ||
The OLD behavior for policy CMP0017 will be removed from a future version | ||
of CMake. | ||
|
||
--- /usr/share/yotta/yotta/lib/templates/base_CMakeLists.txt 2022-05-01 18:44:50.864336461 +0200 | ||
+++ /usr/share/yotta/yotta/lib/templates/base_CMakeLists.txt 2022-05-01 18:44:54.640326530 +0200 | ||
@@ -14,7 +14,7 @@ add_custom_target(all_tests) | ||
|
||
# always use the CMAKE_MODULE_PATH-provided .cmake files, even when including | ||
# from system directories: | ||
-cmake_policy(SET CMP0017 OLD) | ||
+#cmake_policy(SET CMP0017 OLD) | ||
|
||
# toolchain file for {{ target_name }} | ||
set(CMAKE_TOOLCHAIN_FILE "{{ toolchain_file | replaceBackslashes }}") |