File: MacroAddSourceFileCompileFlags.cmake

package info (click to toggle)
gnucash 1%3A3.4-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 111,864 kB
  • sloc: ansic: 327,376; cpp: 71,145; lisp: 47,888; javascript: 23,306; python: 8,063; xml: 4,622; perl: 524; sh: 223; makefile: 55
file content (19 lines) | stat: -rw-r--r-- 679 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# - macro_add_source_file_compile_flags(<_target> "flags...")

# Copyright (c) 2006, Oswald Buddenhagen, <ossi@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.


macro (macro_add_source_file_compile_flags _sourcefile _additionalflags)

   get_source_file_property (_flags ${_sourcefile} COMPILE_FLAGS)
   if (_flags)
      set(_flags "${_flags} ${_additionalflags}")
   else (_flags)
      set(_flags "${_additionalflags}")
   endif (_flags)
   set_source_files_properties (${_sourcefile} PROPERTIES COMPILE_FLAGS "${_flags}")

endmacro (macro_add_source_file_compile_flags)