summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/NinjaMultiConfig/LongCommandLine.cmake
blob: de528be4665c5196a8f8012e86e00eaff0cfb244 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
enable_language(C)

add_executable(generator main.c)

string(REPEAT "." 5000 very_long)

add_custom_command(
  OUTPUT gen.txt
  COMMAND generator "${very_long}" > gen.txt
  )

add_custom_target(
  custom
  ALL
  DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/gen.txt"
  )

add_executable(exe main.c)

add_custom_command(
  TARGET exe POST_BUILD
  COMMAND ${CMAKE_COMMAND} -E echo "Post-build $<CONFIG> $<COMMAND_CONFIG:$<CONFIG>> ${very_long}"
  )