Commit ee29bcd
problem: trying to link against librt on macOS
Solution: don't use rt if not `RT_LIBRARY`
This currently causes the check to fail on macOS:
```bash
/Library/Developer/CommandLineTools/usr/bin/c++ -std=c++11 -Wno-tautological-constant-compare -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_8466b.dir/CheckSymbolExists.cxx.o -o cmTC_8466b -lrt
ld: library 'rt' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
even though `clock_gettime` is available.
Move the `clock_gettime` check up with the other librt related checks,
and don't set `CMAKE_REQUIRED_LIBRARIES` if not `RT_LIBRARY`.1 parent d203ad2 commit ee29bcd
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
592 | 598 | | |
593 | 599 | | |
594 | 600 | | |
| |||
609 | 615 | | |
610 | 616 | | |
611 | 617 | | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | 618 | | |
617 | 619 | | |
618 | 620 | | |
| |||
0 commit comments