-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
With recent versions of cmake, the following two lines produce a warning at configuration time:
Lines 16 to 17 in 7ee9d55
| enable_language(ASM) | |
| set(CMAKE_EXECUTABLE_SUFFIX ".elf") |
The message is as follows:
CMake Warning (dev) at cubemx.cmake/cubemx.cmake:16 (enable_language):
project() should be called prior to this enable_language() call.
Call Stack (most recent call first):
CMakeLists.txt:9 (include)
This warning is for project developers. Use -Wno-dev to suppress it.To fix, commenting out the mentioned two lines suffices. A downstream project using this code should ensure the following two changes:
- The call to
projectcontainsC CXX ASMfor the languages argument - The downstream project sets the executable suffix to
.elf
cmake_minimum_required (VERSION 3.16)
# Possible values: openocd, pyocd, stlink, blackmagic. stlink is default
# set(CMX_DEBUGGER "openocd")
# set(OPENOCD_CFG "${CMAKE_CURRENT_SOURCE_DIR}/openocd.cfg")
set(ARMGCC_TOOLCHAIN_PATH "/opt/gcc-arm-none-eabi-path-as-necessary/bin/")
include(cubemx.cmake/arm-gcc.cmake)
include(cubemx.cmake/cubemx.cmake)
# Other stuff
project(projectname LANGUAGES C CXX ASM)
set(CMAKE_EXECUTABLE_SUFFIX ".elf")Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels