From 02ea08ba66f5f9f076f205fca756fc8ebdd96f0f Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Fri, 7 Aug 2020 16:14:56 +0200 Subject: [PATCH] cmake: make the traceparser permissive by default (fixes #7501) --- mesonbuild/cmake/traceparser.py | 2 +- .../13 cmake dependency/cmake/FindSomethingLikeZLIB.cmake | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py index fd16c7503..98b56f5bc 100644 --- a/mesonbuild/cmake/traceparser.py +++ b/mesonbuild/cmake/traceparser.py @@ -74,7 +74,7 @@ class CMakeGeneratorTarget(CMakeTarget): self.working_dir = None # type: T.Optional[str] class CMakeTraceParser: - def __init__(self, cmake_version: str, build_dir: str, permissive: bool = False): + def __init__(self, cmake_version: str, build_dir: str, permissive: bool = True): self.vars = {} # type: T.Dict[str, T.List[str]] self.targets = {} # type: T.Dict[str, CMakeTarget] diff --git a/test cases/linuxlike/13 cmake dependency/cmake/FindSomethingLikeZLIB.cmake b/test cases/linuxlike/13 cmake dependency/cmake/FindSomethingLikeZLIB.cmake index d19f7e8c0..483926ce8 100644 --- a/test cases/linuxlike/13 cmake dependency/cmake/FindSomethingLikeZLIB.cmake +++ b/test cases/linuxlike/13 cmake dependency/cmake/FindSomethingLikeZLIB.cmake @@ -4,6 +4,9 @@ include(CMakeFindDependencyMacro) include(CheckCXXSourceRuns) include(CheckCSourceRuns) +# Do something stupid (see https://github.com/mesonbuild/meson/issues/7501) +set("") + check_cxx_source_runs( " #include