summaryrefslogtreecommitdiffstats
path: root/Tests/CommandLength/CMakeLists.txt
blob: 68360518b4bcda20bbe4b81e71c4ed24480f8d19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cmake_minimum_required(VERSION 3.10)
project(CommandLength C)

add_executable(CommandLength test.c)
add_custom_command(TARGET CommandLength POST_BUILD VERBATIM
  COMMAND ${CMAKE_COMMAND} -E make_directory log)

set(msg "xxxx $$$$ yyyy")
set(msg "${msg} ${msg}")
set(msg "${msg} ${msg}")
set(msg "${msg} ${msg}")
set(msg "${msg} ${msg}")
foreach(i RANGE 1 1000)
  add_custom_command(TARGET CommandLength POST_BUILD VERBATIM
    COMMAND ${CMAKE_COMMAND} -E echo "${i} ${msg}" > log/${i}
    )
endforeach()