mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
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:
@@ -247,10 +247,8 @@ if(CONFIG_BUILD_PIC)
|
|||||||
add_link_options(-Wl,--emit-relocs)
|
add_link_options(-Wl,--emit-relocs)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_compile_options(
|
add_compile_options(-Wno-attributes -Wno-unknown-pragmas
|
||||||
-Wno-attributes -Wno-unknown-pragmas
|
$<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>)
|
||||||
$<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>
|
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>)
|
|
||||||
|
|
||||||
# When all C++ code is built using GCC 7.1 or a higher version, we can safely
|
# 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."
|
# 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)
|
add_compile_options(-Wno-psabi)
|
||||||
|
|
||||||
|
if(NOT CONFIG_LIBCXXTOOLCHAIN)
|
||||||
|
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CONFIG_CXX_STANDARD)
|
if(CONFIG_CXX_STANDARD)
|
||||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=${CONFIG_CXX_STANDARD}>)
|
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=${CONFIG_CXX_STANDARD}>)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user