------------------------------------- lines 7-166 of file: bin/run_cmake.sh ------------------------------------- # {xrst_begin run_cmake.sh} # {xrst_spell # bitwise # callgrind # config # cxx # fortran # gcc # gfortran # homebrew # libdir # makefile # pc # pkg # wconversion # wno # wpedantic # wshadow # uname # dev # fi fi # } # {xrst_comment_ch #} # # bin/run_cmake.sh: User Configuration Options # ############################################ # # verbose_makefile # **************** # Use 'no' for normal and 'yes' for verbose make output: # {xrst_code sh} verbose_makefile='no' # {xrst_code} # # build_type # ********** # Use either 'debug' or 'release' for the type of this build: # {xrst_code sh} build_type='debug' # {xrst_code} # # cmake_install_prefix # ******************** # Prefix where cppad_mixed is installed: # {xrst_code sh} cmake_install_prefix="$HOME/prefix/cppad_mixed" # {xrst_code} # If *cmake_install_prefix* ends in ``/cppad_mixed`` , # ``run_cmake.sh`` will use a soft link from this prefix to # *cmake_install_prefix* . ``debug`` or # *cmake_install_prefix* . ``release`` # depending on the choice for *build_type* . # # Debug and Release # ***************** # If a soft link is used for the install, # the same technique will be used to map the ``build`` # directory to the debug or release version. # If you are using both a debug and release versions of cppad_mixed, # both versions of the # :ref:`install_unix@Special Requirements` # will need to be installed. # # Eigen Prefix # ************ # It is a good idea to use a different prefix for installing eigen # because the corresponding include files are treated like system files, # otherwise the eigen include files would generate lots of warnings. # The example install script ``bin/install_eigen.sh`` uses # *cmake_install_prefix* / ``eigen`` as the prefix for installing eigen. # # specific_compiler # ***************** # On some systems, e.g. the Mac using port, there are problems with mixing # different compiler systems for fortran and C++; see # `ipopt issue 471 `_. # This variable allows you to set a specific compiler for # C and or CXX and or FC. For example # ``specific_compiler='CC=gcc CXX=g++ FC=gfortran'`` # uses the gnu versions of these compilers. # The configuration will automatically find compilers that are not specified; # i.e., if # {xrst_code sh} specific_compiler='' # {xrst_code} # # extra_cxx_flags # *************** # Extra C++ flags used to compile and test # {xrst_code sh} extra_cxx_flags='-Wpedantic -std=c++11 -Wall -Wshadow -Wconversion' # # for macOS using homebrew: if [ "$(uname)" == 'Darwin' ] then if which brew > /dev/null then extra_cxx_flags+=' -I /opt/homebrew/include' extra_cxx_flags+=' -Wno-bitwise-instead-of-logical' extra_cxx_flags+=' -Wno-sign-conversion' fi fi # {xrst_code} # # cmake_libdir # ************ # Sub-directory of each prefix where libraries are installed. # {xrst_code sh} cmake_libdir='lib64' # {xrst_code} # # cppad_mixed.pc # ============== # The file pkg-config file ``cppad_mixed.pc`` is installed in the # *cmake_install_prefix/cmake_libdir* directory. # # ldlt_cholmod # ************ # If yes, use ``ldlt_cholmod`` LDLT factorization where possible. # Otherwise always use ``ldlt_eigen`` for LDLT factorization. # {xrst_code sh} ldlt_cholmod='yes' # {xrst_code} # # optimize_cppad_function # *********************** # If yes, the operation sequence for certain CppAD functions # will be optimized. This makes the code run faster but in some cases # it can make debugging more complicated. It is suggested that you use # ``no`` when *build_type* is ``debug`` and ``yes`` # when *build_type* is ``release`` . # {xrst_code sh} optimize_cppad_function='no' # {xrst_code} # # for_hes_sparsity # **************** # If yes, user ``for_hes_sparsity`` to compute sparsity w.r.t. random # effects (otherwise use ``rev_hes_sparsity`` ). # {xrst_code sh} for_hes_sparsity='yes' # {xrst_code} # # Testing Speed and Memory # ************************ # If you wish to test the speed or memory used by ``cppad_mixed`` , # set *build_type* to ``release`` , include the ``-g`` flag # in *extra_cxx_flags* . Then execute the following commands: # # | |tab| ``bin/install_cppad.sh`` # | |tab| ``bin/run_cmake.sh`` # | |tab| ``cd build`` ; ``make`` *program* ; ``cd ..`` # | |tab| ``bin/`` *program* . ``sh`` *test2run* # # where *program* is # :ref:`ar1_xam` or :ref:`capture_xam` # and *test2run* is # ``normal`` , ``callgrind`` , or ``massif`` . # # {xrst_end run_cmake.sh}