Skip to content

Commit

Permalink
Merge pull request #523 from bartlettroscoe/522-cmake-minimum-required
Browse files Browse the repository at this point in the history
Add version check and calls to cmake_minimum_required() (#522)
  • Loading branch information
bartlettroscoe authored Aug 25, 2022
2 parents 4ab6cae + ab41942 commit 8817a8f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@
#
##############################################################################

if(CMAKE_VERSION VERSION_LESS 3.3)
set(${PDOLLAR}{CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE
"${PACKAGE_NAME} requires CMake 3.3 or later for 'if (... IN_LIST ...)'"
)
set(${PDOLLAR}{CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE)
return()
endif()
cmake_minimum_required(VERSION 3.3...${CMAKE_VERSION})

## ---------------------------------------------------------------------------
## Compilers used by ${PROJECT_NAME}/${PACKAGE_NAME} build
## ---------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@
#
##############################################################################

if(CMAKE_VERSION VERSION_LESS 3.3)
set(${PDOLLAR}{CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE
"${PROJECT_NAME} requires CMake 3.3 or later for 'if (... IN_LIST ...)'"
)
set(${PDOLLAR}{CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE)
return()
endif()
cmake_minimum_required(VERSION 3.3...${CMAKE_VERSION})

## ---------------------------------------------------------------------------
## Compilers used by ${PROJECT_NAME} build
## ---------------------------------------------------------------------------
Expand Down

0 comments on commit 8817a8f

Please sign in to comment.