cmake(bugfix):add missing c++ toolchain search path

when libcxx or uClib++ is not selected, we use the default NUTTX cxx

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
xuxin19 2025-07-20 14:10:28 +08:00 committed by Xiang Xiao
parent 9e53aab5b3
commit 956a50bb7d

View file

@ -247,10 +247,8 @@ if(CONFIG_BUILD_PIC)
add_link_options(-Wl,--emit-relocs)
endif()
add_compile_options(
-Wno-attributes -Wno-unknown-pragmas
$<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>
$<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>)
add_compile_options(-Wno-attributes -Wno-unknown-pragmas
$<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>)
# When all C++ code is built using GCC 7.1 or a higher version, we can safely
# disregard warnings of the type "parameter passing for X changed in GCC 7.1."
@ -259,6 +257,10 @@ add_compile_options(
add_compile_options(-Wno-psabi)
if(NOT CONFIG_LIBCXXTOOLCHAIN)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>)
endif()
if(CONFIG_CXX_STANDARD)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=${CONFIG_CXX_STANDARD}>)
endif()