Skip to content

Commit

Permalink
Only warn about INPUT_REQUIREMENTS if a package exports requirements …
Browse files Browse the repository at this point in the history
…to begin with
  • Loading branch information
paulbovbel committed May 27, 2020
1 parent fc4379c commit 488fa2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions catkin_virtualenv/cmake/catkin_generate_virtualenv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ function(catkin_generate_virtualenv)
set(lock_args "${lock_args} --no-deps")
endif()

if(NOT DEFINED ARG_INPUT_REQUIREMENTS)
message(WARNING "Please define an INPUT_REQUIREMENTS and generate a lock file - see https://github.com/locusrobotics/catkin_virtualenv/blob/master/README.md#locking-dependencies")
endif()

if (NOT DEFINED ARG_EXTRA_PIP_ARGS)
set(ARG_EXTRA_PIP_ARGS "-qq" "--retries 10" "--timeout 30")
endif()
Expand Down Expand Up @@ -102,6 +98,10 @@ function(catkin_generate_virtualenv)
${CMAKE_BINARY_DIR}/${venv_dir}/bin/python
${CMAKE_SOURCE_DIR}/${ARG_INPUT_REQUIREMENTS}
)

elseif(NOT DEFINED ARG_INPUT_REQUIREMENTS AND NOT package_requirements STREQUAL "")
message(WARNING "Please define an INPUT_REQUIREMENTS and generate a lock file - see https://github.com/locusrobotics/catkin_virtualenv/blob/master/README.md#locking-dependencies")

endif()

add_custom_command(COMMENT "Install requirements to ${CMAKE_BINARY_DIR}/${venv_dir}"
Expand Down

0 comments on commit 488fa2b

Please sign in to comment.