File: MSVCVerboseLinking.cmake

package info (click to toggle)
freespace2 24.0.2%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: trixie
  • size: 43,188 kB
  • sloc: cpp: 583,107; ansic: 21,729; python: 1,174; sh: 464; makefile: 248; xml: 181
file content (48 lines) | stat: -rw-r--r-- 1,386 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# - Add appropriate linker flags to show link details on Visual Studio
#
#  include(MSVCVerboseLinking) - to add the flags automaticlly if applicable
#
# Be sure to include this module _BEFORE_ adding your targets, or the targets
# won't pick up the updated flags.
#
# Requires these CMake modules:
#  - none
#
# Original Author:
# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

if(MSVC)
	if(NOT DEFINED MSVC_LINK_REALLY_VERBOSE)
		if(IN_DASHBOARD_SCRIPT)
			set(MSVC_LINK_REALLY_VERBOSE TRUE)
		else()
			set(MSVC_LINK_REALLY_VERBOSE FALSE)
		endif()
	endif()
	set(MSVC_LINK_REALLY_VERBOSE
		"${MSVC_LINK_REALLY_VERBOSE}"
		CACHE
		BOOL
		"Provide maximum linker messages?")
	mark_as_advanced(MSVC_LINK_REALLY_VERBOSE)

	if(MSVC_LINK_REALLY_VERBOSE)
		set(_verbose_flag "/VERBOSE")
	else()
		set(_verbose_flag "/VERBOSE:LIB")
	endif()

	set(CMAKE_EXE_LINKER_FLAGS
		"${CMAKE_EXE_LINKER_FLAGS} ${_verbose_flag}")
	set(CMAKE_MODULE_LINKER_FLAGS
		"${CMAKE_MODULE_LINKER_FLAGS} ${_verbose_flag}")
	set(CMAKE_SHARED_LINKER_FLAGS
		"${CMAKE_SHARED_LINKER_FLAGS} ${_verbose_flag}")
endif()