Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduced required CMake version #498

Merged
merged 1 commit into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions scripts/find_python.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.0)

if(DEFINED ENV{HUNTER_PYTHON_LOCATION})
set(Python_ROOT_DIR $ENV{HUNTER_PYTHON_LOCATION})
set(Python_FIND_STRATEGY LOCATION)
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
find_package(PythonInterp 3 QUIET)
if(NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR "Python not found")
endif()
message(${PYTHON_EXECUTABLE})
else()
cmake_minimum_required(VERSION 3.12)

find_package(Python COMPONENTS Interpreter QUIET)
if(DEFINED ENV{HUNTER_PYTHON_LOCATION})
set(Python_ROOT_DIR $ENV{HUNTER_PYTHON_LOCATION})
set(Python_FIND_STRATEGY LOCATION)
endif()

if(NOT Python_Interpreter_FOUND)
message(FATAL_ERROR "Python not found")
endif()
find_package(Python COMPONENTS Interpreter QUIET)

message(${Python_EXECUTABLE})
if(NOT Python_Interpreter_FOUND)
message(FATAL_ERROR "Python not found")
endif()

message(${Python_EXECUTABLE})
endif()
2 changes: 1 addition & 1 deletion scripts/link-all.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.0)

string(COMPARE EQUAL "${HUNTER_INSTALL_PREFIX}" "" is_empty)
if(is_empty)
Expand Down