diff --git a/CMakeLists.txt b/CMakeLists.txt index 428b06f29..83a4e21fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -240,9 +240,15 @@ else() -Wall -Wextra -Werror=return-type) endif() +###################################################### +# Samples +if (BUILD_SAMPLES) + add_subdirectory(sample_nodes) +endif() + ###################################################### # Test -if (BUILD_UNIT_TESTS) +if (BUILD_UNIT_TESTS AND BUILD_SAMPLES) add_subdirectory(tests) endif() @@ -276,7 +282,6 @@ if(BUILD_TOOLS) add_subdirectory(tools) endif() -if( BUILD_EXAMPLES ) - add_subdirectory(sample_nodes) +if(BUILD_EXAMPLES AND BUILD_SAMPLES) add_subdirectory(examples) endif()