catchorg/Catch2

Unable to compile Catch2 using meson

开放

#2,697 创建于 2023年6月1日

 (1 条评论) (0 个反应) (0 位负责人)C++ (3,228 个派生)batch import
Building and PackagingHelp wanted

仓库指标

星标
 (20,381 个星标)
PR 合并指标
 (平均合并 1天 8小时) (30 天内合并 1 个 PR)

描述

Now that Catch2 has its own Meson.build file for integration, I am filing this here too, this bug might lie with meson (see: Here for a similar issue ) but i have only been able to reproduce it with Catch2.

Describe the bug When attempting to compile a project using meson, consuming clang as a dependency via the subproject or wrapper functionality of meson, it gives the following compiler error: image Somehow, the paths for Catch2's libraries seem to contain mixed slashes and do not get resolved correctly.

Expected behaviour Catch2 has the correct paths and compiles like expected.

Reproduction steps catch2.wrap:

[wrap-git]
url = https://github.com/catchorg/Catch2.git
revision = devel
depth = 1

[provide]
catch2 = catch2_dep
catch2-with-main = catch2_with_main_dep

Meson.build:

project('testcatch2', 'cpp')
catch2_dep = dependency('catch2-with-main', version: '>=3')

repro.bat:

set CXX=clang++
meson setup build
meson compile -C build

Platform information:

  • Windows 10, 21H2 10.0.19044
  • Clang++ version 15.0.1
  • Python version 3.9.13
  • Meson version 0.62.1
  • Ninja version 1.10.2
  • Catch version: Devel commit 0631b607ee2bbc07c7c238f0b15b23ef21926960

贡献者指南