diff --git a/arch/posix/CMakeLists.txt b/arch/posix/CMakeLists.txt index 635e5a630a6..7262272fb88 100644 --- a/arch/posix/CMakeLists.txt +++ b/arch/posix/CMakeLists.txt @@ -27,6 +27,8 @@ endif() # We use target_link_options() instead add_library(native_simulator INTERFACE) +set(NSI_DIR ${ZEPHYR_BASE}/scripts/native_simulator CACHE PATH "Path to the native simulator") + if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/${CMAKE_HOST_SYSTEM_NAME}.${CMAKE_HOST_SYSTEM_PROCESSOR}.cmake) # @Intent: Set necessary compiler & linker options for this specific host architecture & OS include(${CMAKE_HOST_SYSTEM_NAME}.${CMAKE_HOST_SYSTEM_PROCESSOR}.cmake) diff --git a/boards/posix/native_sim/CMakeLists.txt b/boards/posix/native_sim/CMakeLists.txt index db81d1ad103..5ce0a977745 100644 --- a/boards/posix/native_sim/CMakeLists.txt +++ b/boards/posix/native_sim/CMakeLists.txt @@ -1,7 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 -set(NSI_DIR ${ZEPHYR_BASE}/scripts/native_simulator) - zephyr_library() zephyr_library_compile_definitions(NO_POSIX_CHEATS)