← All tasks
cppapache/brpc #2805Not a task: not reproduced

Do not restrict CMAKE_MODULE_PATH to a single path

envgap__apache__brpc-2805

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
e1bf467b20e1ca12023ed11b0aad567f6653a735
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

apache/brpc #2805 · read the original issue
**Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**



More or less. It makes it harder to link bRPC against other projects.



**Describe the solution you'd like (描述你期望的解决方法)**



Instead of `set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)`, allow the user to provide other paths while still maintaining this one: 

~~`set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})`.~~

EDIT: `list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")`



With this, developers can provide other paths where `Find<library>.cmake` files exist, in the command line (for example, `cmake -DCMAKE_MODULE_PATH=opt/lib/cmake`.



**Describe alternatives you've considered (描述你想到的折衷方案)**



I had to manually copy `Find<library>.cmake` files to the path indicated by `${PROJECT_SOURCE_DIR}/cmake`... 



**Additional context/screenshots (更多上下文/截图)**



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
[]