1# - macro_add_source_file_compile_flags(<_target> "flags...")
2
3# Copyright (c) 2006, Oswald Buddenhagen, <ossi@kde.org>
4#
5# Redistribution and use is allowed according to the terms of the BSD license.
6# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
7
8
9macro (macro_add_source_file_compile_flags _sourcefile _additionalflags)
10
11   get_source_file_property (_flags ${_sourcefile} COMPILE_FLAGS)
12   if (_flags)
13      set(_flags "${_flags} ${_additionalflags}")
14   else()
15      set(_flags "${_additionalflags}")
16   endif()
17   set_source_files_properties (${_sourcefile} PROPERTIES COMPILE_FLAGS "${_flags}")
18
19endmacro (macro_add_source_file_compile_flags)
20