If I use find_package with a version, it will fail!
bash-5.2$ ctest --verbose --rerun-failed
UpdateCTestConfiguration from :/Users/clausklein/Workspace/cpp/beman-project/execution26/build/release/DartConfiguration.tcl
UpdateCTestConfiguration from :/Users/clausklein/Workspace/cpp/beman-project/execution26/build/release/DartConfiguration.tcl
Test project /Users/clausklein/Workspace/cpp/beman-project/execution26/build/release
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 82
Start 82: find-package-test
82: Test command: /usr/local/Cellar/cmake/3.30.5/bin/ctest "--output-on-failure" "-C" "RelWithDebInfo" "--build-and-test" "/Users/clausklein/Workspace/cpp/beman-project/execution26/src/beman/execution26/tests" "/Users/clausklein/Workspace/cpp/beman-project/execution26/build/release/src/beman/execution26/tests/find-package-test" "--build-generator" "Ninja" "--build-makeprogram" "/usr/local/bin/ninja" "--build-options" "-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_PREFIX_PATH=/Users/clausklein/Workspace/cpp/beman-project/execution26/stagedir"
82: Working Directory: /Users/clausklein/Workspace/cpp/beman-project/execution26/build/release/src/beman/execution26/tests
82: Test timeout computed to be: 10000000
82: Internal cmake changing into directory: /Users/clausklein/Workspace/cpp/beman-project/execution26/build/release/src/beman/execution26/tests/find-package-test
82: Error: cmake execution failed
82: CMake Error at CMakeLists.txt:95 (find_package):
82: Could not find a configuration file for package "beman_execution26" that
82: exactly matches requested version "0.0.1".
82:
82: The following configuration files were considered but not accepted:
82:
82: /Users/clausklein/Workspace/cpp/beman-project/execution26/stagedir/lib/cmake/beman_execution26/beman_execution26-config.cmake, version: unknown
82:
82:
82:
82: Configuring incomplete, errors occurred!
82:
1/1 Test #82: find-package-test ................***Failed 0.13 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 0.14 sec
The following tests FAILED:
82 - find-package-test (Failed)
Errors while running CTest
Output from these tests are in: /Users/clausklein/Workspace/cpp/beman-project/execution26/build/release/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
bash-5.2$
If I use
find_package
with aversion
, it will fail!