Skip to content

BUG: openmp/cmake/HandleOpenMPOptions.cmake uses CMake function append without defining it #80117

@h-vetinari

Description

@h-vetinari

While building openmp 18.1.0-rc1 on windows, I get:

CMake Error at cmake/HandleOpenMPOptions.cmake:47 (append):
  Unknown CMake command "append".

This is due to https://github.com/llvm/llvm-project/blame/release/18.x/openmp/cmake/HandleOpenMPOptions.cmake using append since 15fdc76, but not defining it -- in contrast to append_if which explicitly duplicates the definition from HandleLLVMOptions.cmake:

if (NOT COMMAND append_if)
# From HandleLLVMOptions.cmake
function(append_if condition value)
if (${condition})
foreach(variable ${ARGN})
set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
endforeach(variable)
endif()
endfunction()
endif()

I don't know why this file does not (or cannot) do include(HandleLLVMOptions), but if that's not an option, then it needs to similarly vendor the definition of append.

CC @aganea

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions