Skip to content

Commit ac4a245

Browse files
Fix ChibiOS Cmake build warnings (#1730)
***NO_CI***
1 parent 54a8d10 commit ac4a245

File tree

16 files changed

+35
-17
lines changed

16 files changed

+35
-17
lines changed

CMake/ChibiOS-Contrib.CMakeLists.cmake.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# See LICENSE file in the project root for full license information.
44
#
55

6+
cmake_minimum_required(VERSION 3.15)
7+
68
project(ChibiOS-Contrib-download NONE)
79

810
include(ExternalProject)

CMake/Modules/CHIBIOS_STM32F0xx_sources.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS})
7777

7878
CMAKE_FIND_ROOT_PATH_BOTH
7979
)
80-
# message("${SRC_FILE} >> ${CHIBIOS_F0_SRC_FILE}") # debug helper
80+
if (BUILD_VERBOSE)
81+
message("${SRC_FILE} >> ${CHIBIOS_F0_SRC_FILE}") # debug helper
82+
endif()
8183
list(APPEND CHIBIOS_SOURCES ${CHIBIOS_F0_SRC_FILE})
8284
endforeach()
8385

CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS})
8686

8787
CMAKE_FIND_ROOT_PATH_BOTH
8888
)
89-
# message("${SRC_FILE} >> ${CHIBIOS_F4_SRC_FILE}") # debug helper
89+
if (BUILD_VERBOSE)
90+
message("${SRC_FILE} >> ${CHIBIOS_F4_SRC_FILE}") # debug helper
91+
endif()
9092
list(APPEND CHIBIOS_SOURCES ${CHIBIOS_F4_SRC_FILE})
9193
endforeach()
9294

CMake/Modules/CHIBIOS_STM32F7xx_sources.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS})
8787

8888
CMAKE_FIND_ROOT_PATH_BOTH
8989
)
90-
# message("${SRC_FILE} >> ${CHIBIOS_F7_SRC_FILE}") # debug helper
90+
if (BUILD_VERBOSE)
91+
message("${SRC_FILE} >> ${CHIBIOS_F7_SRC_FILE}") # debug helper
92+
endif()
9193
list(APPEND CHIBIOS_SOURCES ${CHIBIOS_F7_SRC_FILE})
9294
endforeach()
9395

CMake/Modules/CHIBIOS_STM32H7xx_sources.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS})
8888

8989
CMAKE_FIND_ROOT_PATH_BOTH
9090
)
91-
# message("${SRC_FILE} >> ${CHIBIOS_H7_SRC_FILE}") # debug helper
91+
if (BUILD_VERBOSE)
92+
message("${SRC_FILE} >> ${CHIBIOS_H7_SRC_FILE}") # debug helper
93+
endif()
9294
list(APPEND CHIBIOS_SOURCES ${CHIBIOS_H7_SRC_FILE})
9395
endforeach()
9496

CMake/Modules/CHIBIOS_STM32L0xx_sources.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS})
7777

7878
CMAKE_FIND_ROOT_PATH_BOTH
7979
)
80-
# message("${SRC_FILE} >> ${CHIBIOS_L0_SRC_FILE}") # debug helper
80+
if (BUILD_VERBOSE)
81+
message("${SRC_FILE} >> ${CHIBIOS_L0_SRC_FILE}") # debug helper
82+
endif()
8183
list(APPEND CHIBIOS_SOURCES ${CHIBIOS_L0_SRC_FILE})
8284
endforeach()
8385

CMake/Modules/CHIBIOS_STM32L4xx_sources.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS})
8686

8787
CMAKE_FIND_ROOT_PATH_BOTH
8888
)
89-
# message("${SRC_FILE} >> ${CHIBIOS_L4_SRC_FILE}") # debug helper
89+
if (BUILD_VERBOSE)
90+
message("${SRC_FILE} >> ${CHIBIOS_L4_SRC_FILE}") # debug helper
91+
endif()
9092
list(APPEND CHIBIOS_SOURCES ${CHIBIOS_L4_SRC_FILE})
9193
endforeach()
9294

CMake/Modules/FindCHIBIOS.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,13 @@ foreach(SRC_FILE ${CHIBIOS_SRCS})
171171

172172
CMAKE_FIND_ROOT_PATH_BOTH
173173
)
174-
#message("${SRC_FILE} >> ${CHIBIOS_SRC_FILE}") # debug helper
174+
if (BUILD_VERBOSE)
175+
message("${SRC_FILE} >> ${CHIBIOS_SRC_FILE}") # debug helper
176+
endif()
175177
list(APPEND CHIBIOS_SOURCES ${CHIBIOS_SRC_FILE})
176178
endforeach()
177179

178180

179181
include(FindPackageHandleStandardArgs)
180182

181-
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CHIBIOS DEFAULT_MSG CHIBIOS_INCLUDE_DIRS CHIBIOS_SOURCES)
183+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ChibiOS DEFAULT_MSG CHIBIOS_INCLUDE_DIRS CHIBIOS_SOURCES)

CMake/Modules/FindChibiOS-Contrib.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ list(APPEND CHIBIOS_CONTRIB_SOURCES ${PROJECT_BINARY_DIR}/ChibiOS-Contrib_Source
4343
list(APPEND CHIBIOS_CONTRIB_SOURCES ${PROJECT_BINARY_DIR}/ChibiOS-Contrib_Source/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c)
4444

4545
include(FindPackageHandleStandardArgs)
46-
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CHIBIOS_CONTRIB DEFAULT_MSG CHIBIOS_CONTRIB_INCLUDE_DIRS CHIBIOS_CONTRIB_SOURCES)
46+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ChibiOS-Contrib DEFAULT_MSG CHIBIOS_CONTRIB_INCLUDE_DIRS CHIBIOS_CONTRIB_SOURCES)

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ cmake_minimum_required(VERSION 3.15)
88
include(CMakeToolsHelpers OPTIONAL)
99
include(ExternalProject)
1010

11-
set(CMAKE_VERBOSE_MAKEFILE 1) # debug helper
11+
if (BUILD_VERBOSE)
12+
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "ON" FORCE) # debug helper
13+
endif()
1214

1315
# the following prevents launchin a build in the source tree
1416
set(CMAKE_DISABLE_SOURCE_CHANGES ON)

0 commit comments

Comments
 (0)