Skip to content

Simplify wrapping logic by setting WRAP_<LANGUAGE> in each wrapper - #2604

Merged
blowekamp merged 1 commit into
SimpleITK:mainfrom
blowekamp:fix_undefined_wrapping_option
May 22, 2026
Merged

blowekamp merged 1 commit into
SimpleITK:mainfrom
blowekamp:fix_undefined_wrapping_option

Conversation

@blowekamp

Copy link
Copy Markdown
Member

Add set(WRAP_<LANGUAGE> ON) to all language wrapper CMakeLists.txt files and simplify the conditional checks in sitk_add_<language>_test functions to only check WRAP_<LANGUAGE> instead of both WRAP_<LANGUAGE> and CMAKE_PROJECT_NAME.

This fixes test failures on the dashboard when a wrapping directory is built as a standalone project.

Changes

  • Add set(WRAP_<LANGUAGE> ON) to:

    • Wrapping/CSharp/CMakeLists.txt
    • Wrapping/Java/CMakeLists.txt
    • Wrapping/Lua/CMakeLists.txt
    • Wrapping/R/CMakeLists.txt
    • Wrapping/Ruby/CMakeLists.txt
    • Wrapping/Tcl/CMakeLists.txt
    • (Wrapping/Python/CMakeLists.txt already had this)
  • Simplify CMake/sitkAddTest.cmake: remove redundant CMAKE_PROJECT_NAME checks from sitk_add_python_test, sitk_add_pytest_test, sitk_add_lua_test, sitk_add_ruby_test, sitk_add_tcl_test, sitk_add_java_test, sitk_add_r_test, and sitk_add_csharp_test.

Add set(WRAP_<LANGUAGE> ON) to all wrapper CMakeLists.txt files and simplify
the conditional checks in sitk_add_<language>_test functions to only check
WRAP_<LANGUAGE> instead of both WRAP_<LANGUAGE> and CMAKE_PROJECT_NAME.

This fixes test failures on the dashboard when a wrapping directory is built
as a standalone project.
@blowekamp
blowekamp requested review from dave3d and zivy May 22, 2026 13:42
@blowekamp blowekamp changed the title Simplify wrapping logic by setting WRAP_&lt;LANGUAGE&gt; in each wrapper Simplify wrapping logic by setting WRAP_<LANGUAGE> in each wrapper May 22, 2026
@blowekamp
blowekamp merged commit ab652b5 into SimpleITK:main May 22, 2026
10 checks passed
@blowekamp
blowekamp deleted the fix_undefined_wrapping_option branch September 9, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants