Commit c8ff000c authored by Valenza Florian's avatar Valenza Florian
Browse files

[cmake] fix ADD_TEST_CFLAGS and ADD_TARGET_CFLAGS_MACRO. flags are now correctly appended

parent 3b7a186c
......@@ -35,8 +35,7 @@ MACRO(ADD_SOURCE_GROUP FILENAMES)
ENDMACRO(ADD_SOURCE_GROUP FILENAMES)
MACRO(ADD_TARGET_CFLAGS target flag)
GET_TARGET_PROPERTY(${target}_CFLAGS ${target} COMPILE_FLAGS)
SET_PROPERTY(TARGET ${target} PROPERTY COMPILE_FLAGS "${${target}_CFLAGS} ${flag}")
SET_PROPERTY(TARGET ${target} APPEND_STRING PROPERTY COMPILE_FLAGS " ${flag}")
ENDMACRO(ADD_TARGET_CFLAGS)
# ----------------------------------------------------
......
......@@ -32,8 +32,7 @@ MACRO(ADD_UNIT_TEST NAME PKGS)
ENDMACRO(ADD_UNIT_TEST)
MACRO(ADD_TEST_CFLAGS target flag)
GET_TARGET_PROPERTY(${target}_CFLAGS ${target} COMPILE_FLAGS)
SET_PROPERTY(TARGET ${target} PROPERTY COMPILE_FLAGS "${${target}_CFLAGS} ${flag}")
SET_PROPERTY(TARGET ${target} APPEND_STRING PROPERTY COMPILE_FLAGS " ${flag}")
ENDMACRO(ADD_TEST_CFLAGS)
# --- RULES -------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment