Skip to content

Commit 69384df

Browse files
authored
Build samples independently of examples (#315)
Signed-off-by: Yadunund <[email protected]>
1 parent e125ae7 commit 69384df

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,15 @@ else()
240240
-Wall -Wextra -Werror=return-type)
241241
endif()
242242

243+
######################################################
244+
# Samples
245+
if (BUILD_SAMPLES)
246+
add_subdirectory(sample_nodes)
247+
endif()
248+
243249
######################################################
244250
# Test
245-
if (BUILD_UNIT_TESTS)
251+
if (BUILD_UNIT_TESTS AND BUILD_SAMPLES)
246252
add_subdirectory(tests)
247253
endif()
248254

@@ -276,7 +282,6 @@ if(BUILD_TOOLS)
276282
add_subdirectory(tools)
277283
endif()
278284

279-
if( BUILD_EXAMPLES )
280-
add_subdirectory(sample_nodes)
285+
if(BUILD_EXAMPLES AND BUILD_SAMPLES)
281286
add_subdirectory(examples)
282287
endif()

0 commit comments

Comments
 (0)