Skip to content

Conversation

@madebr
Copy link
Contributor

@madebr madebr commented Jul 4, 2020

This pr adds meson to the exception list of KB-H019.

This should fix the CI failures I'm having with pkgconf at conan-io/conan-center-index#1013 (comment)

I've just checked meson 0.54.3 and it contains the following cmake script:

  • bin/mesonbuild/cmake/data/preload.cmake

I've copied the contents of the script here below.
I think an exception is required instead of adding it to cpp_info.builddirs.

contents of meson's preload.cmake
if(MESON_PS_LOADED)
  return()
endif()

set(MESON_PS_LOADED ON)

# Dummy macros that have a special meaning in the meson code
macro(meson_ps_execute_delayed_calls)
endmacro()

macro(meson_ps_reload_vars)
endmacro()

# Helper macro to inspect the current CMake state
macro(meson_ps_inspect_vars)
  set(MESON_PS_CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
  set(MESON_PS_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
  meson_ps_execute_delayed_calls()
endmacro()


# Override some system functions with custom code and forward the args
# to the original function
macro(add_custom_command)
  meson_ps_inspect_vars()
  _add_custom_command(${ARGV})
endmacro()

macro(add_custom_target)
  meson_ps_inspect_vars()
  _add_custom_target(${ARGV})
endmacro()

macro(set_property)
  meson_ps_inspect_vars()
  _set_property(${ARGV})
endmacro()

function(set_source_files_properties)
  set(FILES)
  set(I 0)
  set(PROPERTIES OFF)

  while(I LESS ARGC)
    if(NOT PROPERTIES)
      if("${ARGV${I}}" STREQUAL "PROPERTIES")
        set(PROPERTIES ON)
      else()
        list(APPEND FILES "${ARGV${I}}")
      endif()

      math(EXPR I "${I} + 1")
    else()
      set(ID_IDX ${I})
      math(EXPR PROP_IDX "${ID_IDX} + 1")

      set(ID   "${ARGV${ID_IDX}}")
      set(PROP "${ARGV${PROP_IDX}}")

      set_property(SOURCE ${FILES} PROPERTY "${ID}" "${PROP}")
      math(EXPR I "${I} + 2")
    endif()
  endwhile()
endfunction()

set(MESON_PS_DELAYED_CALLS add_custom_command;add_custom_target;set_property)
meson_ps_reload_vars()

/cc @uilianries @ericLemanissier

@ericLemanissier
Copy link
Contributor

Just To be clear, the pkgconf fails independantly of this hook:

ERROR: pkgconf/1.7.3 (test package): Error in test() method, line 34 	raise ConanException("PKG_CONFIG variable incorrect") 	ConanException: PKG_CONFIG variable incorrect

@madebr
Copy link
Contributor Author

madebr commented Jul 4, 2020

Indeed, the pkgconf recipe isn't finished yet.
The error/warning when running ninja install on windows is non-fatal btw.

Copy link
Contributor

@ericLemanissier ericLemanissier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is still fuzzy to me: this hook failure happened for meson and all projects requiring meson, yet the bot never shows this hook failure, except when the build fails for some other reason. Is it what's supposed to happen ?

@SpaceIm
Copy link
Contributor

SpaceIm commented Jan 30, 2021

I've added this folder to builddirs conan-io/conan-center-index#4420, it's a recurrent source of misleading errors reports in PRs, and it pollutes logs for consumers.

@SpaceIm
Copy link
Contributor

SpaceIm commented Jan 30, 2021

Oh I see, this PR is still opened 😢

@ericLemanissier
Copy link
Contributor

this may not be needed any more, now that conan-io/conan-center-index#4420 is merged

@danimtb danimtb requested a review from uilianries February 18, 2021 15:55
@danimtb danimtb self-assigned this Feb 18, 2021
@danimtb
Copy link
Member

danimtb commented Mar 1, 2021

I think this PR needs to be updated with latest changes in master branch to make the CI green

@ericLemanissier
Copy link
Contributor

@madebr this PR can be closed, with conan-io/conan-center-index#4420 merged

@madebr
Copy link
Contributor Author

madebr commented May 25, 2021

Closed it is then!

@madebr madebr closed this May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants