Wireshark-dev: Re: [Wireshark-dev] New linker warnings compiling Wireshark on Windows
From: Guy Harris <[email protected]>
Date: Thu, 4 Oct 2018 11:19:45 -0700
If anybody in the audience knows how CMake determines the flags to be used when linking a particular executable target, based on:

	the setting of CMAKE_EXE_LINKER_FLAGS;

	the setting of CMAKE_EXE_LINKER_FLAGS_<CONFIG> for the configuration being built;

	the LINK_FLAGS property of the target being built;

	any *other* variables and properties that affect the linker flags;

it would be appreciated if they'd let us know *and* convince the CMake people to document this in some fairly obvious place; the documentation for CMAKE_EXE_LINKER_FLAGS:


	"Linker flags to be used to create executables.

	These flags will be used by the linker when creating an executable."



	"Flags to be used when linking an executable.

	Same as CMAKE_C_FLAGS_* but used by the linker when creating executables."



	"Additional flags to use when linking this target.

	The LINK_FLAGS property can be used to add extra flags to the link step of a target.  LINK_FLAGS_<CONFIG> will add to the configuration <CONFIG>, for example, DEBUG, RELEASE, MINSIZEREL, RELWITHDEBINFO, …"



	"Per-configuration linker flags for a target.

	This is the configuration-specific version of LINK_FLAGS."

doesn't help, and there doesn't appear to *be* any documentation for the alleged "CMAKE_C_FLAGS_*" flags.

Until then, I'll just go back to doing things the old way, even if that's not how you're supposed to set link flags that are to be used with all executables.

(And then explain the behaviors of linker flags for *other* types of targets, if they're similar, *mutatis mutandis*.)