From 16692f492607e3af4e30d0a24e41d4c5d238e8c2 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Fri, 17 Jul 2020 15:42:26 +0200 Subject: Apple: suppress Xcode 12 ranlib warning The Xcode 12 (Beta) toolchain for arm64 emits a warning when static libraries are created: ``` ranlib: archive member: libStaticLib.a(a.c.o) offset in archive not a multiple of 8 (must be since member is an 64-bit object file) ``` Due to the unexpected output multiple tests are broken. To make those tests pass we filter the problematic output in the test driver. See: https://developer.apple.com/forums/thread/652620 --- Tests/RunCMake/RunCMake.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index cb20fb1..c13c694 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -154,6 +154,7 @@ function(run_cmake test) "|[^\n]*xcodebuild[^\n]*warning: file type[^\n]*is based on missing file type" "|[^\n]*is a member of multiple groups" + "|[^\n]*offset in archive not a multiple of 8" "|[^\n]*from Time Machine by path" "|[^\n]*Bullseye Testing Technology" ")[^\n]*\n)+" -- cgit v0.12 From 447ecbb6920a00adbed7fb65836b1fbdab2adb98 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Fri, 17 Jul 2020 15:46:29 +0200 Subject: Apple: also specify sysroot for linking Otherwise the compiler/linker will default to the wrong C++ runtime library. --- Tests/FindPackageModeMakefileTest/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/FindPackageModeMakefileTest/Makefile.in b/Tests/FindPackageModeMakefileTest/Makefile.in index 5ef67d0..af9fa96 100644 --- a/Tests/FindPackageModeMakefileTest/Makefile.in +++ b/Tests/FindPackageModeMakefileTest/Makefile.in @@ -24,7 +24,7 @@ main.o: clean main.cpp pngtest: main.o @$(CMAKE_FOO) -DMODE=LINK >$(tmp) @foo="`cat $(tmp)`"; \ - printf '"%s" %s %s -o pngtest main.o %s\n' $(CMAKE_CXX_COMPILER) "$(CMAKE_CXX_FLAGS)" "$(LDFLAGS)" "$$foo" >$(tmp) + printf '"%s" %s %s %s -o pngtest main.o %s\n' $(CMAKE_CXX_COMPILER) "$(CMAKE_CXX_FLAGS)" "$(__EXTRA_OSX_SYSROOT_FLAGS)" "$(LDFLAGS)" "$$foo" >$(tmp) @cat $(tmp) @sh $(tmp) @rm -f $(tmp) -- cgit v0.12