Skip to content

Commit

Permalink
Fix PERL_EXECUTABLE to be a native path, so that system() works.
Browse files Browse the repository at this point in the history
  • Loading branch information
qris committed Dec 17, 2015
1 parent a5c185b commit 3d26fce
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion infrastructure/cmake/CMakeLists.txt
Expand Up @@ -4,6 +4,14 @@ 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
infrastructure/BoxPlatform.pm
contrib/mac_osx/org.boxbackup.bbackupd.plist
Expand Down Expand Up @@ -272,4 +280,5 @@ find_library(pcred_lib_path pcred ${base_dir}/../pcre-win32/lib)
target_link_libraries(lib_common PUBLIC "${pcreposixd_lib_path}" "${pcred_lib_path}")

# Define the location of the Perl executable, needed by testbackupstorefix
target_compile_definitions(test_backupstorefix PRIVATE -DPERL_EXECUTABLE="${PERL_EXECUTABLE}")
cmake_to_native_path(PERL_EXECUTABLE perl_executable_native)
target_compile_definitions(test_backupstorefix PRIVATE -DPERL_EXECUTABLE="${perl_executable_native}")

0 comments on commit 3d26fce

Please sign in to comment.