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

Don't use check_cxx_source_runs to make cross-compiling easier #3774

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

russelltg
Copy link
Contributor

Description

Fix #3773

Tests

I did test it on my local Linux system, and it properly detects that it doesn't need to link against . I also tested compiling the test source file in a system that needs linking against latomic (32-bit ubuntu 14.04 using clang, there is probably some other system that is this way as well) and the compile itsself did indeed fail with undefined reference errors, as expected. So this check should be just as robust.

Checklist:

  • I have read the contribution guidelines.
  • If this is more extensive than a small change to existing code, I
    have previously submitted a Contributor License Agreement
    (individual, and if there is any way my
    employers might think my programming belongs to them, then also
    corporate).
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • My code follows the prevailing code style of this project.

Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I think I assumed that check_cxx_source_compiles only checked for compilation of the source file, and did not realize it would link the executable. You're right, that's enough, it doesn't need to be executed. LGTM.

@lgritz lgritz added this pull request to the merge queue Feb 13, 2023
Merged via the queue into AcademySoftwareFoundation:master with commit a58e145 Feb 13, 2023
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Feb 13, 2023
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.

[FEATURE REQUEST] make oiio easier to cross compile by not using check_cxx_source_runs
2 participants