CMakePushCheckState: Enhance documentation

This describes module macros as a list separately, adds some formatting
with synced lowercase code style, and extends examples a bit.
Additionally, the CMAKE_REQUIRED_QUIET variable is listed.
This commit is contained in:
Peter Kokot
2025-01-17 15:44:33 +01:00
parent 759b55991a
commit 8f2b7d2f53
3 changed files with 123 additions and 29 deletions
+2 -2
View File
@@ -46,7 +46,7 @@ function(_FIND_OPENCL_VERSION)
include(CMakePushCheckState)
set(CMAKE_REQUIRED_QUIET ${OpenCL_FIND_QUIETLY})
CMAKE_PUSH_CHECK_STATE()
cmake_push_check_state()
foreach(VERSION "3_0" "2_2" "2_1" "2_0" "1_2" "1_1" "1_0")
set(CMAKE_REQUIRED_INCLUDES "${OpenCL_INCLUDE_DIR}")
@@ -73,7 +73,7 @@ function(_FIND_OPENCL_VERSION)
break()
endif()
endforeach()
CMAKE_POP_CHECK_STATE()
cmake_pop_check_state()
endfunction()
find_path(OpenCL_INCLUDE_DIR