From 5812ca06d67eefb30b6824bf8d85dd6fdfa591aa Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 14 Mar 2018 18:09:31 +0100 Subject: [PATCH] Fixed ctest on Windows (should call Perl's prove.bat, not just prove) --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b860068b..cb3d6dfd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,18 +52,21 @@ endif() add_subdirectory(xs) +get_filename_component(PERL_BIN_PATH "${PERL_EXECUTABLE}" DIRECTORY) if (MSVC) # By default the startup project in MSVC is the 'ALL_BUILD' cmake-created project, # but we want 'slic3r' as the startup one because debugging run command is associated with it. # (Unfortunatelly it cannot be associated with ALL_BUILD using CMake.) # Note: For some reason this needs to be set in the top-level CMakeLists.txt set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT XS) + set(PERL_PROVE "${PERL_BIN_PATH}/prove.bat") +else () + set(PERL_PROVE "${PERL_BIN_PATH}/prove") endif () enable_testing () -get_filename_component(PERL_BIN_PATH "${PERL_EXECUTABLE}" DIRECTORY) -add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_BIN_PATH}/prove -I ${PROJECT_SOURCE_DIR}/local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/xs) -add_test (NAME integration COMMAND "${PERL_EXECUTABLE}" ${PERL_BIN_PATH}/prove WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) +add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} -I ${PROJECT_SOURCE_DIR}/local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/xs) +add_test (NAME integration COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) install(PROGRAMS slic3r.pl DESTINATION bin RENAME slic3r-prusa3d)