1
0
Fork 0
forked from nuttx/nuttx-update

arch/risc-v/src/cmake/Toolchain.cmake: Msys2 Cmake fixed nuttx/config.h: No such file or directory

fixed
/qemu-rv/qemu_rv_head.S:25:10: fatal error: nuttx/config.h: No such file or directory
   25 | #include <nuttx/config.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

added

# override the responsible file flag

if(CMAKE_GENERATOR MATCHES "Ninja")
  set(CMAKE_C_RESPONSE_FILE_FLAG "$DEFINES $INCLUDES $FLAGS @")
  set(CMAKE_CXX_RESPONSE_FILE_FLAG "$DEFINES $INCLUDES $FLAGS @")
  set(CMAKE_ASM_RESPONSE_FILE_FLAG "$DEFINES $INCLUDES $FLAGS @")
endif()
This commit is contained in:
simbit18 2024-11-26 14:45:23 +01:00 committed by Xiang Xiao
parent 573115734d
commit 430c2ecf46

View file

@ -110,6 +110,14 @@ endif()
set(NO_LTO "-fno-lto")
# override the responsible file flag
if(CMAKE_GENERATOR MATCHES "Ninja")
set(CMAKE_C_RESPONSE_FILE_FLAG "$DEFINES $INCLUDES $FLAGS @")
set(CMAKE_CXX_RESPONSE_FILE_FLAG "$DEFINES $INCLUDES $FLAGS @")
set(CMAKE_ASM_RESPONSE_FILE_FLAG "$DEFINES $INCLUDES $FLAGS @")
endif()
# override the ARCHIVE command
set(CMAKE_ARCHIVE_COMMAND "<CMAKE_AR> rcs <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_RANLIB_COMMAND "<CMAKE_RANLIB> <TARGET>")