Wireshark-dev: Re: [Wireshark-dev] Mac Build Error
From: David Morsberger <[email protected]>
Date: Wed, 20 Jan 2016 09:48:12 -0500


On Wed, Jan 20, 2016 at 8:43 AM, Stig Bjørlykke <[email protected]> wrote:
On Wed, Jan 20, 2016 at 1:47 PM, David Morsberger <[email protected]> wrote:
 
I am getting actual errors within Xcode after ‘cmake -G Xcode’. This can easily be resolved by not testing ‘—as-needed’ or ‘—pie’ when XCODE just like what is done for MSVC.

Ah, yes, I forgot about this.  I have tried to fix this earlier without luck.


I have a local fix in my cmake build directory for this flags, I manually changed this lines in CMakeCache.txt:

WS_LD_FLAG_VALID0:INTERNAL=0
WS_LD_FLAG_VALID1:INTERNAL=0
 
A correct fix for this would be nice.




My current workaround is the following change to CMakeLists.txt :
-if(NOT CMAKE_C_COMPILER_ID MATCHES "MSVC")
+if(NOT (CMAKE_C_COMPILER_ID MATCHES "MSVC" OR XCODE))
 	set(WIRESHARK_LD_FLAGS
 		-Wl,--as-needed

I still want to know what is going on because there has to be a way to find out when the compile/link check fails.