Skip to content

Commit 922238f

Browse files
committed
build: fix cmake warning on packages/gdcm for CMP0135
Fix the following warning by specifying policy: ``` CMake Warning (dev) at /usr/share/cmake-3.27/Modules/ExternalProject.cmake:3136 (message): The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is not set. The policy's OLD behavior will be used. When using a URL download, the timestamps of extracted files should preferably be that of the time of extraction, otherwise code that depends on the extracted contents might not be rebuilt if the URL changes. The OLD behavior preserves the timestamps from the archive instead, but this is usually not what you want. Update your project to the NEW behavior or specify the DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this robustness issue. Call Stack (most recent call first): /usr/share/cmake-3.27/Modules/ExternalProject.cmake:4345 (_ep_add_download_command) gdcm/CMakeLists.txt:46 (ExternalProject_Add) This warning is for project developers. Use -Wno-dev to suppress it. ```
1 parent 9d2a2c6 commit 922238f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/dicom/gdcm/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ else()
5050
DOWNLOAD_EXTRACT_TIMESTAMP TRUE)
5151
endif()
5252

53+
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.23.0")
54+
cmake_policy(SET CMP0135 NEW)
55+
endif()
56+
5357
ExternalProject_Add(${Iconv_LIBRARY}
5458
PREFIX ${Iconv_DIR}
5559
URL "https://bafybeid2yl6aeunciy5rynjmaoxkhhau3jgjpv7x25pylby7hq6n23c57i.ipfs.dweb.link/libiconv-1.16.tar.gz"

0 commit comments

Comments
 (0)