File: CMakeLists.txt

package info (click to toggle)
gdcm 3.0.24-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,856 kB
  • sloc: cpp: 203,722; ansic: 76,471; xml: 48,131; python: 3,473; cs: 2,308; java: 1,629; lex: 1,290; sh: 334; php: 128; makefile: 97
file content (30 lines) | stat: -rw-r--r-- 1,034 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# C# MSFF tests
set(DSED_TEST_SRCS
  TestReaderUnicode
  )

set(DEP)
set_source_files_properties(${GDCM_LIBRARY_DIR}/gdcm-sharp.dll PROPERTIES GENERATED 1)
foreach(test ${DSED_TEST_SRCS})
  file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${test}.cs result)
  add_custom_command(
    OUTPUT ${GDCM_EXECUTABLE_DIR}/${test}.exe
    COMMAND ${CMAKE_CSHARP_COMPILER} "${CSC_PLATFORM_FLAG}" "/r:${GDCM_LIBRARY_DIR}/gdcm-sharp.dll" "/out:${GDCM_EXECUTABLE_DIR}/${test}.exe" ${result}
    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${test}.cs
    COMMENT "Create ${test}.exe"
    )
  add_custom_target(gdcm_sharp_${test} DEPENDS ${GDCM_EXECUTABLE_DIR}/${test}.exe)
  add_dependencies(gdcm_sharp_${test} GDCMCSharp)
  list(APPEND DEP ${GDCM_EXECUTABLE_DIR}/${test}.exe)

  # add test
  if(GDCM_DATA_ROOT)
    ADD_CSHARP_TEST(Test${test}Csharp ${GDCM_EXECUTABLE_DIR}/${test}.exe)
  endif()
endforeach()

add_custom_target(gdcmDSEDTestsCsharp ALL
  DEPENDS ${DEP}
  COMMENT "building DSED C# tests"
  )
add_dependencies(gdcmDSEDTestsCsharp GDCMCSharp)