Skip to content

Commit

Permalink
Bump required CMake version to 3.10
Browse files Browse the repository at this point in the history
Add version check to UseLatexMk.cmake.
CMake 3.10 is required for the include_guard command
  • Loading branch information
gruenich committed Nov 22, 2023
1 parent 12f8374 commit 98aa4b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# It is not actually needed for downstream use.
#

cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)
project(UseLatexMk)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR})
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You just need to
* copy all the CMake modules (`*.cmake`) from this project into your project
* Include them with `include(UseLatexMk)`. This is best done from the top-level
directory of your project, to make the `clean_latex` target available on that level.
* Use CMake 3.5 or newer.
* Use CMake 3.10 or newer.

Now, you are ready to use it!

Expand Down
5 changes: 5 additions & 0 deletions UseLatexMk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@
#
include_guard(GLOBAL)

# ensure CMake version is recent enough
if(CMAKE_VERSION VERSION_LESS 3.10)
message(FATAL_ERROR "UseLatexMk.cmake requires CMake 3.10 or newer")
endif()

# Find LATEX and LatexMk
find_package(LATEX)
find_package(LatexMk)
Expand Down

0 comments on commit 98aa4b8

Please sign in to comment.