google / google/clspv

`target_include_directories` on line 120 for on `lib/CMakeLists.txt` would make configuration step failed when this project (clspv_core) is linked by other project.

Open
#1,513 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
LLVM
Stars
729
Forks
110
Avg merge
17h 51m
Merged PRs (30d)
23

Description

Line 120 of `lib/CMakeLists.txt` is as following:
```cmake
target_include_directories(${clspv_lib} PUBLIC ${CLSPV_INCLUDE_DIRS})
```

Currently, I've seen a variable `CLSPV_INCLUDE_DIRS` containing:
- Directory `include` on root directory which SHOULD be public.
- Directory prefixed on build which SHOULD be private.

This is an brief of fix in my opinion:
```cmake
# The include directory which SHOULD be public.
target_include_directories(
${clspv_lib} INTERFACE
$ # Include directory on build state
$ # include directory as installed.
)

# The include directory which SHOULD be private.
target_include_directories(
${clspv_lib} PRIVATE
${CLSPV_INCLUDE_DIRS}
)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.