summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CSharpCustomCommand/CommandWithOutput.cmake
blob: 68341fa889fdb142a834ec7566894c026ab3d9bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
enable_language(CSharp)

add_executable(CSharpCustomCommand dummy.cs)

add_custom_command(OUTPUT ${generatedFileName}
  COMMAND ${CMAKE_COMMAND} -E copy_if_different
    ${inputFileName} ${generatedFileName}
  MAIN_DEPENDENCY ${inputFileName}
  COMMENT "${commandComment}")

target_sources(CSharpCustomCommand PRIVATE
  ${inputFileName}
  ${generatedFileName})