Skip to content

Commit

Permalink
Switch to raw assert for min CMake version
Browse files Browse the repository at this point in the history
Now that the minimum CMake version is 2.8.11, it seems that CMake now allows
to to assert the minimum CMake version in an included file.

However, you still need to provide a minimum CMake version in the base project
CMakeLists.txt file or CMake provides a warning.
  • Loading branch information
Roscoe A. Bartlett committed Dec 5, 2014
1 parent f8c1682 commit 4ce8814
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tribits/examples/TribitsExampleProject/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# #
################################################################################

# To be safe, define your minimum CMake version. This may be newer than the
# min required by TriBITS.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)

# Make CMake set WIN32 with CYGWIN for older CMake versions. CMake requires
# this to be in the top-level CMakeLists.txt file and not an include file :-(
SET(CMAKE_LEGACY_CYGWIN_WIN32 1 CACHE BOOL "" FORCE)
Expand Down
4 changes: 4 additions & 0 deletions tribits/examples/TribitsHelloWorld/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Example of a simple project that uses TriBITS

# To be safe, define your minimum CMake version. This may be newer than the
# min required by TriBITS.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)

# Make CMake set WIN32 with CYGWIN for older CMake versions. CMake requires
# this to be in the top-level CMakeLists.txt file and not an include file :-(
SET(CMAKE_LEGACY_CYGWIN_WIN32 1 CACHE BOOL "" FORCE)
Expand Down

0 comments on commit 4ce8814

Please sign in to comment.