Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unknown CMake command "add_subdirectory_ifdef". #4

Open
AlienSarlak opened this issue Jan 2, 2025 · 1 comment
Open

Unknown CMake command "add_subdirectory_ifdef". #4

AlienSarlak opened this issue Jan 2, 2025 · 1 comment

Comments

@AlienSarlak
Copy link

It seems that the structure of the newer version of Zephyr has changed, making it impossible to compile this sample. While attempting to build, I encountered the following error:

CMake Error at drivers/CMakeLists.txt:4 (add_subdirectory_ifdef):
Unknown CMake command "add_subdirectory_ifdef".

This indicates that the add_subdirectory_ifdef CMake function cannot be found.

I am using:
cmake version 3.22.1

@AlienSarlak
Copy link
Author

AlienSarlak commented Jan 5, 2025

I think the key point to solve this problem is to add set(ZEPHYR_EXTRA_MODULES "${CMAKE_SOURCE_DIR}/modules") (modify "${CMAKE_SOURCE_DIR}/modules" to your module path)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant