Skip to content

Commit

Permalink
cmake: silence "LOAD segment with RWX permissions" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
marckleinebudde committed Jun 4, 2024
1 parent 77731d6 commit 19d7a76
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.13)
cmake_minimum_required(VERSION 3.18)
project(candleLightFirmware C ASM)
include(CheckLinkerFlag)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -39,6 +40,11 @@ add_link_options(
LINKER:--print-memory-usage
)

check_linker_flag(C "LINKER:--no-warn-rwx-segments" LINKER_SUPPORTS_NO_WARN_RWX_SEGMENTS)
if(LINKER_SUPPORTS_NO_WARN_RWX_SEGMENTS)
add_link_options(LINKER:--no-warn-rwx-segments)
endif()

add_subdirectory(libs/STM32_HAL)
add_subdirectory(libs/STM32_USB_Device_Library)
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake )
Expand Down

0 comments on commit 19d7a76

Please sign in to comment.