testing/cxx-oot-build: Exclude cxx-oot-build in CMake projects.

Remove the previous guard logic and use a proper CMake
`exclude` rule to prevent `cxx-oot-build` from being
included when building projects with CMake.

* Ensures OOT test project is not pulled into normal apps.
* Keeps CI and export tests isolated from regular builds.

Signed-off-by: trns1997 <trns1997@gmail.com>
This commit is contained in:
trns1997 2025-09-26 21:24:27 +02:00 committed by Xiang Xiao
parent ddf1dcc3ff
commit a44d65c939
2 changed files with 20 additions and 28 deletions

View file

@ -20,5 +20,5 @@
#
# ##############################################################################
nuttx_add_subdirectory()
nuttx_add_subdirectory(EXCLUDE cxx-oot-build)
nuttx_generate_kconfig(MENUDESC "Testing")

View file

@ -22,10 +22,6 @@
cmake_minimum_required(VERSION 3.12...3.31)
# --- Guard option ---
option(BUILD_OOTCPP "Build the Out Of Tree C++ project" OFF)
if(BUILD_OOTCPP)
project(
OOTCpp
VERSION 1.0
@ -52,7 +48,3 @@ if(BUILD_OOTCPP)
COMMAND ${CMAKE_OBJCOPY} -S -O binary ${CMAKE_BINARY_DIR}/${EXE_NAME}
${CMAKE_BINARY_DIR}/${EXE_NAME}.bin
COMMENT "Generating binary image ${EXE_NAME}.bin")
else()
message(STATUS "Skipping OOTCpp project")
endif()