You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If I load a CMake project as a subproject and that CMake project contains multiple libraries that depend on each other, Meson will only compile one of the libraries and ignore the other one.
FAILED: main
c++ -o main main.p/main.cc.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group subprojects/liba/liblibc.a -Wl,--end-group
/usr/bin/ld: subprojects/liba/liblibc.a.p/libc_src_libc.cc.o: in function `c()':
/home/elias/meson-cmake-test/_build/../subprojects/liba/libc/src/libc.cc:5: undefined reference to `b()'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
To Reproduce meson-cmake-test.zip
The project contains two identical main files. One of those is only there to prove that the CMake project works on its own.
Expected behavior
I expect the project to build without errors.
system parameters
Is this a cross build or just a plain native build (for the same computer)?
plain native build
what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.)
Arch Linux
what Python version are you using e.g. 3.8.0
Python 3.10.8
what meson --version
0.63.3
what ninja --version if it's a Ninja build
1.11.1
The text was updated successfully, but these errors were encountered:
eyelash
changed the title
CMake support ignores dependent libraries
CMake subproject ignores dependent libraries
Nov 3, 2022
Describe the bug
If I load a CMake project as a subproject and that CMake project contains multiple libraries that depend on each other, Meson will only compile one of the libraries and ignore the other one.
To Reproduce
meson-cmake-test.zip
The project contains two identical main files. One of those is only there to prove that the CMake project works on its own.
Expected behavior
I expect the project to build without errors.
system parameters
plain native build
Arch Linux
Python 3.10.8
meson --version
0.63.3
ninja --version
if it's a Ninja build1.11.1
The text was updated successfully, but these errors were encountered: