Skip to content

Commit

Permalink
Merge pull request ruslo#1690 from Algomorph/master
Browse files Browse the repository at this point in the history
rename PYTHON_VERSION arg, fix Boost jamfile python line
  • Loading branch information
ruslo authored Dec 22, 2018
2 parents 0bbaacf + c54b2ed commit 22f0d75
Show file tree
Hide file tree
Showing 34 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion cmake/projects/Boost/atomic/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
atomic
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/chrono/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
chrono
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/context/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
context
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/contract/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
contract
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/coroutine/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
coroutine
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/date_time/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
date_time
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/exception/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
exception
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/fiber/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
fiber
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/filesystem/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
filesystem
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/graph/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
graph
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/graph_parallel/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
graph_parallel
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -378,4 +378,4 @@ endif()

hunter_pick_scheme(DEFAULT url_sha1_boost)
hunter_cacheable(Boost)
hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "37")
hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "38")
2 changes: 1 addition & 1 deletion cmake/projects/Boost/hunter.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
boost_component
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/iostreams/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
iostreams
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/locale/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
locale
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/log/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
log
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/math/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
math
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/mpi/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
mpi
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/program_options/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
program_options
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/python/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
python
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/random/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
random
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/regex/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
regex
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
16 changes: 8 additions & 8 deletions cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,15 @@ file(
# handle requested python version if such is specified
hunter_parse_cmake_args_for_keyword(
CMAKE_ARGS "@HUNTER_Boost_CMAKE_ARGS@"
KEYWORD REQUESTED_PYTHON_VERSION
OUTPUT requested_python
KEYWORD PYTHON_VERSION
OUTPUT python_version
)

# set up paths for python in boost.user.jam
if(NOT requested_python STREQUAL "")
find_package(PythonInterp ${requested_python} EXACT QUIET)
if(NOT python_version STREQUAL "")
find_package(PythonInterp ${python_version} EXACT QUIET)
if(NOT PYTHONINTERP_FOUND)
hunter_user_error("Python Interpreter for Python version ${requested_python} not found.")
hunter_user_error("Python Interpreter for Python version ${python_version} not found.")
endif()
set(python_executable ${PYTHON_EXECUTABLE})
execute_process(
Expand All @@ -310,7 +310,7 @@ if(NOT requested_python STREQUAL "")
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT python_process EQUAL 0)
hunter_user_error("Python include directory for Python version ${requested_python} not found.")
hunter_user_error("Python include directory for Python version ${python_version} not found.")
endif()
if(NOT EXISTS "${python_include_directory}")
hunter_internal_error("Directory not found: ${python_include_directory}")
Expand All @@ -322,14 +322,14 @@ if(NOT requested_python STREQUAL "")
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT python_process EQUAL 0)
hunter_user_error("Python runtime library directory for Python version ${requested_python} not found.")
hunter_user_error("Python runtime library directory for Python version ${python_version} not found.")
endif()
if(NOT EXISTS "${python_library_directory}")
hunter_internal_error("Directory not found: ${python_library_directory}")
endif()
file(
APPEND ${boost_user_jam}
"using python : ${requested_python} : \"${python_executable}\" : \"${python_include_directory}\" : \"${python_library_directory}\" ;\n"
"using python : ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} : \"${python_executable}\" : \"${python_include_directory}\" : \"${python_library_directory}\" ;\n"
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion cmake/projects/Boost/serialization/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
serialization
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/signals/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
signals
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/stacktrace/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
stacktrace
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/system/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
system
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/test/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
test
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/thread/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
thread
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/timer/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
timer
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
2 changes: 1 addition & 1 deletion cmake/projects/Boost/wave/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ hunter_download(
Boost
PACKAGE_COMPONENT
wave
PACKAGE_INTERNAL_DEPS_ID "37"
PACKAGE_INTERNAL_DEPS_ID "38"
)
6 changes: 3 additions & 3 deletions docs/packages/pkg/Boost.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Python
------

To require Boost Python to be built against a specific version of Python installed
on the system, option ``REQUESTED_PYTHON_VERSION=<VALUE>`` may be used. In this case,
on the system, option ``PYTHON_VERSION=<VALUE>`` may be used. In this case,
if the required components of Python are located, ``user_config.jam``
will be appended with the following line:

Expand All @@ -110,7 +110,7 @@ Example for Python 2:
Boost
VERSION ${HUNTER_Boost_VERSION}
CMAKE_ARGS
REQUESTED_PYTHON_VERSION=2.7.15
PYTHON_VERSION=2.7.15
)
.. code-block:: cmake
Expand All @@ -137,7 +137,7 @@ Example for Python 3:
Boost
VERSION ${HUNTER_Boost_VERSION}
CMAKE_ARGS
REQUESTED_PYTHON_VERSION=3.6.7
PYTHON_VERSION=3.6.7
)
.. code-block:: cmake
Expand Down
4 changes: 2 additions & 2 deletions examples/Boost-python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.2)
option(HUNTER_BUILD_SHARED_LIBS "..." ON)

# Configure:
set(REQUESTED_PYTHON_VERSION 3.5)
set(PYTHON_VERSION 3.5)
set(TESTING_CONFIG_OPT FILEPATH "${CMAKE_CURRENT_LIST_DIR}/config.cmake")

# Emulate HunterGate:
Expand All @@ -18,7 +18,7 @@ project(download-boost)
# Requires python version 3.5. Change this in config.cmake if necessary.
hunter_add_package(Boost COMPONENTS python)
find_package(Boost CONFIG REQUIRED python35)
find_package(PythonLibs ${REQUESTED_PYTHON_VERSION} EXACT REQUIRED)
find_package(PythonLibs ${PYTHON_VERSION} EXACT REQUIRED)

add_library(foo foo.cpp)
target_link_libraries(
Expand Down
4 changes: 2 additions & 2 deletions examples/Boost-python/config.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Note: REQUESTED_PYTHON_VERSION is optional. Refer to Boost package documentation on how
# Note: PYTHON_VERSION is optional. Refer to Boost package documentation on how
# and when to use it: https://docs.hunter.sh/en/latest/packages/pkg/Boost.html#cmake-options
hunter_config(Boost VERSION ${HUNTER_Boost_VERSION} CMAKE_ARGS REQUESTED_PYTHON_VERSION=${REQUESTED_PYTHON_VERSION})
hunter_config(Boost VERSION ${HUNTER_Boost_VERSION} CMAKE_ARGS PYTHON_VERSION=${PYTHON_VERSION})

0 comments on commit 22f0d75

Please sign in to comment.