Changeset 3520


Ignore:
Timestamp:
Dec 28, 2014 11:23:01 AM (5 years ago)
Author:
bradbell
Message:

run_cmake.sh: add --clang option.
CMakeLists.txt: fix cppad_implicit_ctor_from_any_type.
test_more.cpp: fix mistake in previous commit.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/run_cmake.sh

    r3476 r3520  
    2525verbose='no'
    2626standard='c++11'
    27 testvector='boost'
    2827debug_speed='no'
    2928profile_speed='no'
     29clang='no'
     30testvector='boost'
    3031while [ "$1" != "" ]
    3132do
     
    3637        then
    3738                standard='c++98'
     39        elif [ "$1" == '--debug_speed' ]
     40        then
     41                debug_speed='yes'
     42                profile_speed='no'
     43        elif [ "$1" == '--profile_speed' ]
     44        then
     45                profile_speed='yes'
     46                debug_speed='no'
     47        elif [ "$1" == '--clang' ]
     48        then
     49                clang='yes'
    3850        elif [ "$1" == '--cppad_vector' ]
    3951        then
     
    4557        then
    4658                testvector='eigen'
    47         elif [ "$1" == '--debug_speed' ]
    48         then
    49                 debug_speed='yes'
    50                 profile_speed='no'
    51         elif [ "$1" == '--profile_speed' ]
    52         then
    53                 profile_speed='yes'
    54                 debug_speed='no'
    5559        else
    56                 options='[--verbose] [--c++98] [--<package>_vector]'
    57                 options="$options [--debug_speed] [--profile_speed']"
    58                 echo "usage: bin/run_cmake.sh: $options"
    59                 echo 'where <package> is cppad, boost, or eigen'
     60                cat << EOF
     61usage: bin/run_cmake.sh: \\
     62        [--verbose] \\
     63        [--c++98] \\
     64        [--debug_speed] \\
     65        [--profile_speed] \\
     66        [--clang ] \\
     67        [--<package>_vector]
     68
     69where <package> is cppad, boost, or eigen
     70EOF
    6071                exit 1
    6172        fi
     
    134145cmake_args="$cmake_args -D cppad_cxx_flags='$cppad_cxx_flags'"
    135146#
     147# clang
     148if [ "$clang" == 'yes' ]
     149then
     150        cmake_args="$cmake_args -D CMAKE_C_COMPILER=clang"
     151        cmake_args="$cmake_args -D CMAKE_CXX_COMPILER=clang++"
     152fi
     153#
    136154# simple options
    137 cmake_args="$cmake_args -D cppad_implicit_ctor_from_any_type_from_any_type=NO"
     155cmake_args="$cmake_args -D cppad_implicit_ctor_from_any_type=NO"
    138156cmake_args="$cmake_args -D cppad_sparse_list=YES"
    139157cmake_args="$cmake_args -D cppad_testvector=$testvector"
  • trunk/cppad/CMakeLists.txt

    r3495 r3520  
    4949)
    5050#
    51 # cppad_implicit_ctor_from_any_type_from_any_type
    52 command_line_arg(cppad_implicit_ctor_from_any_type_from_any_type NO BOOL
     51# cppad_implicit_ctor_from_any_type
     52command_line_arg(cppad_implicit_ctor_from_any_type NO BOOL
    5353        "implicit (instead of explicit) conversion from any type to AD<Base>"
    5454)
    5555# -----------------------------------------------------------------------------
    5656# cppad_explicit_ctor
    57 IF( cppad_implicit_ctor_from_any_type_from_any_type )
     57IF( cppad_implicit_ctor_from_any_type )
    5858        SET(cppad_implicit_ctor_from_any_type 1)
    59 ELSE( cppad_implicit_ctor_from_any_type_from_any_type )
     59ELSE( cppad_implicit_ctor_from_any_type )
    6060        SET(cppad_implicit_ctor_from_any_type 0)
    61 ENDIF( cppad_implicit_ctor_from_any_type_from_any_type )
     61ENDIF( cppad_implicit_ctor_from_any_type )
    6262# -----------------------------------------------------------------------------
    6363# cppad_internal_sparse_set
  • trunk/omh/whats_new/whats_new_14.omh

    r3519 r3520  
    5252        erf
    5353        cmath
     54        ctor
    5455$$
    5556
     
    6364
    6465$head 12-28$$
     66$list number$$
    6567Fix some warnings generated by clang 3.5 about local functions
    6668that were not being used; e.g., sub-tests that were not being executed.
     69$lnext
     70Fix $code cmake$$ setting
     71$cref/cppad_implicit_ctor_from_any_type/
     72        cmake/cppad_implicit_ctor_from_any_type
     73/$$.
     74Note that this option is deprecated and may eventually be removed.
     75$lend
    6776
    6877$head 12-27$$
  • trunk/test_more/test_more.cpp

    r3519 r3520  
    172172        ok &= Run( MulEq,           "MulEq"          );
    173173        ok &= Run( MulZeroOne,      "MulZeroOne"     );
    174         ok &= Run( ndebug,          "ndebug"         );
    175174        ok &= Run( NearEqualExt,    "NearEqualExt"   );
    176175        ok &= Run( Neg,             "Neg"            );
Note: See TracChangeset for help on using the changeset viewer.