Skip to content

Commit

Permalink
Merge branch 'topic/timw/cmake-find-package'
Browse files Browse the repository at this point in the history
* topic/timw/cmake-find-package:
  Remove recommentation of find_package(PythonInterp)
  Print deprecation warning for FindRequiredPackage
  • Loading branch information
timwoj committed Aug 2, 2023
2 parents 50c5bf9 + 8671e73 commit 7a8069c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions FindRequiredPackage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
# endif ()

macro (FindRequiredPackage packageName)
message(DEPRECATION "Remove in v7.1. Use find_package's REQUIRED argument instead.")

string(TOUPPER ${packageName} upperPackageName)
if ((DEFINED ${upperPackageName}_ROOT_DIR) AND (DEFINED CMAKE_PREFIX_PATH))
set(CMAKE_PREFIX_SAVE ${CMAKE_PREFIX_PATH})
Expand Down
4 changes: 2 additions & 2 deletions FindSubnetTree.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#
# Usage of this module as follows:
#
# find_package(PythonInterp REQUIRED)
# find_package(Python REQUIRED COMPONENTS Interpreter)
# find_package(SubnetTree)
#
# Variables defined by this module:
#
# SUBNETTREE_FOUND Python successfully imports SubnetTree module

if (NOT SUBNETTREE_FOUND)
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import SubnetTree"
execute_process(COMMAND "${Python_EXECUTABLE}" -c "import SubnetTree"
RESULT_VARIABLE SUBNETTREE_IMPORT_RESULT)

if (SUBNETTREE_IMPORT_RESULT)
Expand Down

0 comments on commit 7a8069c

Please sign in to comment.