From 718349098979dcc4a2b13c8d957ef31361dd636b Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Wed, 27 Sep 2023 10:20:30 +0200 Subject: [PATCH] Fix an issue with unescaped paths in the build system This commit fixes an issue with unescaped paths while building the manpages for the netcdf.3 target. This causes problems with a building path that contains spaces. --- libsrc/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsrc/CMakeLists.txt b/libsrc/CMakeLists.txt index 7b9b2aad94..33a870f68a 100644 --- a/libsrc/CMakeLists.txt +++ b/libsrc/CMakeLists.txt @@ -67,11 +67,11 @@ IF(HAVE_M4) IF(NOT MSVC) ADD_CUSTOM_TARGET(manpage ALL - COMMAND ${NC_M4} ${ARGS_MANPAGE} '${CMAKE_CURRENT_BINARY_DIR}/netcdf.m4' > '${CMAKE_CURRENT_BINARY_DIR}/netcdf.3' - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${NC_M4} ${ARGS_MANPAGE} "${CMAKE_CURRENT_BINARY_DIR}/netcdf.m4" > "${CMAKE_CURRENT_BINARY_DIR}/netcdf.3" + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/netcdf.3 DESTINATION "share/man/man3" COMPONENT documentation) + INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/netcdf.3" DESTINATION "share/man/man3" COMPONENT documentation) ENDIF(NOT MSVC) ENDIF()