You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++] Use the CMake's standard find features #15952
We implement our custom find codes to find libraries by find_library()/find_path() with NO_DEFAULT_PATH. So we need to handle lib64/ (on Red Hat) and lib/x86_64-linux-gnu/ (on Debian) paths manually.
If called from within a find module loaded by find_package(<PackageName>), search prefixes unique to the current package being found. Specifically look in the <PackageName>_ROOT CMake variable and the <PackageName>_ROOT environment variable. The package root variables are maintained as a stack so if called from nested find modules, root paths from the parent’s find module will be searched after paths from the current module, i.e. <CurrentPackage>_ROOT, ENV\{<CurrentPackage>_ROOT}, <ParentPackage>_ROOT, ENV\{<ParentPackage>_ROOT}, etc.
Wes McKinney / @wesm:
What do you think about trying to find the cmake/package-config.cmake file in our FindPACKAGE.cmake files and then fall back on the existing logic if the cmake files are not found? We are already using these for double-conversion, for example, but it would be good to do so consistently.
Kouhei Sutou / @kou:
I agree with the idea that we use find_package() with CONFIGS as the first try.
This is not a scope of this issue but I want to change the current vendored strategy. I want to change to use the system libraries by default and vendored libraries as fallback (and option). Now, we use vendored libraries by default. (e.g.: double-conversion)
If we can use the system libraries by default, users don't need to build existing libraries by default.
Activity
asfimport commentedon Feb 6, 2019
Wes McKinney / @wesm:
What do you think about trying to find the
cmake/package-config.cmakefile in our FindPACKAGE.cmake files and then fall back on the existing logic if the cmake files are not found? We are already using these for double-conversion, for example, but it would be good to do so consistently.asfimport commentedon Feb 7, 2019
Kouhei Sutou / @kou:
I agree with the idea that we use
find_package()withCONFIGSas the first try.This is not a scope of this issue but I want to change the current vendored strategy. I want to change to use the system libraries by default and vendored libraries as fallback (and option). Now, we use vendored libraries by default. (e.g.: double-conversion)
If we can use the system libraries by default, users don't need to build existing libraries by default.
asfimport commentedon Mar 12, 2019
Wes McKinney / @wesm:
I suggest we address this more comprehensively after ARROW-4611 is in
asfimport commentedon Mar 13, 2019
Kouhei Sutou / @kou:
I think that ARROW-4611 will resolve this too.
I'll check this again after ARROW-4611 is merged.
asfimport commentedon Mar 14, 2019
Uwe Korn / @xhochy:
Resolved by PR #3688