| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
trilinos_src_dir=${TRILINOS_DIR:-${PWD}/../Trilinos} |
| 4 |
build_dir=${BUILD_DIR:-${PWD}} |
| 5 |
build_type=${CMAKE_BUILD_TYPE:-release} |
| 6 |
trilinos_install_dir=${TRILINOS_INSTALL_DIR:-${PWD}/../trilinos_install_dir} |
| 7 |
cmake_cxx_flags=${CMAKE_CXX_FLAGS} |
| 8 |
clear_cache=${CLEAR_CACHE:-ON} |
| 9 |
|
| 10 |
printf "\nTRILINOS_DIR=${trilinos_src_dir}\n"; |
| 11 |
printf "BUILD_DIR=${build_dir}\n"; |
| 12 |
printf "CMAKE_BUILD_TYPE=${build_type}\n"; |
| 13 |
printf "CMAKE_CXX_FLAGS=${cmake_cxx_flags}\n"; |
| 14 |
printf "TRILINOS_INSTALL_DIR=${trilinos_install_dir}\n"; |
| 15 |
printf "\nTo change these vars, set as env vars or pass to this script like 'VAR=value run_cmake_stk_serial'\n\n"; |
| 16 |
|
| 17 |
mkdir -p $trilinos_install_dir |
| 18 |
mkdir -p $build_dir |
| 19 |
|
| 20 |
cd ${build_dir} |
| 21 |
|
| 22 |
if [ "${clear_cache}" == "ON" ] ; then |
| 23 |
# Cleanup old cache before we configure |
| 24 |
rm -rf CMakeFiles CMakeCache.txt |
| 25 |
fi |
| 26 |
|
| 27 |
rm -rf CMakeFiles CMakeCache.txt |
| 28 |
|
| 29 |
cmake \ |
| 30 |
-DCMAKE_INSTALL_PREFIX=$trilinos_install_dir \ |
| 31 |
-DCMAKE_BUILD_TYPE=${build_type} \ |
| 32 |
-DCMAKE_C_COMPILER=${OMPI_CC} \ |
| 33 |
-DCMAKE_CXX_STANDARD:STRING=17 \ |
| 34 |
-DCMAKE_CXX_COMPILER=${OMPI_CXX} \ |
| 35 |
-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF \ |
| 36 |
-DTrilinos_ALLOW_NO_PACKAGES:BOOL=OFF \ |
| 37 |
-DTPL_ENABLE_MPI=OFF \ |
| 38 |
-DCMAKE_CXX_FLAGS:STRING="${cmake_cxx_flags}" \ |
| 39 |
-DSTK_ENABLE_TESTS:BOOL=ON \ |
| 40 |
-DTrilinos_ENABLE_STK:BOOL=ON \ |
| 41 |
-DTrilinos_ENABLE_STKUnit_tests:BOOL=ON \ |
| 42 |
-DTrilinos_ENABLE_STKDoc_tests:BOOL=ON \ |
| 43 |
-DTrilinos_ASSERT_MISSING_PACKAGES=OFF \ |
| 44 |
${trilinos_src_dir}/ |
| 45 |
|