From 9511995d040025b00af7eb388f9428106b31ccb7 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Fri, 12 Jan 2024 12:32:12 +0100 Subject: [PATCH] build: `find_package()` calls don't spell `CONFIG` explicitly anymore --- docs/getting_started/installation_and_usage.md | 2 +- example/CMakeLists.txt | 2 +- src/core/CMakeLists.txt | 4 ++-- test/runtime/CMakeLists.txt | 4 ++-- test_package/CMakeLists.txt | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/getting_started/installation_and_usage.md b/docs/getting_started/installation_and_usage.md index 9e4163c7..b2c820a4 100644 --- a/docs/getting_started/installation_and_usage.md +++ b/docs/getting_started/installation_and_usage.md @@ -354,7 +354,7 @@ The following steps may be performed to obtain an official library release: with `find_package`: ```cmake - find_package(mp-units CONFIG REQUIRED) + find_package(mp-units REQUIRED) ``` 3. Link your CMake targets with **mp-units**: diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 2fe3aea3..36364f12 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -24,7 +24,7 @@ cmake_minimum_required(VERSION 3.5) # find dependencies if(NOT TARGET gsl::gsl-lite) - find_package(gsl-lite CONFIG REQUIRED) + find_package(gsl-lite REQUIRED) endif() if(${projectPrefix}BUILD_CXX_MODULES) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 1ed2cfec..4044cd35 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -24,7 +24,7 @@ cmake_minimum_required(VERSION 3.19) # find dependencies if(NOT TARGET gsl::gsl-lite) - find_package(gsl-lite CONFIG REQUIRED) + find_package(gsl-lite REQUIRED) endif() # core library definition @@ -83,7 +83,7 @@ target_compile_definitions( if(${projectPrefix}USE_LIBFMT) if(NOT TARGET fmt::fmt) - find_package(fmt CONFIG REQUIRED) + find_package(fmt REQUIRED) endif() target_link_libraries(mp-units-core ${${projectPrefix}TARGET_SCOPE} fmt::fmt) endif() diff --git a/test/runtime/CMakeLists.txt b/test/runtime/CMakeLists.txt index 29fa0036..b22c7022 100644 --- a/test/runtime/CMakeLists.txt +++ b/test/runtime/CMakeLists.txt @@ -22,7 +22,7 @@ cmake_minimum_required(VERSION 3.5) -find_package(Catch2 3 CONFIG REQUIRED) +find_package(Catch2 3 REQUIRED) add_executable(unit_tests_runtime distribution_test.cpp fmt_test.cpp math_test.cpp) if(${projectPrefix}BUILD_CXX_MODULES) @@ -31,7 +31,7 @@ endif() target_link_libraries(unit_tests_runtime PRIVATE mp-units::mp-units Catch2::Catch2WithMain) if(${projectPrefix}BUILD_LA) - find_package(wg21_linear_algebra CONFIG REQUIRED) + find_package(wg21_linear_algebra REQUIRED) target_sources(unit_tests_runtime PRIVATE linear_algebra_test.cpp) target_link_libraries(unit_tests_runtime PRIVATE wg21_linear_algebra::wg21_linear_algebra) endif() diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index 770b3d8f..e19fe46d 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -23,7 +23,7 @@ cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -find_package(mp-units CONFIG REQUIRED) +find_package(mp-units REQUIRED) add_executable(test_package test_package.cpp) target_link_libraries(test_package PRIVATE mp-units::mp-units)