]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Make directory for output files.
authorVladislav Shchapov <vladislav@shchapov.ru>
Thu, 12 May 2022 13:36:42 +0000 (18:36 +0500)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sun, 15 May 2022 18:03:54 +0000 (20:03 +0200)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
cmake/run-and-compare.cmake

index 16f4821e55223444df4dc1e5de162216e8e14269..eb2218dcb5f2d467846c96e7083dbe22730cdddc 100644 (file)
@@ -16,6 +16,10 @@ if(NOT DEFINED OUTPUT OR NOT DEFINED COMPARE OR NOT DEFINED COMMAND)
     message(FATAL_ERROR "Run and compare arguments missing")
 endif()
 
+# Ensure directory exists for output files
+get_filename_component(OUTPUT_DIR "${OUTPUT}" DIRECTORY)
+file(MAKE_DIRECTORY "${OUTPUT_DIR}")
+
 if(INPUT)
     # Run command with stdin input and redirect stdout to output
     execute_process(COMMAND ${CMAKE_COMMAND}