Skip to content

Commit

Permalink
master: get_eigen.sh: Advance to newer verison of eigen.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradbell committed Mar 28, 2024
1 parent 0af2efa commit 3a5e88c
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 16 deletions.
16 changes: 14 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ IF( POLICY CMP0054 )
ENDIF( POLICY CMP0054 )
#
# cppad_version is used by version.sh to get the version number.
SET(cppad_version "20240324")
SET(cppad_version "20240328")
SET(cppad_url "https://coin-or.github.io/CppAD" )
SET(cppad_description "Differentiation of C++ Algorithms" )
IF( NOT DEFINED CMAKE_BUILD_TYPE)
Expand Down Expand Up @@ -227,10 +227,19 @@ IF( NOT minimal_cplusplus )
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
ENDIF( NOT minimal_cplusplus )
#
# use_cplusplus_2014_ok
SET(source "
int main(void)
{ static_assert( __cplusplus >= 201302L , \"c++17 is supported\" );
return 0;
}"
)
compile_source_test(${cmake_defined_ok} "${source}" use_cplusplus_2014_ok )
#
# use_cplusplus_2017_ok
SET(source "
int main(void)
{ static_assert( __cplusplus >= 201703 , \"c++17 is supported\" );
{ static_assert( __cplusplus >= 201703L , \"c++17 is supported\" );
return 0;
}"
)
Expand Down Expand Up @@ -314,6 +323,9 @@ SET(system_include TRUE)
#
# eigen
IF( ${include_eigen} )
IF( NOT ${use_cplusplus_2014_ok} )
MESSAGE(FATAL_ERROR "include eigen is true but c++14 not supported")
ENDIF( )
pkgconfig_info(eigen ${system_include})
IF( DEFINED eigen_prefix )
MESSAGE(FATAL_ERROR "include_eigen is true and eigen_prefix is defined")
Expand Down
7 changes: 7 additions & 0 deletions appendix/whats_new/2024.xrst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ Release Notes for 2024
mm-dd
*****

03-28
=====
Change the get_eigen.sh
:ref:`get_eigen.sh@Version` from 3.3.7 to the master branch on 2024-03-24; see
`issue 200 <https://github.com/coin-or/CppAD/issues/200>`_ .
Note that the new verison of eigen requires c++14 or higher.

03-23
=====
#. Change the upper case one letter variable names in the
Expand Down
13 changes: 11 additions & 2 deletions bin/check_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,12 @@ else
then
package_vector='--boost_vector'
else
package_vector='--eigen_vector'
if [ "$standard" == '--c++17' ]
then
package_vector='--eigen_vector'
else
package_vector='--std_vector'
fi
fi
fi
cat << EOF
Expand All @@ -177,10 +182,13 @@ then
compiler=''
fi
#
# standard
# standard, exclude_package
if [ "$standard" == '--c++17' ]
then
standard='' # default for run_cmake.sh and configure
exclude_package=''
else
exclude_package='--no_eigen --no_sacado'
fi
# ---------------------------------------------------------------------------
# absoute prefix where optional packages are installed
Expand Down Expand Up @@ -263,6 +271,7 @@ else
$compiler \
$standard \
$debug_which \
$exclude_package \
$package_vector
fi
echo_log_eval cd build
Expand Down
6 changes: 4 additions & 2 deletions bin/get_eigen.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
# SPDX-FileCopyrightText: Bradley M. Bell <[email protected]>
# SPDX-FileContributor: 2003-22 Bradley M. Bell
# SPDX-FileContributor: 2003-24 Bradley M. Bell
# ----------------------------------------------------------------------------
# {xrst_begin get_eigen.sh}
# {xrst_comment_ch #}
Expand Down Expand Up @@ -38,7 +38,9 @@
# This will install the following version of Eigen
# {xrst_spell_off}
# {xrst_code sh}
version='3.3.7'
# This was the mater version on 2024-03-24
# 'a39ade4ccf99df845ec85c580fbbb324f71952fa'
version='a39ade4'
# {xrst_code}
# {xrst_spell_on}
#
Expand Down
21 changes: 15 additions & 6 deletions bin/run_cmake.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env bash
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
# SPDX-FileCopyrightText: Bradley M. Bell <[email protected]>
# SPDX-FileContributor: 2003-23 Bradley M. Bell
# SPDX-FileContributor: 2003-24 Bradley M. Bell
# ----------------------------------------------------------------------------
set -e -u
if [ ! -e "bin/run_cmake.sh" ]
Expand Down Expand Up @@ -74,7 +74,7 @@ usage: bin/run_cmake.sh: \\
[--<package>_vector] \\
[--debug_<which>]
The --help option just prints this message and exits.
The value <package> above must be one of: cppad, boost, or eigen.
The value <package> above must be one of: cppad, boost, eigen, or std.
The value <which> must be one of: odd, even, all, none.
The value <type> must be one of: size_t, int, unsigned_int
Expand Down Expand Up @@ -210,8 +210,17 @@ EOF
done
if [ "$standard" == 'c++11' ]
then
# Scacdo will not build with c++11
yes_sacado='no'
# Scacdo and eigen cannot be used with c++11
if [ "$yes_eigen" == 'yes' ]
then
echo 'Cannot use eigen with c++11'
exit 1
fi
if [ "$yes_sacado" == 'yes' ]
then
echo 'Cannot use sacado with c++11'
exit 1
fi
fi
# ---------------------------------------------------------------------------
if [ ! -e build ]
Expand Down Expand Up @@ -353,8 +362,8 @@ then
cppad_cxx_flags="$cppad_cxx_flags -O0"
elif [ "$callgrind" == 'yes' ]
then
# This is a quote from the Callgrind manual:
# 'As with Cachegrind, you probably want to compile with debugging info
# This is a quote from the Callgrind manual:
# 'As with Cachegrind, you probably want to compile with debugging info
# (the -g option) and with optimization turned on.'
cmake_args="$cmake_args -g"
fi
Expand Down
11 changes: 8 additions & 3 deletions example/multi_thread/get_started.xrst
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{xrst_comment: This template file has the following parameters:
{xrst_comment
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
# SPDX-FileCopyrightText: Bradley M. Bell <[email protected]>
# SPDX-FileContributor: 2024 Bradley M. Bell

This template file has the following parameters:
@Name@ : is the name of this threading system
@####@ : is the underlining for the name of the threading system
@DEFAULT@ : is macro a macro name. If it is 1 (0),
@DEFAULT@ : is macro a macro name. If it is 1 (0),
the ADFun default ctor is used (is not used)
@Dir@ : is the subdirectory of multi_thread that contins the source code
@Dir@ : is the subdirectory of multi_thread that contins the source code
for this get_started.cpp
}

Expand Down
2 changes: 1 addition & 1 deletion user_guide.xrst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

{xrst_comment BEGIN: Before changing see new_release.sh and check_version.sh}

cppad-20240324: CppAD User's Manual
cppad-20240328: CppAD User's Manual
###################################

.. image:: {xrst_dir coin.png}
Expand Down

0 comments on commit 3a5e88c

Please sign in to comment.