diff options
| author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-06-29 13:11:12 (GMT) |
|---|---|---|
| committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-06-29 15:07:56 (GMT) |
| commit | 9b45210b052c7c81ab84313c4a3b537e66c2a7b7 (patch) | |
| tree | 91a232e58d2f8cdb52c7ed8c81c6ae49e861b8fa /Tests/FindPython/IronPython3 | |
| parent | c24be2ffe726f876a5b4c235848b24bc3fe5f5e2 (diff) | |
| download | CMake-9b45210b052c7c81ab84313c4a3b537e66c2a7b7.zip CMake-9b45210b052c7c81ab84313c4a3b537e66c2a7b7.tar.gz CMake-9b45210b052c7c81ab84313c4a3b537e66c2a7b7.tar.bz2 | |
FindPython: Add tests for IronPython v3
Diffstat (limited to 'Tests/FindPython/IronPython3')
| -rw-r--r-- | Tests/FindPython/IronPython3/CMakeLists.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Tests/FindPython/IronPython3/CMakeLists.txt b/Tests/FindPython/IronPython3/CMakeLists.txt new file mode 100644 index 0000000..b09097a --- /dev/null +++ b/Tests/FindPython/IronPython3/CMakeLists.txt @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.5) + +project(TestIronPython3 LANGUAGES NONE) + +set (Python3_FIND_IMPLEMENTATIONS "IronPython") + +find_package(Python3 COMPONENTS Interpreter Compiler) +if (NOT Python3_FOUND) + message (FATAL_ERROR "Failed to find Python 3") +endif() + +if (NOT Python3_Interpreter_FOUND) + message (FATAL_ERROR "Failed to find Python 3 Interpreter") +endif() +if (NOT Python3_INTERPRETER_ID STREQUAL "IronPython") + message (FATAL_ERROR "Erroneous interpreter ID (${Python3_INTERPRETER_ID})") +endif() + +if (NOT Python3_Compiler_FOUND) + message (FATAL_ERROR "Failed to find Python 3 Compiler") +endif() +if (NOT Python3_COMPILER_ID STREQUAL "IronPython") + message (FATAL_ERROR "Erroneous compiler ID (${Python3_COMPILER_ID})") +endif() + +if(NOT TARGET Python3::Interpreter) + message(SEND_ERROR "Python3::Interpreter not found") +endif() +if(NOT TARGET Python3::Compiler) + message(SEND_ERROR "Python3::Compiler not found") +endif() |
