Changeset 2767


Ignore:
Timestamp:
Mar 4, 2013 10:00:42 AM (7 years ago)
Author:
bradbell
Message:

No need to put cmake varables corresponding to preprocessor symboles in
upper case (they are different from actual preprocessor symbols).
So remove most of these exceptions to cmake variable naming convention.

Location:
trunk/cppad
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/cppad/CMakeLists.txt

    r2763 r2767  
    5353)
    5454# -----------------------------------------------------------------------------
    55 # CPPAD_INTERNAL_SPARSE_SET
     55# cppad_internal_sparse_set
    5656#
    5757IF( cppad_sparse_list )
    58         SET(CPPAD_INTERNAL_SPARSE_SET  sparse_list )
     58        SET(cppad_internal_sparse_set  sparse_list )
    5959ELSE( cppad_sparse_list )
    60         SET(CPPAD_INTERNAL_SPARSE_SET  sparse_set )
     60        SET(cppad_internal_sparse_set  sparse_set )
    6161ENDIF( cppad_sparse_list )
    62 MESSAGE(STATUS "CPPAD_INTERNAL_SPARSE_SET = ${CPPAD_INTERNAL_SPARSE_SET}" )
    63 #
    64 # -----------------------------------------------------------------------------
    65 # CPPAD_BOOSTVECTOR, CPPAD_CPPADVECTOR, CPPAD_EIGENVECTOR, CPPAD_STDVECTOR
    66 #
    67 check_match(cppad_testvector boost CPPAD_BOOSTVECTOR)
    68 check_match(cppad_testvector cppad CPPAD_CPPADVECTOR)
    69 check_match(cppad_testvector eigen CPPAD_EIGENVECTOR)
    70 check_match(cppad_testvector std   CPPAD_STDVECTOR)
    71 IF( NOT CPPAD_BOOSTVECTOR )
    72 IF( NOT CPPAD_CPPADVECTOR )
    73 IF( NOT CPPAD_EIGNEVECTOR )
    74 IF( NOT CPPAD_STDVECTOR )
     62MESSAGE(STATUS "cppad_internal_sparse_set = ${cppad_internal_sparse_set}" )
     63#
     64# -----------------------------------------------------------------------------
     65# cppad_boostvector, cppad_cppadvector, cppad_eigenvector, cppad_stdvector
     66#
     67check_match(cppad_testvector boost cppad_boostvector)
     68check_match(cppad_testvector cppad cppad_cppadvector)
     69check_match(cppad_testvector eigen cppad_eigenvector)
     70check_match(cppad_testvector std   cppad_stdvector)
     71IF( NOT cppad_boostvector )
     72IF( NOT cppad_cppadvector )
     73IF( NOT cppad_eigenvector )
     74IF( NOT cppad_stdvector )
    7575MESSAGE(FATAL_ERROR
    7676"cppad_testvector not one of following: boost, cppad, eigen, std."
    7777)
    78 ENDIF( NOT CPPAD_STDVECTOR )
    79 ENDIF( NOT CPPAD_EIGNEVECTOR )
    80 ENDIF( NOT CPPAD_CPPADVECTOR )
    81 ENDIF( NOT CPPAD_BOOSTVECTOR )
     78ENDIF( NOT cppad_stdvector )
     79ENDIF( NOT cppad_eigenvector )
     80ENDIF( NOT cppad_cppadvector )
     81ENDIF( NOT cppad_boostvector )
    8282
    83 IF( CPPAD_BOOSTVECTOR )
     83IF( cppad_boostvector )
    8484        # FIND_PACKAGE(Boost) done by ../CMakeLists.txt
    8585        IF( NOT Boost_FOUND )
     
    8888                )
    8989        ENDIF( NOT Boost_FOUND )
    90 ENDIF( CPPAD_BOOSTVECTOR )
    91 #
    92 IF( CPPAD_EIGENVECTOR )
     90ENDIF( cppad_boostvector )
     91#
     92IF( cppad_eigenvector )
    9393        IF( NOT eigen_prefix )
    9494                MESSAGE(FATAL_ERROR
     
    9696                )
    9797        ENDIF( NOT eigen_prefix )
    98 ENDIF( CPPAD_EIGENVECTOR )
     98ENDIF( cppad_eigenvector )
    9999
    100100# -----------------------------------------------------------------------------
    101 # CPPAD_HAS_NULLPTR
     101# cppad_has_nullptr
    102102#
    103103# CHECK_CXX_SOURCE_RUNS(source variable)
     
    112112CHECK_CXX_SOURCE_RUNS("${source}" nullptr_ok)
    113113IF( nullptr_ok )
    114         SET(CPPAD_HAS_NULLPTR 1)
     114        SET(cppad_has_nullptr 1)
    115115ELSE( nullptr_ok )
    116         SET(CPPAD_HAS_NULLPTR 0)
     116        SET(cppad_has_nullptr 0)
    117117ENDIF( nullptr_ok )
    118 MESSAGE(STATUS "CPPAD_HAS_NULLPTR = ${CPPAD_HAS_NULLPTR}" )
     118MESSAGE(STATUS "cppad_has_nullptr = ${cppad_has_nullptr}" )
    119119
    120120# -----------------------------------------------------------------------------
    121 # CPPAD_GETTIMEOFDAY
     121# cppad_has_gettimeofday
    122122#
    123123# CHECK_CXX_SOURCE_RUNS(source variable)
     
    134134CHECK_CXX_SOURCE_RUNS("${source}" gettimeofday_ok)
    135135IF( gettimeofday_ok )
    136         SET(CPPAD_GETTIMEOFDAY 1)
     136        SET(cppad_has_get_timeofday 1)
    137137ELSE( gettimeofday_ok )
    138         SET(CPPAD_GETTIMEOFDAY 0)
     138        SET(cppad_has_get_timeofday 0)
    139139ENDIF( gettimeofday_ok )
    140 MESSAGE(STATUS "CPPAD_GETTIMEOFDAY = ${CPPAD_GETTIMEOFDAY}" )
    141 # -----------------------------------------------------------------------------
    142 # CPPAD_SIZE_T_SAME_UNSIGNED_INT
     140MESSAGE(STATUS "cppad_has_get_timeofday = ${cppad_has_get_timeofday}" )
     141# -----------------------------------------------------------------------------
     142# cppad_size_t_same_unsigned_int
    143143#
    144144# CHECK_CXX_SOURCE_RUNS(source variable)
     
    156156CHECK_CXX_SOURCE_RUNS("${source}" size_t_not_unsigned_int)
    157157IF( size_t_not_unsigned_int )
    158         SET(CPPAD_SIZE_T_SAME_UNSIGNED_INT 0)
     158        SET(cppad_size_t_same_unsigned_int 0)
    159159ELSE( size_t_not_unsigned_int )
    160         SET(CPPAD_SIZE_T_SAME_UNSIGNED_INT 1)
     160        SET(cppad_size_t_same_unsigned_int 1)
    161161ENDIF( size_t_not_unsigned_int )
    162162MESSAGE(STATUS
    163         "CPPAD_SIZE_T_SAME_UNSIGNED_INT = ${CPPAD_SIZE_T_SAME_UNSIGNED_INT}"
    164 )
    165 # -----------------------------------------------------------------------------
    166 # CPPAD_TAPE_ADDR_TYPE, CPPAD_TAPE_ID_TYPE
     163        "cppad_size_t_same_unsigned_int = ${cppad_size_t_same_unsigned_int}"
     164)
     165# -----------------------------------------------------------------------------
     166# cppad_tape_addr_type, cppad_tape_id_type
    167167#
    168168FOREACH( cmake_var cppad_tape_id_type cppad_tape_addr_type )
     
    170170        STRING(COMPARE EQUAL ${cmake_var} cppad_tape_id_type is_id)
    171171        IF( is_id )
    172                 SET(cppad_var   CPPAD_TAPE_ID_TYPE)
     172                SET(cppad_var   cppad_tape_id_type)
    173173        ELSE( is_id )
    174                 SET(cppad_var   CPPAD_TAPE_ADDR_TYPE)
     174                SET(cppad_var   cppad_tape_addr_type)
    175175        ENDIF( is_id )
    176176        # ----------------------------------------------------------------------
  • trunk/cppad/configure.hpp.in

    r2765 r2767  
    5252(true = 1, false = 0).
    5353*/
    54 # define CPPAD_HAS_NULLPTR @CPPAD_HAS_NULLPTR@
     54# define CPPAD_HAS_NULLPTR @cppad_has_nullptr@
    5555 
    5656 /*!
     
    5959either sparse_set or sparse_list).
    6060*/
    61 # define CPPAD_INTERNAL_SPARSE_SET @CPPAD_INTERNAL_SPARSE_SET@
     61# define CPPAD_INTERNAL_SPARSE_SET @cppad_internal_sparse_set@
    6262
    6363/*!
     
    6868we are not using boost vector for CPPAD_TESTVECTOR.
    6969*/
    70 # define CPPAD_BOOSTVECTOR @CPPAD_BOOSTVECTOR@
     70# define CPPAD_BOOSTVECTOR @cppad_boostvector@
    7171
    7272/*!
     
    7777we are not using CppAD vector for CPPAD_TESTVECTOR.
    7878*/
    79 # define CPPAD_CPPADVECTOR @CPPAD_CPPADVECTOR@
     79# define CPPAD_CPPADVECTOR @cppad_cppadvector@
    8080
    8181/*!
     
    8686we are not using standard vector for CPPAD_TESTVECTOR.
    8787*/
    88 # define CPPAD_STDVECTOR @CPPAD_STDVECTOR@
     88# define CPPAD_STDVECTOR @cppad_stdvector@
    8989
    9090/*!
     
    9595we are not using Eigen vector for CPPAD_TESTVECTOR.
    9696*/
    97 # define CPPAD_EIGENVECTOR @CPPAD_EIGENVECTOR@
     97# define CPPAD_EIGENVECTOR @cppad_eigenvector@
    9898
    9999/*!
     
    110110otherwise this symbol is zero.
    111111*/
    112 # define CPPAD_SIZE_T_SAME_UNSIGNED_INT @CPPAD_SIZE_T_SAME_UNSIGNED_INT@
     112# define CPPAD_SIZE_T_SAME_UNSIGNED_INT @cppad_size_t_same_unsigned_int@
    113113
    114114/*!
     
    124124This type is later defined as \c addr_t in the CppAD namespace.
    125125*/
    126 # define CPPAD_TAPE_ADDR_TYPE @CPPAD_TAPE_ADDR_TYPE@
     126# define CPPAD_TAPE_ADDR_TYPE @cppad_tape_addr_type@
    127127
    128128/*!
     
    138138This type is later defined as \c tape_id_t in the CppAD namespace.
    139139*/
    140 # define CPPAD_TAPE_ID_TYPE @CPPAD_TAPE_ID_TYPE@
     140# define CPPAD_TAPE_ID_TYPE @cppad_tape_id_type@
    141141 
    142142/*!
Note: See TracChangeset for help on using the changeset viewer.