Skip to content

Missing POST_BUILD in add_custom_command #189

@eyalroz

Description

@eyalroz

Each add_custom_command() (in CMake 3.1 and later at least) must specify its priority w.r.t. other rules for the target, through the use of PRE_BUILD, POST_BUILD etc. This is missing in the add_custom_command() in blitz/CMakeLists.txt, which gets us the following warning:

CMake Warning (dev) at blitz/CMakeLists.txt:76 (add_custom_command):
  Exactly one of PRE_BUILD, PRE_LINK, or POST_BUILD must be given.  Assuming
  POST_BUILD to preserve backward compatibility.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

I suggest it be marked with POST_BUILD - assuming that was the original intent, perhaps with an earlier version of CMake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions