Skip to content
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

[CMake] Ensure link_directories is invoked early enough. #2

Merged

Conversation

Arnaud-de-Grandmaison-ARM
Copy link
Contributor

The documentation at
https://cmake.org/cmake/help/latest/command/link_directories.html
explicitely states :

The command will apply only to targets created after it is called, so
fix the invocation order in the CMakeLists.txt.

While being there, remove the 'PRIVATE' keyword which does not apply to
this flavour of the linker command setup.

This does fix building tarmac-gui-browser on Mac and remove spurious
warnings about non-existing xyz/PRIVATE directories.

The documentation at
https://cmake.org/cmake/help/latest/command/link_directories.html
explicitely states :

The command will apply only to targets created after it is called, so
fix the invocation order in the CMakeLists.txt.

While being there, remove the 'PRIVATE' keyword which does not apply to
this flavour of the linker command setup.

This does fix building tarmac-gui-browser on Mac and remove spurious
warnings about non-existing xyz/PRIVATE directories.
@Arnaud-de-Grandmaison-ARM Arnaud-de-Grandmaison-ARM merged commit 0a53023 into ARM-software:main Apr 28, 2021
statham-arm added a commit that referenced this pull request Jan 26, 2024
The '--compare' option to test-driver.py takes two arguments
indicating things to diff (either files, or the standard output of the
command under test), and diffs them the obvious way round, that is,
with input #1 shown on the '-' side of the unified diff syntax and
input #2 on the '+' side.

When the diff is showing the discrepancy between a program's expected
and real output, I think it's generally sensible to show the real
output on the '+' side, and the expected output as '-'. That
convention matches, for example, what you'd get if you had the true
output committed in source control and ran 'git diff' or similar to
show how the rewritten version differed.

But all the comparisons in tests/CMakeLists.txt were written
backwards, so the convention was opposite. And I just scratched my
head for 20 minutes over a test failure, because I assumed the
convention in the previous paragraph, and was trying to figure out how
the source code I was looking at could possibly produce the text on
the '+' side of the diff! But it hadn't: it had produced the '-' side
instead.

Reversed all the comparisons so that they make sense.
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.

1 participant