Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/CuraTests.cmake')
-rw-r--r--cmake/CuraTests.cmake30
1 files changed, 12 insertions, 18 deletions
diff --git a/cmake/CuraTests.cmake b/cmake/CuraTests.cmake
index 251bec5781..babb86f745 100644
--- a/cmake/CuraTests.cmake
+++ b/cmake/CuraTests.cmake
@@ -4,18 +4,11 @@
include(CTest)
include(CMakeParseArguments)
-# FIXME: Remove the code for CMake <3.12 once we have switched over completely.
-# FindPython3 is a new module since CMake 3.12. It deprecates FindPythonInterp and FindPythonLibs. The FindPython3
-# module is copied from the CMake repository here so in CMake <3.12 we can still use it.
-if(${CMAKE_VERSION} VERSION_LESS 3.12)
- # Use FindPythonInterp and FindPythonLibs for CMake <3.12
- find_package(PythonInterp 3 REQUIRED)
+# FIXME: The new FindPython3 finds the system's Python3.6 reather than the Python3.5 that we built for Cura's environment.
+# So we're using the old method here, with FindPythonInterp for now.
+find_package(PythonInterp 3 REQUIRED)
- set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
-else()
- # Use FindPython3 for CMake >=3.12
- find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
-endif()
+set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
add_custom_target(test-verbose COMMAND ${CMAKE_CTEST_COMMAND} --verbose)
@@ -56,6 +49,14 @@ function(cura_add_test)
endif()
endfunction()
+
+#Add code style test.
+add_test(
+ NAME "code-style"
+ COMMAND ${Python3_EXECUTABLE} run_mypy.py
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+)
+
#Add test for import statements which are not compatible with all builds
add_test(
NAME "invalid-imports"
@@ -74,13 +75,6 @@ foreach(_plugin ${_plugins})
endif()
endforeach()
-#Add code style test.
-add_test(
- NAME "code-style"
- COMMAND ${Python3_EXECUTABLE} run_mypy.py
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-)
-
#Add test for whether the shortcut alt-keys are unique in every translation.
add_test(
NAME "shortcut-keys"