From e96bbee747324c63b44a52d9e264e724fbad9700 Mon Sep 17 00:00:00 2001 From: je-cook <81617086+je-cook@users.noreply.github.com> Date: Wed, 23 Aug 2023 11:32:59 +0100 Subject: [PATCH] Fix python version discovery (#2833) --- CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a08b07c..c63c0ffa 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,22 +1,23 @@ # CMake file for Pythonic PROCESS -# Author : K. Zarebski (UKAEA) -# Date : last modified 2020-11-09 +# Author : PROCESS Team (UKAEA) +# Date : last modified 2023-07-24 # Specify the minimum version for CMake # 3.12 is required due to use of list TRANSFORM commands -CMAKE_MINIMUM_REQUIRED(VERSION 3.13) +# 3.15 for cmake policy CMP0094 +CMAKE_MINIMUM_REQUIRED(VERSION 3.15) # Set project name PROJECT(process LANGUAGES Fortran) +cmake_policy(SET CMP0094 NEW) + # Ensure python3 interpreter is used if(CMAKE_HOST_APPLE) SET(CMAKE_FIND_FRAMEWORK NEVER) set(CMAKE_MACOSX_RPATH ON) endif() -SET(Python3_FIND_VIRTUALENV FIRST) - # Python 3.8 or greater find_package(Python3 3.8 COMPONENTS Interpreter Development)