CMP0088.rst 1.2 KB

1234567891011121314151617181920212223242526272829
  1. CMP0088
  2. -------
  3. :module:`FindBISON` runs bison in :variable:`CMAKE_CURRENT_BINARY_DIR`
  4. when executing.
  5. The module provides a ``BISON_TARGET`` macro which generates BISON output.
  6. In CMake 3.13 and below the macro would generate a custom command that runs
  7. ``bison`` in the source directory. CMake 3.14 and later prefer to run it
  8. in the build directory and use :variable:`CMAKE_CURRENT_BINARY_DIR` as the
  9. ``WORKING_DIRECTORY`` of its :command:`add_custom_command` invocation.
  10. This ensures that any implicitly generated file is written to the build
  11. tree rather than the source.
  12. This policy provides compatibility for projects that have not been updated
  13. to expect the new behavior.
  14. The ``OLD`` behavior for this policy is for ``BISON_TARGET`` to use
  15. the current source directory for the ``WORKING_DIRECTORY`` and where
  16. to generate implicit files. The ``NEW`` behavior of this policy is to
  17. use the current binary directory for the ``WORKING_DIRECTORY`` and where
  18. to generate implicit files.
  19. This policy was introduced in CMake version 3.14. Use the
  20. :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
  21. Unlike most policies, CMake version |release| does *not* warn
  22. when this policy is not set and simply uses ``OLD`` behavior.
  23. .. include:: DEPRECATED.txt