Skip to content

Commit 366376e

Browse files
jmcphersronaldtse
authored andcommitted
ensure destination directory exists
1 parent 70f8033 commit 366376e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

PandocMan.cmake

+4
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ function(add_pandoc_man SRC)
111111
message(FATAL_ERROR "File name of a man page must be in the format {name}.{man-number}${MD_EXT}.")
112112
endif()
113113

114+
# Ensure destination directory exists
115+
get_filename_component(DEST_DIR ${DST} DIRECTORY)
116+
file(MAKE_DIRECTORY "${DEST_DIR}")
117+
114118
add_custom_command(
115119
OUTPUT ${DST}
116120
COMMAND ${PANDOCCOMMAND_PATH} -s -t man ${SRC} -o ${DST}

0 commit comments

Comments
 (0)