From e22807bc2e8f0408c4157ae6dd23c2d25b342bfc Mon Sep 17 00:00:00 2001 From: Koji KITAYAMA <45088311+kkitayam@users.noreply.github.com> Date: Mon, 17 Oct 2022 07:22:25 +0900 Subject: [PATCH] Add a compile option to suppress fopen deprecated warning (#1035) --- tools/elf2uf2/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/elf2uf2/CMakeLists.txt b/tools/elf2uf2/CMakeLists.txt index 070e114..fb5625f 100644 --- a/tools/elf2uf2/CMakeLists.txt +++ b/tools/elf2uf2/CMakeLists.txt @@ -6,4 +6,7 @@ set(CMAKE_CXX_STANDARD 14) add_subdirectory(../../src/common/boot_uf2 boot_uf2_headers) add_executable(elf2uf2 main.cpp) +if (WIN32 AND NOT MINGW AND (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) + target_compile_definitions(elf2uf2 PRIVATE _CRT_SECURE_NO_WARNINGS) +endif() target_link_libraries(elf2uf2 boot_uf2_headers) \ No newline at end of file