Skip to content

Commit

Permalink
Change min CMake version from 2.8.11 to 3.10.0 (trilinos/Trilinos#1761)
Browse files Browse the repository at this point in the history
This will open the door to remove a bunch of conditional code for older CMake
versions and will then allow for some refactorings that require newer versions
of CMake.  See trilinos/Trilinos#1761 for the motiviations for this.
  • Loading branch information
bartlettroscoe committed Oct 10, 2018
1 parent a5d1ece commit 52cec81
Show file tree
Hide file tree
Showing 19 changed files with 54 additions and 47 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
IF (NOT TRIBITS_PROCESSING_PACKAGE)
# This CMakeLists.txt file is being processed as the TriBITS projects's base
# CMakeLists.txt file! (See comments at bottom of this file.)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0 FATAL_ERROR)
INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/ProjectName.cmake")
PROJECT(${PROJECT_NAME} NONE)
SET(${PROJECT_NAME}_TRIBITS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tribits" CACHE PATH "")
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Developing on TriBITS
In order to make changes and enhancements to TriBITS (see `Contributing to
TriBITS`_ and the role `TriBITS System Developer`_), one must be able to
build, run, and extend the automated TriBITS test suite. To develop on
TriBITS, one must minimally have CMake 2.8.11 (or newer) and a working C and
TriBITS, one must minimally have CMake 3.10.0 (or newer) and a working C and
C++ compiler. (A Fortran compiler is also desired to test Fortran-specific
features of TriBITS but it can be disabled, see below).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0)
SET(PROJECT_NAME TAATDriver)
PROJECT(${PROJECT_NAME} NONE)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0)
SET(PROJECT_NAME TAATDriver)
PROJECT(${PROJECT_NAME} NONE)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# TribitsTplFindIncludeDirsAndLibraries.cmake modules.
#

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0)

# Passed in on command-line
MESSAGE("${PROJECT_NAME} = ${PROJECT_NAME}")
Expand Down
49 changes: 28 additions & 21 deletions tribits/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
----------------------------------------
Release Notes for TriBITS
----------------------------------------

2108/10/10:

(*) MAJOR: TriBITS Core: Changed minimum CMake version from 2.8.11 to 3.10.0.

2017/09/25:

(*) MINOR: Added cache and enve vars CTEST_SUBMIT_RETRY_COUNT and
CTEST_SUBMIT_RETRY_DELAY to allow the number of ctest_submit() submit
attemtps to retry and how how log to pause between retries. Before, these
were hard-coded to 25 and 120 respectively, which means that something
like a MySQL insertion error could consume as much as 50 minutes befor
moving on! The new defalts are set at 5 retries with a 3 sec delay (which
appear to be the CTest defaults).
(*) MINOR: TriBITS CTest Driver: Added cache and enve vars
CTEST_SUBMIT_RETRY_COUNT and CTEST_SUBMIT_RETRY_DELAY to allow the number
of ctest_submit() submit attemtps to retry and how how log to pause
between retries. Before, these were hard-coded to 25 and 120
respectively, which means that something like a MySQL insertion error
could consume as much as 50 minutes befor moving on! The new defalts are
set at 5 retries with a 3 sec delay (which appear to be the CTest
defaults).

2017/09/30:

