-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
target_compile_definitions from import cmake project not working correctly #7299
Comments
Same with: https://github.com/juce-framework/JUCE/tree/juce6 E.g:
Ends up as:
in the Linker command line which breaks compilation. |
Which meson and CMake version are you using? I am unable to reproduce this bug with meson 0.54.2 and CMake 3.17.3 It is generally recommended to use the latest meson and CMake version when using CMake subprojects. Can you also please both check if this issue is still present in the meson master and 0.54 branch? |
Removing this from the 0.54.3 milestone, since the relevant tests in #7309 pass. |
cmake version 3.17.3 Here is a link to my repository with a problem: https://github.com/ComradeStalin17/RiEngine And I found 1 more problem with cmake and c ++ 20: WARNING: Unknown cpp_std "c++20" -> Ignoring. Try setting the project-level cpp_std if build errors occur. It occurs during build magic_enum which optionally uses c ++ 20. Try build my project, all dependencies will be installed by themselves. |
I was trying with
Building JUCE DemoRunner by itself with CMake succeeds (make DemoRunner) Trying using meson with this simple dummy project ( project('test', 'c', 'cpp')
cmake = import('cmake')
sub_proj = cmake.subproject('JUCE')
executable('juce_test', 'main.c',
dependencies : [
sub_proj.dependency('juce_analytics'),
],
)
|
OK, this only appears to be a problem with This should be fixed now in #7309. |
@ComradeStalin17 The It is just not that trivial to map every possible |
I try to use this cmake library https://github.com/felixguendling/cista
In CmakeLists line: target_compile_definitions(cista INTERFACE CISTA_${CISTA_HASH}=1) passed to the compiler incorrectly.
On the cmake site https://cmake.org/cmake/help/latest/command/target_compile_definitions.html says that prefix -D not required, but meson doesn’t think so and pass to compiler two definitions at once: CISTA_FNV1A=1 -DCISTA_FNV1A=1 - ???
Change line to target_compile_definitions(cista INTERFACE -DCISTA_${CISTA_HASH}=1)
fix this problem.
But there is another library that does similar things and everything works fine:
target_compile_definitions(spdlog PUBLIC SPDLOG_COMPILED_LIB)
I think the problem is with INTERFACE or with parameter = 1
The text was updated successfully, but these errors were encountered: