Skip to content

Commit 696e1a3

Browse files
xuxin930xiaoxiang781216
authored andcommitted
cmake(fix warning):toolchain do not have parent scope
toolchain file variable is global scope dont need set parent scope clear warning: CMake Warning (dev) at /github/workspace/sources/nuttx/arch/arm/src/cmake/gcc.cmake:69 (set): Cannot set "GCCVER": current scope has no parent. Call Stack (most recent call first): /github/workspace/sources/nuttx/arch/arm/src/cmake/Toolchain.cmake:56 (include) /github/workspace/sources/nuttx/build/CMakeFiles/3.26.0/CMakeSystem.cmake:6 (include) /github/workspace/sources/nuttx/build/CMakeFiles/CMakeScratch/TryCompile-ZJVOZO/CMakeLists.txt:5 (project) This warning is for project developers. Use -Wno-dev to suppress it. Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
1 parent 7e27eb6 commit 696e1a3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arch/arm/src/cmake/gcc.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ execute_process(COMMAND ${CMAKE_C_COMPILER} --version
6666
OUTPUT_VARIABLE GCC_VERSION_OUTPUT)
6767
string(REGEX MATCH "\\+\\+.* ([0-9]+)\\.[0-9]+" GCC_VERSION_REGEX
6868
"${GCC_VERSION_OUTPUT}")
69-
set(GCCVER
70-
${CMAKE_MATCH_1}
71-
PARENT_SCOPE)
69+
set(GCCVER ${CMAKE_MATCH_1})
7270

7371
if(GCCVER EQUAL 12)
7472
add_compile_options(--param=min-pagesize=0)

0 commit comments

Comments
 (0)