Tests/BuildDepends: Make 3-second delay more robust
Use "cmake -E sleep 3" instead of execute_process with a TIMEOUT of 3. This avoids using a busy loop or depending on a timeout to kill it.
This commit is contained in:
parent
7019152aa2
commit
e4114ee9e9
|
@ -182,8 +182,7 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message("Waiting 3 seconds...")
|
message("Waiting 3 seconds...")
|
||||||
# any additional argument will cause ${bar} to wait forever
|
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 3)
|
||||||
execute_process(COMMAND ${bar} -infinite TIMEOUT 3 OUTPUT_VARIABLE out)
|
|
||||||
|
|
||||||
message("Modifying Project/foo.cxx")
|
message("Modifying Project/foo.cxx")
|
||||||
write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx
|
write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx
|
||||||
|
|
|
@ -15,11 +15,5 @@ int main(int argc, char** argv)
|
||||||
/* Print out the string that should have been regenerated. */
|
/* Print out the string that should have been regenerated. */
|
||||||
printf("%s\n", regen_string);
|
printf("%s\n", regen_string);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
// if any argument is used, wait forever
|
|
||||||
if (argc>1)
|
|
||||||
{
|
|
||||||
// wait that we get killed...
|
|
||||||
for(;;);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue