aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDDoSolitary <DDoSolitary@gmail.com>2021-02-05 15:14:22 +0800
committerJakub Jelen <jjelen@redhat.com>2021-02-15 10:04:31 +0100
commitc8b2e68fb85283856dc8ab6bed7f8730a38e93f6 (patch)
treec70c7bf98f2ab42f6962822c28b35c12dc706dbb
parent06799453835d2c6608c074823ccfc399ccc0c525 (diff)
downloadlibssh-master.tar.gz
libssh-master.tar.xz
libssh-master.zip
cmake: Support build directories with special charactersHEADmaster
Signed-off-by: DDoSolitary <DDoSolitary@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
-rw-r--r--CMakeLists.txt4
-rw-r--r--cmake/Modules/FindABIMap.cmake20
2 files changed, 15 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8b4b0bc..1f1925ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -216,10 +216,10 @@ if (WITH_SYMBOL_VERSIONING AND ABIMAP_FOUND)
endif(UPDATE_ABI)
endif (WITH_SYMBOL_VERSIONING AND ABIMAP_FOUND)
-add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source DEPENDS ${_SYMBOL_TARGET})
+add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source DEPENDS ${_SYMBOL_TARGET} VERBATIM)
# Link compile database for clangd
-execute_process(COMMAND cmake -E create_symlink
+execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
"${CMAKE_BINARY_DIR}/compile_commands.json"
"${CMAKE_SOURCE_DIR}/compile_commands.json")
diff --git a/cmake/Modules/FindABIMap.cmake b/cmake/Modules/FindABIMap.cmake
index e0520abd..756955c6 100644
--- a/cmake/Modules/FindABIMap.cmake
+++ b/cmake/Modules/FindABIMap.cmake
@@ -302,12 +302,13 @@ function(get_file_list _TARGET_NAME)
add_custom_target(
${_TARGET_NAME}_int ALL
COMMAND ${CMAKE_COMMAND}
- -DOUTPUT_PATH="${_get_files_list_OUTPUT_PATH}"
- -DDIRECTORIES="${_get_files_list_DIRECTORIES}"
- -DFILES_PATTERNS="${_get_files_list_FILES_PATTERNS}"
+ -DOUTPUT_PATH=${_get_files_list_OUTPUT_PATH}
+ -DDIRECTORIES=${_get_files_list_DIRECTORIES}
+ -DFILES_PATTERNS=${_get_files_list_FILES_PATTERNS}
-P ${_GET_FILES_LIST_SCRIPT}
COMMENT
"Searching for files"
+ VERBATIM
)
if (DEFINED _get_files_list_COPY_TO)
@@ -318,6 +319,7 @@ function(get_file_list _TARGET_NAME)
${_FILES_LIST_OUTPUT_PATH} ${_get_files_list_COPY_TO}
DEPENDS ${_TARGET_NAME}_int
COMMENT "Copying ${_TARGET_NAME} to ${_get_files_list_COPY_TO}"
+ VERBATIM
)
else()
add_custom_target(${_TARGET_NAME} ALL
@@ -369,12 +371,13 @@ function(extract_symbols _TARGET_NAME)
add_custom_target(
${_TARGET_NAME}_int ALL
COMMAND ${CMAKE_COMMAND}
- -DOUTPUT_PATH="${_SYMBOLS_OUTPUT_PATH}"
- -DHEADERS_LIST_FILE="${_HEADERS_LIST_FILE}"
+ -DOUTPUT_PATH=${_SYMBOLS_OUTPUT_PATH}
+ -DHEADERS_LIST_FILE=${_HEADERS_LIST_FILE}
-DFILTER_PATTERN=${_extract_symbols_FILTER_PATTERN}
-P ${_EXTRACT_SYMBOLS_SCRIPT}
DEPENDS ${_extract_symbols_HEADERS_LIST}
COMMENT "Extracting symbols from headers"
+ VERBATIM
)
if (DEFINED _extract_symbols_COPY_TO)
@@ -385,6 +388,7 @@ function(extract_symbols _TARGET_NAME)
${_SYMBOLS_OUTPUT_PATH} ${_extract_symbols_COPY_TO}
DEPENDS ${_TARGET_NAME}_int
COMMENT "Copying ${_TARGET_NAME} to ${_extract_symbols_COPY_TO}"
+ VERBATIM
)
else()
add_custom_target(${_TARGET_NAME} ALL
@@ -449,15 +453,16 @@ function(generate_map_file _TARGET_NAME)
${_TARGET_NAME}_int ALL
COMMAND ${CMAKE_COMMAND}
-DABIMAP_EXECUTABLE=${ABIMAP_EXECUTABLE}
- -DSYMBOLS="${_SYMBOLS_FILE}"
+ -DSYMBOLS=${_SYMBOLS_FILE}
-DCURRENT_MAP=${_generate_map_file_CURRENT_MAP}
- -DOUTPUT_PATH="${_MAP_OUTPUT_PATH}"
+ -DOUTPUT_PATH=${_MAP_OUTPUT_PATH}
-DFINAL=${_generate_map_file_FINAL}
-DBREAK_ABI=${_generate_map_file_BREAK_ABI}
-DRELEASE_NAME_VERSION=${_generate_map_file_RELEASE_NAME_VERSION}
-P ${_GENERATE_MAP_SCRIPT}
DEPENDS ${_generate_map_file_SYMBOLS}
COMMENT "Generating the map ${_TARGET_NAME}"
+ VERBATIM
)
# Add a custom command setting the map as OUTPUT to allow it to be added as
@@ -475,6 +480,7 @@ function(generate_map_file _TARGET_NAME)
${_generate_map_file_COPY_TO}
DEPENDS ${_TARGET_NAME}_int
COMMENT "Copying ${_MAP_OUTPUT_PATH} to ${_generate_map_file_COPY_TO}"
+ VERBATIM
)
else()
add_custom_target(${_TARGET_NAME} ALL