From 8c092e87b40cccc046aa4b0a215a4798548224b0 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 2 Sep 2016 23:45:13 +0100 Subject: Use builtin TO_NATIVE_PATH in CMake instead of rolling our own. --- infrastructure/cmake/CMakeLists.txt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'infrastructure') diff --git a/infrastructure/cmake/CMakeLists.txt b/infrastructure/cmake/CMakeLists.txt index a63f838a..21d35e43 100644 --- a/infrastructure/cmake/CMakeLists.txt +++ b/infrastructure/cmake/CMakeLists.txt @@ -11,14 +11,6 @@ enable_testing() set(base_dir ${CMAKE_SOURCE_DIR}/../..) -macro(cmake_to_native_path cmake_path native_path) - if(WIN32) - string(REPLACE "/" "\\" ${native_path} "${cmake_path}") - else() - set(${native_path} "${cmake_path}") - endif() -endmacro() - set(files_to_configure bin/bbackupd/bbackupd-config bin/bbstored/bbstored-certs @@ -402,6 +394,6 @@ if(READLINE_FOUND) endif() # Define the location of the Perl executable, needed by testbackupstorefix -cmake_to_native_path("${PERL_EXECUTABLE}" perl_executable_native) +file(TO_NATIVE_PATH "${PERL_EXECUTABLE}" perl_executable_native) string(REPLACE "\\" "\\\\" perl_path_escaped ${perl_executable_native}) target_compile_definitions(test_backupstorefix PRIVATE -DPERL_EXECUTABLE="${perl_path_escaped}") -- cgit v1.2.3