← All tasks
cppuxlfoundation/oneTBB #531Not a task: already works

Linking Error When Path Contains Space Characters

envgap__uxlfoundation__oneTBB-531

01 / FAILURE SIGNATURE

As reported upstream

When ```${CMAKE_CURRENT_SOURCE_DIR}``` contains spaces, it is treated as 2 separate linkage flags and linking error occurs. Please wrap it is double quotes to fix it:
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
6bfd29bde7e9c47bdfc3ae8a1670ea961c95c78c
Manifest
src/tbb/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

uxlfoundation/oneTBB #531 · read the original issue
```src/tbb/CMakeLists.txt``` lines 92-97:



```

if (TBB_DEF_FILE_PREFIX) # If there's no prefix, assume we're using export directives

    set_target_properties(tbb PROPERTIES

        LINK_FLAGS ${TBB_LINK_DEF_FILE_FLAG}${CMAKE_CURRENT_SOURCE_DIR}/def/${TBB_DEF_FILE_PREFIX}-tbb.def

        LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/def/${TBB_DEF_FILE_PREFIX}-tbb.def

    )

endif()

```



When ```${CMAKE_CURRENT_SOURCE_DIR}``` contains spaces, it is treated as 2 separate linkage flags and linking error occurs. Please wrap it is double quotes to fix it:



```

if (TBB_DEF_FILE_PREFIX) # If there's no prefix, assume we're using export directives

    set_target_properties(tbb PROPERTIES

        LINK_FLAGS ""${TBB_LINK_DEF_FILE_FLAG}${CMAKE_CURRENT_SOURCE_DIR}/def/${TBB_DEF_FILE_PREFIX}-tbb.def""

        LINK_DEPENDS ""${CMAKE_CURRENT_SOURCE_DIR}/def/${TBB_DEF_FILE_PREFIX}-tbb.def""

    )

endif()

```

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]