mirror of
https://github.com/reactos/CMake.git
synced 2024-11-23 11:39:48 +00:00
FindBoost: Improve messages when a Boost CMake package is found
Add a test for this case to verify the messages. This test will also be valuable to cover this code path in which we've had several regressions recently.
This commit is contained in:
parent
6bced4bf76
commit
c044b9ae84
@ -245,10 +245,9 @@ if (NOT Boost_NO_BOOST_CMAKE)
|
||||
# If we found boost-cmake, then we're done. Print out what we found.
|
||||
# Otherwise let the rest of the module try to find it.
|
||||
if (Boost_FOUND)
|
||||
message("Boost ${Boost_FIND_VERSION} found.")
|
||||
message(STATUS "Boost ${Boost_FIND_VERSION} found.")
|
||||
if (Boost_FIND_COMPONENTS)
|
||||
message("Found Boost components:")
|
||||
message(" ${Boost_FIND_COMPONENTS}")
|
||||
message(STATUS "Found Boost components:\n ${Boost_FIND_COMPONENTS}")
|
||||
endif()
|
||||
# Restore project's policies
|
||||
cmake_policy(POP)
|
||||
|
@ -141,6 +141,7 @@ add_RunCMake_test(DisallowedCommands)
|
||||
add_RunCMake_test(ExternalData)
|
||||
add_RunCMake_test(FeatureSummary)
|
||||
add_RunCMake_test(FPHSA)
|
||||
add_RunCMake_test(FindBoost)
|
||||
if(NOT CMAKE_C_COMPILER_ID MATCHES "Watcom")
|
||||
add_RunCMake_test(GenerateExportHeader)
|
||||
endif()
|
||||
|
3
Tests/RunCMake/FindBoost/CMakeLists.txt
Normal file
3
Tests/RunCMake/FindBoost/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
3
Tests/RunCMake/FindBoost/CMakePackage-stdout.txt
Normal file
3
Tests/RunCMake/FindBoost/CMakePackage-stdout.txt
Normal file
@ -0,0 +1,3 @@
|
||||
-- Boost 1\.12345 found\.
|
||||
-- Found Boost components:
|
||||
date_time
|
2
Tests/RunCMake/FindBoost/CMakePackage.cmake
Normal file
2
Tests/RunCMake/FindBoost/CMakePackage.cmake
Normal file
@ -0,0 +1,2 @@
|
||||
set(Boost_DIR ${CMAKE_CURRENT_SOURCE_DIR}/CMakePackage)
|
||||
find_package(Boost 1.12345 COMPONENTS date_time)
|
@ -0,0 +1,7 @@
|
||||
set(PACKAGE_VERSION 1.12345)
|
||||
if(PACKAGE_FIND_VERSION_MAJOR EQUAL 1)
|
||||
set(PACKAGE_VERSION_COMPATIBLE 1)
|
||||
if(PACKAGE_FIND_VERSION_MINOR EQUAL 12345)
|
||||
set(PACKAGE_VERSION_EXACT 1)
|
||||
endif()
|
||||
endif()
|
3
Tests/RunCMake/FindBoost/RunCMakeTest.cmake
Normal file
3
Tests/RunCMake/FindBoost/RunCMakeTest.cmake
Normal file
@ -0,0 +1,3 @@
|
||||
include(RunCMake)
|
||||
|
||||
run_cmake(CMakePackage)
|
Loading…
Reference in New Issue
Block a user