blob: 8a8dde485e103f92dafdad228ffee087bd715ad3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
enable_language(C)
set(Python_ARTIFACTS_PREFIX "_V2")
find_package (Python 2 EXACT REQUIRED)
if(NOT Python_V2_FOUND OR NOT Python_FOUND)
message(FATAL_ERROR "Python v2 interpreter not found.")
endif()
if(NOT Python_V2_VERSION_MAJOR VERSION_EQUAL 2)
message(FATAL_ERROR "Python v2 interpreter: wrong major version.")
endif()
set(Python_ARTIFACTS_PREFIX "_V3")
find_package (Python 3 EXACT REQUIRED)
if(NOT Python_V3_FOUND OR NOT Python_FOUND)
message(FATAL_ERROR "Python v3 interpreter not found.")
endif()
if(NOT Python_V3_VERSION_MAJOR VERSION_EQUAL 3)
message(FATAL_ERROR "Python v3 interpreter: wrong major version.")
endif()
|