You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/02/24 02:16:03 UTC
(nuttx) branch master updated (3e5d558f4c -> 1b7ddab317)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
from 3e5d558f4c qemu-intel64/ostest: enable DEBUG_FULLOPT
new 92987708ec cmake:adapt BOARD_CONFIG absolute paths and relative paths when reconfig
new 7c1de0a347 cmake:correct the dequote execution of generating config.h
new 1b7ddab317 cmake:adapt the header file symbolic link to the common directory
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
CMakeLists.txt | 9 +++++++--
cmake/nuttx_generate_headers.cmake | 9 +++++++--
cmake/nuttx_mkconfig.cmake | 4 ++--
3 files changed, 16 insertions(+), 6 deletions(-)
(nuttx) 03/03: cmake:adapt the header file symbolic link to the common directory
Posted by xi...@apache.org.
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
commit 1b7ddab3173caf78b5726ac667f67334a9e5ce6a
Author: xuxin19 <xu...@xiaomi.com>
AuthorDate: Thu Feb 22 17:05:52 2024 +0800
cmake:adapt the header file symbolic link to the common directory
fix `board.h` is not set correctly when using cmake to compile a board with common directory
Signed-off-by: xuxin19 <xu...@xiaomi.com>
---
cmake/nuttx_generate_headers.cmake | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/cmake/nuttx_generate_headers.cmake b/cmake/nuttx_generate_headers.cmake
index b4a2049e47..af12b4352a 100644
--- a/cmake/nuttx_generate_headers.cmake
+++ b/cmake/nuttx_generate_headers.cmake
@@ -49,8 +49,13 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/include/arch)
endif()
if(NOT EXISTS ${CMAKE_BINARY_DIR}/include_arch/arch/board)
- nuttx_create_symlink(${NUTTX_BOARD_DIR}/include
- ${CMAKE_BINARY_DIR}/include_arch/arch/board)
+ if(EXISTS ${NUTTX_BOARD_DIR}/include)
+ nuttx_create_symlink(${NUTTX_BOARD_DIR}/include
+ ${CMAKE_BINARY_DIR}/include_arch/arch/board)
+ elseif(EXISTS ${NUTTX_BOARD_DIR}/../common/include)
+ nuttx_create_symlink(${NUTTX_BOARD_DIR}/../common/include
+ ${CMAKE_BINARY_DIR}/include_arch/arch/board)
+ endif()
endif()
if(NOT EXISTS ${CMAKE_BINARY_DIR}/include_arch/arch/chip)
(nuttx) 01/03: cmake:adapt BOARD_CONFIG absolute paths and relative paths when reconfig
Posted by xi...@apache.org.
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
commit 92987708ecb470bbb41f20306cf5fac5c46394e5
Author: xuxin19 <xu...@xiaomi.com>
AuthorDate: Sun Feb 4 21:42:05 2024 +0800
cmake:adapt BOARD_CONFIG absolute paths and relative paths when reconfig
Define `NUTTX_DEFCONFIG` and `NUTTX_BOARD_ABS_DIR` instead of `BOARD_CONFIG`
when reconfiguring a custom configuration,
because ${BOARD_CONFIG} uses a relative path,
it will cause the following error:
CMake Error at CMakeLists.txt:134 (message)
No config file found at
Signed-off-by: xuxin19 <xu...@xiaomi.com>
---
CMakeLists.txt | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e2be1a85c..fce86072c0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,7 +84,12 @@ if(NOT KCONFIGLIB)
$ pip install kconfiglib")
endif()
-if(EXISTS ${BOARD_CONFIG} AND EXISTS ${BOARD_CONFIG}/defconfig)
+# BOARD CONFIG can be set to directory path, or <board-name>[/:]<config-name>
+# configuration pair
+
+if((EXISTS ${BOARD_CONFIG} AND EXISTS ${BOARD_CONFIG}/defconfig)
+ OR (EXISTS ${NUTTX_DIR}/${BOARD_CONFIG}
+ AND EXISTS ${NUTTX_DIR}/${BOARD_CONFIG}/defconfig))
get_filename_component(NUTTX_BOARD_ABS_DIR ${BOARD_CONFIG} ABSOLUTE BASE_DIR
${NUTTX_DIR})
@@ -103,7 +108,7 @@ if(EXISTS ${BOARD_CONFIG} AND EXISTS ${BOARD_CONFIG}/defconfig)
string(REGEX REPLACE "(.*)/(.*)/${NUTTX_CONFIG}" "\\1" NUTTX_BOARD_DIR
${NUTTX_BOARD_ABS_DIR})
- set(NUTTX_DEFCONFIG ${BOARD_CONFIG}/defconfig)
+ set(NUTTX_DEFCONFIG ${NUTTX_BOARD_ABS_DIR}/defconfig)
else()
if(BOARD_CONFIG MATCHES "/")
set(MATCH_REGEX "/")
(nuttx) 02/03: cmake:correct the dequote execution of generating config.h
Posted by xi...@apache.org.
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
commit 7c1de0a347786541a5d8414dbc2c1d3d0b7e10eb
Author: xuxin19 <xu...@xiaomi.com>
AuthorDate: Wed Feb 21 16:44:22 2024 +0800
cmake:correct the dequote execution of generating config.h
handling quotation marks consistent with `cfgdefine.c`
Signed-off-by: xuxin19 <xu...@xiaomi.com>
---
cmake/nuttx_mkconfig.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmake/nuttx_mkconfig.cmake b/cmake/nuttx_mkconfig.cmake
index 19aeee494b..54b2e1072f 100644
--- a/cmake/nuttx_mkconfig.cmake
+++ b/cmake/nuttx_mkconfig.cmake
@@ -87,7 +87,6 @@ foreach(NameAndValue ${ConfigContents})
string(REGEX REPLACE "^[ ]+" "" NameAndValue ${NameAndValue})
string(REGEX MATCH "^CONFIG[^=]+" NAME ${NameAndValue})
string(REPLACE "${NAME}=" "" VALUE ${NameAndValue})
-
if(NAME AND NOT "${VALUE}" STREQUAL "")
if(${VALUE} STREQUAL "y")
file(APPEND ${CONFIG_H} "#define ${NAME} 1\n")
@@ -99,7 +98,8 @@ foreach(NameAndValue ${ConfigContents})
foreach(dequote ${DEQUOTELIST})
if("${NAME}" STREQUAL "${dequote}")
if(NOT "${VALUE}" STREQUAL "\"\"")
- string(REGEX REPLACE "\"" "" VALUE ${VALUE})
+ string(REGEX REPLACE "^\"(.*)\"$" "\\1" VALUE "${VALUE}")
+ string(REGEX REPLACE "\\\\\\\"" "\"" VALUE "${VALUE}")
else()
set(VALUE)
file(APPEND ${CONFIG_H} "#undef ${NAME}\n")