diff options
| author | Brad King <brad.king@kitware.com> | 2020-04-29 11:30:14 (GMT) |
|---|---|---|
| committer | Kitware Robot <kwrobot@kitware.com> | 2020-04-29 11:30:24 (GMT) |
| commit | c9fdee6a6753c13acfdc3da439f1e597e6cf645c (patch) | |
| tree | cd5c7a654ed3c4f853c4d80856170b1952ccfd58 /Tests/FindPython/IronPython | |
| parent | fa3acd14ee6337785e577600aa4bc6d441f80f1c (diff) | |
| parent | d2c47c822b50d3cfd23b208c663fbe4f40fcf2f5 (diff) | |
| download | CMake-c9fdee6a6753c13acfdc3da439f1e597e6cf645c.zip CMake-c9fdee6a6753c13acfdc3da439f1e597e6cf645c.tar.gz CMake-c9fdee6a6753c13acfdc3da439f1e597e6cf645c.tar.bz2 | |
Merge topic 'FindPython-find-implementations'
d2c47c822b FindPython: Add capability to specify Python implementations
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4676
Diffstat (limited to 'Tests/FindPython/IronPython')
| -rw-r--r-- | Tests/FindPython/IronPython/CMakeLists.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Tests/FindPython/IronPython/CMakeLists.txt b/Tests/FindPython/IronPython/CMakeLists.txt index c96a3e0..3493c29 100644 --- a/Tests/FindPython/IronPython/CMakeLists.txt +++ b/Tests/FindPython/IronPython/CMakeLists.txt @@ -2,11 +2,20 @@ cmake_minimum_required(VERSION 3.1) project(TestIronPython C) -find_package(Python ${Python_REQUESTED_VERSION} REQUIRED COMPONENTS Interpreter Compiler) +set (Python_FIND_IMPLEMENTATIONS IronPython) + +find_package(Python ${Python_REQUESTED_VERSION} COMPONENTS Interpreter Compiler) if (NOT Python_FOUND) message (FATAL_ERROR "Fail to found Python ${Python_REQUESTED_VERSION}") endif() +if (NOT Python_Interpreter_FOUND) + message (FATAL_ERROR "Fail to found Python Interpreter") +endif() +if (NOT Python_INTERPRETER_ID STREQUAL "IronPython") + message (FATAL_ERROR "Erroneous interpreter ID (${Python_INTERPRETER_ID})") +endif() + if (NOT Python_Compiler_FOUND) message (FATAL_ERROR "Fail to found Python Compiler") endif() |
