banditcpp / bandit

Human-friendly unit testing for C++11
https://banditcpp.github.io/bandit/
Other
259 stars 37 forks source link

Set policy CMP0058 #166

Closed e-kwsm closed 3 years ago

e-kwsm commented 3 years ago

sakra/cotire#81

Without this policy, the following warning is raised:

$ cmake -GNinja -Bbuild -S.
…
-- cotire 1.8.0 loaded.
-- CXX target bandit-specs cotired.
-- Configuring done
-- Generating done
CMake Warning (dev):
  Policy CMP0058 is not set: Ninja requires custom command byproducts to be
  explicit.  Run "cmake --help-policy CMP0058" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  This project specifies custom command DEPENDS on files in the build tree
  that are not specified as the OUTPUT or BYPRODUCTS of any
  add_custom_command or add_custom_target:

   bandit-specs_CXX_cotire.cmake

  For compatibility with versions of CMake that did not have the BYPRODUCTS
  option, CMake is generating phony rules for such files to convince 'ninja'
  to build.

  Project authors should add the missing BYPRODUCTS or OUTPUT options to the
  custom commands that produce these files.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Build files have been written to: /tmp/bandit/build
sbeyer commented 3 years ago

Thank you very much. It would probably be even better to add the corresponding BYPRODUCTS on the cotire-side and then update the cotire submodule in bandit. However, this is a first improvement of the situation.