Skip to content

Commit 4dceaa3

Browse files
committed
Set random-seed for sample c sources
1 parent 72d0362 commit 4dceaa3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ if(PROJECT_IS_TOP_LEVEL)
181181
file(GLOB SAMPLE_DIRS CONFIGURE_DEPENDS "samples/*")
182182
foreach(sample_dir ${SAMPLE_DIRS})
183183
get_filename_component(sample_name ${sample_dir} NAME_WLE)
184+
set_property(
185+
SOURCE ${sample_dir}/main.c
186+
APPEND_STRING
187+
PROPERTY COMPILE_FLAGS "-frandom-seed=${sample_dir}/main.c")
184188
add_executable(sample_${sample_name} ${sample_dir}/main.c)
185189
target_link_libraries(sample_${sample_name} PRIVATE ggl-sdk)
186190
install(TARGETS sample_${sample_name})

0 commit comments

Comments
 (0)