Alexey Samsonov | 163ab9d | 2013-01-18 16:05:21 +0000 | [diff] [blame] | 1 | # Because compiler-rt spends a lot of time setting up custom compile flags, |
| 2 | # define a handy helper function for it. The compile flags setting in CMake |
| 3 | # has serious issues that make its syntax challenging at best. |
| 4 | function(set_target_compile_flags target) |
| 5 | foreach(arg ${ARGN}) |
| 6 | set(argstring "${argstring} ${arg}") |
| 7 | endforeach() |
| 8 | set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}") |
| 9 | endfunction() |
| 10 | |
| 11 | function(set_target_link_flags target) |
| 12 | foreach(arg ${ARGN}) |
| 13 | set(argstring "${argstring} ${arg}") |
| 14 | endforeach() |
| 15 | set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}") |
| 16 | endfunction() |
| 17 | |