Add CMP0114 policy to cmake

CMake Warning (dev) at /home/linuxbrew/.linuxbrew/Cellar/cmake/3.26.4/share/cmake/Modules/ExternalProject.cmake:2271 (message):
  Policy CMP0114 is not set: ExternalProject step targets fully adopt their
  steps.  Run "cmake --help-policy CMP0114" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  ExternalProject target 'bzip2' would depend on the targets for step(s)
  'configure;build;install' under policy CMP0114, but this is being left out
  for compatibility since the policy is not set.
Call Stack (most recent call first):
  CMakeLists.txt:178 (ExternalProject_Add_StepTargets)
This warning is for project developers.  Use -Wno-dev to suppress it.
This commit is contained in:
Philippe Teuwen 2023-07-17 03:32:07 +02:00
commit 5b656ad4b0

View file

@ -162,6 +162,7 @@ if (NOT SKIPJANSSONSYSTEM EQUAL 1)
endif (NOT SKIPJANSSONSYSTEM EQUAL 1) endif (NOT SKIPJANSSONSYSTEM EQUAL 1)
if(EMBED_BZIP2) if(EMBED_BZIP2)
cmake_policy(SET CMP0114 NEW)
set(BZIP2_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/deps/bzip2/src/bzip2) set(BZIP2_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/deps/bzip2/src/bzip2)
# Specify SOURCE_DIR will cause some errors # Specify SOURCE_DIR will cause some errors
ExternalProject_Add(bzip2 ExternalProject_Add(bzip2