carl9170 firmware: fix CMake developer Warning about CMP0050
authorChristian Lamparter <chunkeey@googlemail.com>
Wed, 20 May 2015 12:22:58 +0000 (14:22 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Wed, 20 May 2015 12:22:58 +0000 (14:22 +0200)
This patch fixes the numerous warnings about the unsupported use
of the SOURCE signature for the add_custom_command:

"CMake Warning (dev) at carlfw/CMakeLists.txt (add_custom_command):
  Policy CMP0050 is not set: Disallow add_custom_command SOURCE signatures.
  Run "cmake --help-policy CMP0050" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The SOURCE signatures of add_custom_command are no longer supported.
This warning is for project developers.  Use -Wno-dev to suppress it."

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
carlfw/CMakeLists.txt

index 124352e1986ccc3b88cc1d8b4154b317dc5049b1..02c80bf138badd45cb9611e1eddb5b4f5a806869 100644 (file)
@@ -42,21 +42,21 @@ set_target_properties(carl9170.elf PROPERTIES LINK_FLAGS "${CARLFW_CFLAGS} -Wl,-
 add_custom_target(firmware ALL)
 
 add_custom_command(
-       SOURCE carl9170.elf
+       DEPENDS carl9170.elf
        COMMAND ${OBJCOPY}
        ARGS --strip-unneeded -O binary -R .sram -R .eeprom -R .fwdsc carl9170.elf carl9170.bin
        TARGET firmware
        OUTPUTS carl9170.bin)
 
 add_custom_command(
-       SOURCE carl9170.elf
+       DEPENDS carl9170.elf
        COMMAND ${OBJCOPY}
        ARGS --strip-unneeded -O binary -j .fwdsc carl9170.elf carl9170.dsc
        TARGET firmware
        OUTPUTS carl9170.dsc)
 
 add_custom_command(
-       SOURCE firmware
+       DEPENDS firmware
        TARGET firmware
        COMMAND cat
        ARGS "carl9170.bin" "carl9170.dsc" > "carl9170.fw"