summaryrefslogtreecommitdiffstats
path: root/Tests/UseSWIG/CMakeLists.txt
blob: 7046faba8be308c0e2da68367f6056ed1747a323 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
add_test(NAME UseSWIG.LegacyPython COMMAND
  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  --build-and-test
  "${CMake_SOURCE_DIR}/Tests/UseSWIG/LegacyPython"
  "${CMake_BINARY_DIR}/Tests/UseSWIG/LegacyPython"
  ${build_generator_args}
  --build-project TestLegacyPython
  --build-options ${build_options}
  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  )
add_test(NAME UseSWIG.LegacyPerl COMMAND
  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  --build-and-test
  "${CMake_SOURCE_DIR}/Tests/UseSWIG/LegacyPerl"
  "${CMake_BINARY_DIR}/Tests/UseSWIG/LegacyPerl"
  ${build_generator_args}
  --build-project TestLegacyPerl
  --build-options ${build_options}
  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  )

include(CheckLanguage)
check_language(CSharp)
if (CMAKE_CSharp_COMPILER)
  add_test(NAME UseSWIG.BasicCsharp COMMAND
    ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
    --build-and-test
    "${CMake_SOURCE_DIR}/Tests/UseSWIG/BasicCsharp"
    "${CMake_BINARY_DIR}/Tests/UseSWIG/BasicCsharp"
    ${build_generator_args}
    --build-project TestBasicCsharp
    --build-options ${build_options}
    --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
    )
endif()
add_test(NAME UseSWIG.NamespaceCsharp COMMAND
  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  --build-and-test
  "${CMake_SOURCE_DIR}/Tests/UseSWIG/NamespaceCsharp"
  "${CMake_BINARY_DIR}/Tests/UseSWIG/NamespaceCsharp"
  ${build_generator_args}
  --build-project TestNamespaceCsharp
  --build-options ${build_options}
  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  )

add_test(NAME UseSWIG.BasicPython COMMAND
  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  --build-and-test
  "${CMake_SOURCE_DIR}/Tests/UseSWIG/BasicPython"
  "${CMake_BINARY_DIR}/Tests/UseSWIG/BasicPython"
  ${build_generator_args}
  --build-project TestBasicPython
  --build-options ${build_options}
  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  )
add_test(NAME UseSWIG.BasicPerl COMMAND
  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  --build-and-test
  "${CMake_SOURCE_DIR}/Tests/UseSWIG/BasicPerl"
  "${CMake_BINARY_DIR}/Tests/UseSWIG/BasicPerl"
  ${build_generator_args}
  --build-project TestBasicPerl
  --build-options ${build_options}
  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  )

if (CMake_TEST_UseSWIG_Fortran)
  check_language(Fortran)
  if (CMAKE_Fortran_COMPILER)
    add_test(NAME UseSWIG.BasicFortran COMMAND
      ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
      --build-and-test
      "${CMake_SOURCE_DIR}/Tests/UseSWIG/BasicFortran"
      "${CMake_BINARY_DIR}/Tests/UseSWIG/BasicFortran"
      ${build_generator_args}
      --build-project TestBasicFortran
      --build-options ${build_options}
      --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
      )
  endif()
endif()

add_test(NAME UseSWIG.MultipleModules COMMAND
  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  --build-and-test
  "${CMake_SOURCE_DIR}/Tests/UseSWIG/MultipleModules"
  "${CMake_BINARY_DIR}/Tests/UseSWIG/MultipleModules"
  ${build_generator_args}
  --build-project TestMultipleModules
  --build-options ${build_options}
  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  )
add_test(NAME UseSWIG.MultiplePython COMMAND
  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  --build-and-test
  "${CMake_SOURCE_DIR}/Tests/UseSWIG/MultiplePython"
  "${CMake_BINARY_DIR}/Tests/UseSWIG/MultiplePython"
  ${build_generator_args}
  --build-project TestMultiplePython
  --build-options ${build_options}
  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  )


add_test(NAME UseSWIG.ModuleVersion2 COMMAND
  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  --build-and-test
  "${CMake_SOURCE_DIR}/Tests/UseSWIG/ModuleVersion2"
  "${CMake_BINARY_DIR}/Tests/UseSWIG/ModuleVersion2"
  ${build_generator_args}
  --build-project TestModuleVersion2
  --build-options ${build_options}
  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  )


add_test(NAME UseSWIG.UseTargetINCLUDE_DIRECTORIES COMMAND
  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  --build-and-test
  "${CMake_SOURCE_DIR}/Tests/UseSWIG/UseTargetINCLUDE_DIRECTORIES"
  "${CMake_BINARY_DIR}/Tests/UseSWIG/UseTargetINCLUDE_DIRECTORIES"
  ${build_generator_args}
  --build-project TestUseTargetINCLUDE_DIRECTORIES
  --build-options ${build_options}
  )


add_test(NAME UseSWIG.ModuleName COMMAND
  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  --build-and-test
  "${CMake_SOURCE_DIR}/Tests/UseSWIG/ModuleName"
  "${CMake_BINARY_DIR}/Tests/UseSWIG/ModuleName"
  ${build_generator_args}
  --build-project TestModuleName
  --build-options ${build_options}
  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  )


add_test(NAME UseSWIG.SwigSrcFileExtension COMMAND
  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  --build-and-test
  "${CMake_SOURCE_DIR}/Tests/UseSWIG/SwigSrcFileExtension"
  "${CMake_BINARY_DIR}/Tests/UseSWIG/SwigSrcFileExtension"
  ${build_generator_args}
  --build-project SwigSrcFileExtension
  --build-options ${build_options}
  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  )


add_test(NAME UseSWIG.AlternateLibraryName COMMAND
  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
  --build-and-test
  "${CMake_SOURCE_DIR}/Tests/UseSWIG/AlternateLibraryName"
  "${CMake_BINARY_DIR}/Tests/UseSWIG/AlternateLibraryName"
  ${build_generator_args}
  --build-project TestAlternateLibraryName
  --build-options ${build_options}
  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
  )