(*) MINOR: Added TEST_<IDX> COPY_FILES_TO_TEST_DIR block for
(*) MINOR: TriBITS Core: Added TEST_<IDX> COPY_FILES_TO_TEST_DIR block for
TRIBITS_ADD_ADVANCED_TEST(). This was added in such a way so to avoid
clashing with existing usages of the script (since the new arguments
SOURCE_DIR and DEST_DIR are only parsed if COPY_FILES_TO_TEST_DIR is
listed in the TEST_<IDX> block.

2017/09/05:

(*) MINOR: Unparsed and otherwise ignored arguments are now flagged (see
developers guide documentation for
(*) MINOR: TriBITS Core: Unparsed and otherwise ignored arguments are now
flagged (see developers guide documentation for
${PROJECT_NAME}_CHECK_FOR_UNPARSED_ARGUMENTS). The default value is
'WARNING' which results in simply printing a warning but allow configure
to complete. This allows one to see the warnings but for the project to
Expand All @@ -31,8 +37,8 @@ Release Notes for TriBITS

2017/06/24:

(*) MINOR: Add new all-at-once more for CTest -S driver scripts using
TRIBITS_CTEST_DRIVER() by setting the variable
(*) MINOR: TriBITS CTest Driver: Add new all-at-once more for CTest -S driver
scripts using TRIBITS_CTEST_DRIVER() by setting the variable
${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE=TRUE. This works with older versions
of CMake/CTest and CDash but, by default, will just return a single glob
of results, not breaking results out package-by-package. Therefore, this
Expand All @@ -50,27 +56,27 @@ Release Notes for TriBITS

2017/05/25:

(*) MINOR: PARSE_ARGUMENTS() has been deprecated and replaced by
(*) MINOR: TriBITS Core: PARSE_ARGUMENTS() has been deprecated and replaced by
CMAKE_PARSE_ARGUMENTS() everywhere in TriBITS. Any call to
PARSE_ARGUMENTS() will warn users and tell them to use
CMAKE_PARSE_ARGUMENTS() instead.

2017/05/17:

(*) MAJOR: TriBITS now unconditionally sets
(*) MAJOR: TriBITS Core: TriBITS now unconditionally sets
${PROJECT_NAME}_ENABLE_Fortran_DEFAULT to ON. Projects will now need to
put in special logic to set to OFF or ON for certain platforms.

2017/01/11:

(*) MINOR: TriBITS now correctly sets the default value for
(*) MINOR: TriBITS Core: TriBITS now correctly sets the default value for
DART_TESTING_TIMEOUT to 1500 seconds and will scale it by
<Project>_SCALE_TEST_TIMEOUT even if DART_TESTING_TIMEOUT is not
explicitly set.

2016/12/07:

(*) MAJOR: The long deprecated variable
(*) MAJOR: TriBITS Core: The long deprecated variable
${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE has been removed. Upgrading
existing TriBITS projects just requires a simple string replacement of
_ENABLE_SECONDARY_STABLE_CODE with _ENABLE_SECONDARY_TESTED_CODE in all
Expand All @@ -80,11 +86,12 @@ Release Notes for TriBITS

2016/11/02:

(*) MAJOR: gitdist now accepts --dist-repos and --dist-not-repos arguments and
requires that the base repo '.' be explicitly listed in the
.gitdist[.default] files and in --dist-repos. The arguments
--dist-extra-repos, --dist-not-extra-repos and --dist-not-base-repo are
not longer supported. See gitdist --help for more details.
(*) MAJOR: TriBITS Python Utils: gitdist now accepts --dist-repos and
--dist-not-repos arguments and requires that the base repo '.' be
explicitly listed in the .gitdist[.default] files and in --dist-repos.
The arguments --dist-extra-repos, --dist-not-extra-repos and
--dist-not-base-repo are not longer supported. See gitdist --help for
more details.

(*) MINOR: TriBITS projects now install with full RPATH set by default (see
"Setting install RPATH" in build reference guide).
Expand Down
2 changes: 1 addition & 1 deletion tribits/core/package_arch/TribitsAddAdvancedTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ INCLUDE(PrintVar)
# ``${PROJECT_NAME}_TRIBITS_DIR`` (pointing to the TriBITS location). For example,
# a valid project can be a simple as::
#
# CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
# CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0)
# SET(PROJECT_NAME TAATDriver)
# PROJECT(${PROJECT_NAME} NONE)
# SET(${PROJECT_NAME}_TRACE_ADD_TEST TRUE)
Expand Down
2 changes: 1 addition & 1 deletion tribits/core/package_arch/TribitsConstants.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

# Define the TriBITS minimum required CMake version

SET(TRIBITS_CMAKE_MINIMUM_REQUIRED 2.8.11)
SET(TRIBITS_CMAKE_MINIMUM_REQUIRED 3.10.0)

MACRO(TRIBITS_ASESRT_MINIMUM_CMAKE_VERSION)

Expand Down
2 changes: 1 addition & 1 deletion tribits/ctest_driver/TribitsCTestDriverCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ MESSAGE("*******************************")
MESSAGE("")


CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0 FATAL_ERROR)

#
# Get the basic variables that define the project and the build
Expand Down
4 changes: 2 additions & 2 deletions tribits/doc/build_ref/create-project-build-ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
clp.add_option(
"--min-cmake-version", dest="minCMakeVersion", type="string",
help="Minimum version of CMake needed for given project" \
" [Default '2.8.11']",
default="2.8.11" )
" [Default '3.10.0']",
default="3.10.0" )

GenerateDocUtilsOutput.addCmndLineOptions(clp)

Expand Down
6 changes: 3 additions & 3 deletions tribits/doc/developers_guide/TribitsDevelopersGuide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ the variable ``TRIBITS_CMAKE_MINIMUM_REQUIRED`` (the current minimum version
of CMake required by TriBITS is given at in `Getting set up to use CMake`_) .
For example, the ``VERA/CMakeLists.txt`` file lists as its first line::

SET(VERA_TRIBITS_CMAKE_MINIMUM_REQUIRED 2.8.11)
SET(VERA_TRIBITS_CMAKE_MINIMUM_REQUIRED 3.10.0)
CMAKE_MINIMUM_REQUIRED(VERSION ${VERA_TRIBITS_CMAKE_MINIMUM_REQUIRED}
FATAL_ERROR)

Expand Down Expand Up @@ -4553,7 +4553,7 @@ Test Test Category ``BASIC`` (`Test Test Category BASIC`_)

Typically a TriBITS project will define a "standard development environment"
which is comprised of a standard compiler (e.g. GCC 4.6.1), TPL versions
(e.g. OpenMPI 1.4.2, Boost 4.9, etc.), and other tools (e.g. cmake 2.8.11, git
(e.g. OpenMPI 1.4.2, Boost 4.9, etc.), and other tools (e.g. cmake 3.10.0, git
1.8.2, etc.). This standard development environment is expected to be used to
test changes to the project's code before any push. By using a standard
development environment, if the code builds and all the tests pass for the
Expand Down Expand Up @@ -9047,7 +9047,7 @@ Below is a snapshot of the output from ``install_devtools.py --help``.

.. Common references to raw CMake commands:
.. _CONFIGURE_FILE(): http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:configure_file
.. _CONFIGURE_FILE(): https://cmake.org/cmake/help/v3.10/command/configure_file.html

.. Other references
Expand Down
4 changes: 2 additions & 2 deletions tribits/doc/tutorial/src/TribitsTutorial_ConvertAProject.rst
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ in this project level CMakeLists file:
1. CMAKE_MINIMUM_VERSION() - set the minimum version of cmake required
for this project o build. If you try and run with a lower version
then there wil be an error. You cannot specify a version lower than
2.8.11
3.10.0
#. Include ProjectNmae.cmake and call PROJECT() with argument PROJECT_NAME
#. specify the directory to tribits and include TriBITS.cmake
#. specify which packages are turned on/off by default
Expand All @@ -401,7 +401,7 @@ in this project level CMakeLists file:
Here is an examlpe of a project CMakeLists::

# Deefine your minimum CMake version
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0 FATAL_ERROR)


# Define your project name and set up major project options
Expand Down
2 changes: 1 addition & 1 deletion tribits/doc/tutorial/src/TribitsTutorial_HelloWorld.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ single line::
have the following contents::

# To be safe, define your minimum CMake version
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0 FATAL_ERROR)
# Make CMake set WIN32 with CYGWIN for older CMake versions
SET(CMAKE_LEGACY_CYGWIN_WIN32 1 CACHE BOOL "" FORCE)
Expand Down
2 changes: 1 addition & 1 deletion tribits/examples/TribitsExampleMetaProject/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# 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)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0 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 :-(
Expand Down
2 changes: 1 addition & 1 deletion tribits/examples/TribitsExampleProject/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# 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)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0 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 :-(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# 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)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0 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 :-(
Expand Down
2 changes: 1 addition & 1 deletion tribits/examples/TribitsHelloWorld/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Example of a simple project that uses TriBITS
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0 FATAL_ERROR)
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/ProjectName.cmake)
PROJECT(${PROJECT_NAME} NONE)
SET(${PROJECT_NAME}_TRIBITS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..
Expand Down
2 changes: 1 addition & 1 deletion tribits/examples/tpls/SimpleTpl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0)

ADD_LIBRARY(simpletpl SimpleTpl.hpp SimpleTpl.cpp)

Expand Down
10 changes: 5 additions & 5 deletions tribits/python_utils/CMakeVersions.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@
# May be the same as cmake_version_min.
#
# cmake_version_rc:
# Latest available release candidate for vdir "v2.8" -- detected automatically
# Latest available release candidate for vdir "v3.10" -- detected automatically
# May be the same as the latest official release if there are no release
# candidates currently available.
#
# cmake_version_dev:
# Latest available build for vdir "vCVS" -- detected automatically
#

cmake_version_min = "2.8.11" # manual_update
cmake_version_min = "3.10.0" # manual_update

cmake_version_release = "2.8.11" # manual_update
cmake_version_release = "3.10.0" # manual_update

cmake_version_rc = "2.8.12.2" # auto_update v2.8
cmake_version_rc = "3.12.0" # auto_update v2.8

cmake_version_dev = "3.0.20140910-g9c6cf" # auto_update vCVS
cmake_version_dev = "3.12.0" # auto_update vCVS

0 comments on commit 52cec81

Please sign in to comment.