This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 430c2ecf46 arch/risc-v/src/cmake/Toolchain.cmake: Msys2 Cmake fixed 
nuttx/config.h: No such file or directory
430c2ecf46 is described below

commit 430c2ecf46e8ae129992507d5ba483bc8c9c2f3b
Author: simbit18 <[email protected]>
AuthorDate: Tue Nov 26 14:45:23 2024 +0100

    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()
---
 arch/risc-v/src/cmake/Toolchain.cmake | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/risc-v/src/cmake/Toolchain.cmake 
b/arch/risc-v/src/cmake/Toolchain.cmake
index 3bc71ce57f..f9ebc58cc9 100644
--- a/arch/risc-v/src/cmake/Toolchain.cmake
+++ b/arch/risc-v/src/cmake/Toolchain.cmake
@@ -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>")

Reply via email to