blob: ae50f32c99a649121c42464e0a6c9a0b19363604 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
cmake_minimum_required(VERSION 3.1)
project(TestRequiredArtifacts LANGUAGES C)
include(CTest)
find_package(Python2 REQUIRED COMPONENTS Interpreter Development)
if (NOT Python2_FOUND)
message (FATAL_ERROR "Failed to find Python 2")
endif()
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
if (NOT Python3_FOUND)
message (FATAL_ERROR "Failed to find Python 3")
endif()
add_test(NAME FindPython.RequiredArtifacts.Interpreter.VALID COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
"${CMake_SOURCE_DIR}/Tests/FindPython/RequiredArtifacts/Check"
"${CMake_BINARY_DIR}/Tests/FindPython/RequiredArtifacts/Interpreter.VALID"
${build_generator_args}
--build-project TestRequiredArtifacts.Check
--build-options -DPYTHON_IS_FOUND=TRUE -DCHECK_INTERPRETER=ON
"-DPython3_EXECUTABLE=${Python3_EXECUTABLE}"
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
add_test(NAME FindPython.RequiredArtifacts.Interpreter.INVALID COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
"${CMake_SOURCE_DIR}/Tests/FindPython/RequiredArtifacts/Check"
"${CMake_BINARY_DIR}/Tests/FindPython/RequiredArtifacts/Interpreter.INVALID"
${build_generator_args}
--build-project TestRequiredArtifacts.Check
--build-options -DPYTHON_IS_FOUND=FALSE -DCHECK_INTERPRETER=ON
"-DPython3_EXECUTABLE=${Python3_EXECUTABLE}-bad${CMAKE_EXECUTABLE_SUFFIX}"
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
add_test(NAME FindPython.RequiredArtifacts.Library.VALID COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
"${CMake_SOURCE_DIR}/Tests/FindPython/RequiredArtifacts/Check"
"${CMake_BINARY_DIR}/Tests/FindPython/RequiredArtifacts/Library.VALID"
${build_generator_args}
--build-project TestRequiredArtifacts.Check
--build-options -DPYTHON_IS_FOUND=TRUE -DCHECK_LIBRARY=ON
"-DPython3_LIBRARY=${Python3_LIBRARY_RELEASE}"
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
add_test(NAME FindPython.RequiredArtifacts.Library.INVALID COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
"${CMake_SOURCE_DIR}/Tests/FindPython/RequiredArtifacts/Check"
"${CMake_BINARY_DIR}/Tests/FindPython/RequiredArtifacts/Library.INVALID"
${build_generator_args}
--build-project TestRequiredArtifacts.Check
--build-options -DPYTHON_IS_FOUND=FALSE -DCHECK_LIBRARY=ON
"-DPython3_LIBRARY=${Python2_LIBRARY_RELEASE}"
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
add_test(NAME FindPython.RequiredArtifacts.Include.VALID COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
"${CMake_SOURCE_DIR}/Tests/FindPython/RequiredArtifacts/Check"
"${CMake_BINARY_DIR}/Tests/FindPython/RequiredArtifacts/Include.VALID"
${build_generator_args}
--build-project TestRequiredArtifacts.Check
--build-options -DPYTHON_IS_FOUND=TRUE -DCHECK_INCLUDE=ON
"-DPython3_INCLUDE_DIR=${Python3_INCLUDE_DIRS}"
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
add_test(NAME FindPython.RequiredArtifacts.Include.INVALID COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
"${CMake_SOURCE_DIR}/Tests/FindPython/RequiredArtifacts/Check"
"${CMake_BINARY_DIR}/Tests/FindPython/RequiredArtifacts/Include.INVALID"
${build_generator_args}
--build-project TestRequiredArtifacts.Check
--build-options -DPYTHON_IS_FOUND=FALSE -DCHECK_INCLUDE=ON
"-DPython3_INCLUDE_DIR=${Python2_INCLUDE_DIRS}"
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
add_test(NAME FindPython.RequiredArtifacts.Interpreter-Library.INVALID COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
"${CMake_SOURCE_DIR}/Tests/FindPython/RequiredArtifacts/Check"
"${CMake_BINARY_DIR}/Tests/FindPython/RequiredArtifacts/Interpreter-Library.INVALID"
${build_generator_args}
--build-project TestRequiredArtifacts.Check
--build-options -DPYTHON_IS_FOUND=FALSE -DCHECK_INTERPRETER=ON -DCHECK_LIBRARY=ON
"-DPython3_EXECUTABLE=${Python3_EXECUTABLE}"
"-DPython3_LIBRARY=${Python2_LIBRARY_RELEASE}"
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
add_test(NAME FindPython.RequiredArtifacts.Library-Include.INVALID COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
"${CMake_SOURCE_DIR}/Tests/FindPython/RequiredArtifacts/Check"
"${CMake_BINARY_DIR}/Tests/FindPython/RequiredArtifacts/Library-Include.INVALID"
${build_generator_args}
--build-project TestRequiredArtifacts.Check
--build-options -DPYTHON_IS_FOUND=FALSE -DCHECK_LIBRARY=ON -DCHECK_INCLUDE=ON
"-DPython3_LIBRARY=${Python3_LIBRARY_RELEASE}"
"-DPython3_INCLUDE_DIR=${Python2_INCLUDE_DIRS}"
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
|