diff options
author | bubnikv <bubnikv@gmail.com> | 2018-03-14 20:09:31 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2018-03-14 20:09:31 +0300 |
commit | 5812ca06d67eefb30b6824bf8d85dd6fdfa591aa (patch) | |
tree | 960366fae87ee632a175fbbe951ff34fc15fc59e | |
parent | 7c027ee2ff8e63d992ae367f14d363d6a94742d2 (diff) |
Fixed ctest on Windows (should call Perl's prove.bat, not just prove)
-rw-r--r-- | CMakeLists.txt | 9 |
1 files 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) |