File: LibdwarfMacros.cmake

package info (click to toggle)
dwarfutils 20180809-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,228 kB
  • sloc: ansic: 63,382; sh: 5,222; cpp: 4,041; makefile: 548; python: 445; awk: 11
file content (19 lines) | stat: -rw-r--r-- 531 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# used to compile on MSVC upto 2013 where snprintf is not available
macro(msvc_posix target)
	if(MSVC AND ("${MSVC_VERSION}" LESS 1900))
		# under VS 2015
		target_compile_definitions(${target} PUBLIC 
			snprintf=_snprintf)
	endif()
endmacro()

# set target folder on IDE
macro(set_folder target folder)
	set_target_properties(${target} PROPERTIES FOLDER ${folder})
endmacro()

# set source groups on IDE
macro(set_source_group list_name group_name)
	set(${list_name} ${ARGN})
	source_group(${group_name} FILES ${ARGN})
endmacro()