Closed
Description
CMakeLists.txt
specifies minimum CMake version as 3.20
However running configure_new
with CMake version <3.23 fails with several errors like this:
CMake Error at cmake/target_source_properties.cmake:41 (define_property):
define_property not given a BRIEF_DOCS <brief-doc> argument.
Call Stack (most recent call first):
CMakeLists.txt:323 (define_target_source_properties)
This is because target_source_properties.cmake
doesn't have BRIEF_DOCS
and FULL_DOCS
arguments in define_property()
:
WRF/cmake/target_source_properties.cmake
Lines 40 to 52 in c21d571
Those arguments have been changed to optional in Cmake 3.23 (see docs).
With Cmake <3.23 I have found this workaround to solve the issue:
foreach( PROPERTY ${FUNC_PROP_PROPERTIES} )
define_property(
SOURCE
PROPERTY ${PROPERTY}
# INHERITED # they will be "inherited" via target to source
BRIEF_DOCS "dummy docs"
FULL_DOCS "dummy docs"
)
define_property(
TARGET
PROPERTY ${PROPERTY}
# INHERITED # they will be "inherited" via target to source
BRIEF_DOCS "dummy docs"
FULL_DOCS "dummy docs"
)
endforeach()
Thus to solve this issue either minimum Cmake version should be raised to 3.23 or a workaround similar to mine should be used. I'm happy to create PR for either solution when a decision is reached.
Metadata
Metadata
Assignees
Labels
No labels