[feature] Set `CMAKE_FIND_PACKAGE_PREFER_CONFIG` in `conan_toolchain.cmake`
See original GitHub issuePlease consider setting CMAKE_FIND_PACKAGE_PREFER_CONFIG in the conan_toolchain.cmake. This will allow CMake to prefer configuration files generated by CMakeDeps over the ones provided with CMake release (i.e. FindGTest.cmake).
- I’ve read the CONTRIBUTING guide.
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (15 by maintainers)
Top Results From Across the Web
FeatureSummary — CMake 3.25.1 Documentation
The features for which information can be set are added automatically by the find_package() command. URL <url>. This should be the homepage of...
Read more >CMake 3.25.1 Documentation
Specify the cross compiling toolchain file, equivalent to setting CMAKE_TOOLCHAIN_FILE variable. --install-prefix <directory>¶. Specify the installation ...
Read more >cmake-toolchains(7) — CMake 3.25.1 Documentation
Introduction¶. CMake uses a toolchain of utilities to compile, link libraries and create archives, and other tasks to drive the build.
Read more >project — CMake 3.25.1 Documentation
Sets the name of the project, and stores it in the variable PROJECT_NAME . When called from the top-level CMakeLists.txt also stores the...
Read more >target_compile_features — CMake 3.25.1 Documentation
Specifies compiler features required when compiling a given target. ... New in version 3.11: Allow setting INTERFACE items on IMPORTED targets.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@mpusz check the
CMakeGenin https://github.com/conan-io/conan/pull/8534. It is basically what you suggest. We are doing first the “building blocks”, make sure they work fine, are configurable enough, etc, and we will do higher level abstractions later.Sure, this is not only for teaching, but mostly to inform customers what to do now to ease the process of migration to Conan 2.0 when it comes.