@@ -96,7 +96,7 @@ endfunction()
9696# This is a function which set up the environment for executing python examples and tests
9797#
9898function (sitk_add_python_test name )
99- if (NOT WRAP_PYTHON)
99+ if (NOT WRAP_PYTHON AND NOT CMAKE_PROJECT_NAME STREQUAL "SimpleITK_Python" )
100100 return ()
101101 endif ()
102102
@@ -141,7 +141,7 @@ endfunction()
141141# This is a function which set up the environment for executing python examples and tests
142142#
143143function (sitk_add_pytest_test name )
144- if (NOT WRAP_PYTHON)
144+ if (NOT WRAP_PYTHON AND NOT CMAKE_PROJECT_NAME STREQUAL "SimpleITK_Python" )
145145 return ()
146146 endif ()
147147
@@ -192,7 +192,7 @@ endfunction()
192192# This is a function which set up the enviroment for executing lua examples and tests
193193#
194194function (sitk_add_lua_test name )
195- if (NOT WRAP_LUA)
195+ if (NOT WRAP_LUA AND NOT CMAKE_PROJECT_NAME STREQUAL "SimpleITK_Lua" )
196196 return ()
197197 endif ()
198198
@@ -235,7 +235,7 @@ endfunction()
235235# This is a function which set up the enviroment for executing ruby examples and tests
236236#
237237function (sitk_add_ruby_test name )
238- if (NOT WRAP_RUBY)
238+ if (NOT WRAP_RUBY AND NOT CMAKE_PROJECT_NAME STREQUAL "SimpleITK_Ruby" )
239239 return ()
240240 endif ()
241241
@@ -278,7 +278,7 @@ endfunction()
278278# This is a function which set up the enviroment for executing TCL examples and tests
279279#
280280function (sitk_add_tcl_test name )
281- if (NOT WRAP_TCL)
281+ if (NOT WRAP_TCL AND NOT CMAKE_PROJECT_NAME STREQUAL "SimpleITK_Tcl" )
282282 return ()
283283 endif ()
284284
@@ -313,7 +313,7 @@ endfunction()
313313# This is a function which set up the enviroment for executing JAVA examples and tests
314314#
315315function (sitk_add_java_test name java_file )
316- if (NOT WRAP_JAVA)
316+ if (NOT WRAP_JAVA AND NOT CMAKE_PROJECT_NAME STREQUAL "SimpleITK_Java" )
317317 return ()
318318 endif ()
319319
@@ -383,7 +383,7 @@ endfunction()
383383# This is a function which set up the enviroment for executing R examples and tests
384384#
385385function (sitk_add_r_test name )
386- if (NOT WRAP_R)
386+ if (NOT WRAP_R AND NOT CMAKE_PROJECT_NAME STREQUAL "SimpleITK_R" )
387387 return ()
388388 endif ()
389389
@@ -438,7 +438,7 @@ endfunction()
438438# enviroment for executing CSharp examples and tests.
439439#
440440function (sitk_add_csharp_test name csharp_file )
441- if (NOT WRAP_CSHARP)
441+ if (NOT WRAP_CSHARP AND NOT CMAKE_PROJECT_NAME STREQUAL "SimpleITK_CSharp" )
442442 return ()
443443 endif ()
444444
0 commit comments