[CMake] add_custom_command not triggered

Nico Schlömer nico.schloemer at gmail.com
Sat Oct 31 10:49:21 EDT 2015


After downloading a file with ExternalData_Expand_Arguments [1], I would
like to execute a command on the data to produce another file. So far, I
have
```
ExternalData_Expand_Arguments(
  noshTestFetchData
  OUT_DATA DATA{${CMAKE_SOURCE_DIR}/test/data/${file}}
)
ExternalData_Add_Target(noshTestFetchData)

add_custom_command(
  OUTPUT ${CMAKE_BINARY_DIR}/test/data/pacman.e.2.0
  COMMAND decomp -p 2 ${CMAKE_BINARY_DIR}/test/data/pacman.e
  DEPENDS noshTestFetchData
)
```
The file is downloaded alright, but the `add_custom_command` is never
triggered. Why not?

This is with CMake 3.2.2.

Cheers,
Nico

[1] https://cmake.org/cmake/help/v3.3/module/ExternalData.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20151031/6ac78e48/attachment.html>


More information about the CMake mailing list