bash-5.2$ cmake -S . -B build --trace-expand --trace-source=/Users/clausklein/.local/lib/cmake/beman.exemplar/beman.exemplar-config.cmake --trace-source=/Users/clausklein/.local/lib/cmake/beman.exemplar/beman.exemplar-targets-noconfig.cmake
Put cmake in trace mode, but with variables expanded.
Put cmake in trace mode, but output only lines of a specified file. Multiple options are allowed.
Put cmake in trace mode, but output only lines of a specified file. Multiple options are allowed.
CMake Error at CMakeLists.txt:14 (find_package):
Could not find a configuration file for package "beman.exemplar" that
exactly matches requested version "2.1.2".
The following configuration files were considered but not accepted:
/Users/clausklein/.local/lib/cmake/beman.exemplar/beman.exemplar-config.cmake, version: unknown
-- Configuring incomplete, errors occurred!
bash-5.2$
I use this CMakeLists.txt
cmake_minimum_required(VERSION 3.28...4.0)
project(beman.exemplar.examples DESCRIPTION "Examaples for Beman implementation of exemplar"
LANGUAGES CXX VERSION 2.1.1
)
if(PROJECT_IS_TOP_LEVEL)
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 20)
endif()
find_package(beman.exemplar 2.1.2 EXACT REQUIRED)
if(NOT beman.execution_FOUND)
add_subdirectory(.. exemplar)
endif()
enable_testing()
endif()
include(CMakePrintHelpers)
cmake_print_variables(CMAKE_CXX_STANDARD CMAKE_PROJECT_NAME CMAKE_PROJECT_VERSION CMAKE_SOURCE_DIR)
cmake_print_variables(CMAKE_CXX_SCAN_FOR_MODULES PROJECT_NAME PROJECT_VERSION PROJECT_SOURCE_DIR)
I use this
CMakeLists.txt