5 echo "./configure_new [options] [-- <CMake configuration options>]"
6 echo " -p Preselect a stanza configuration with matching description"
7 echo " -x Skip CMake options prompt, meant to be used in conjunction with direct pass-in options"
8 echo " -d directory Use as alternate build directory"
9 echo " -i directory Use as alternate install directory"
10 echo " -- <CMake options> Directly pass CMake options to configuration, equivalent to cmake <source dir> <CMake Options>"
11 echo " -h Print this message"
17 while getopts p
:xd
:i
:h opt
; do
26 buildDirectory
=$OPTARG
29 installDirectory
=$OPTARG
38 shift "$((OPTIND - 1))"
41 if [ $skipCMake = true
]; then
44 extraOps
="-s CMakeLists.txt"
47 if [ -z "$buildDirectory" ]; then
49 echo "Using default build directory : $buildDirectory"
51 if [ -z "$installDirectory" ]; then
52 installDirectory
=$PWD/install
53 echo "Using default install directory : $installDirectory"
56 mkdir
-p $buildDirectory
59 if [ ! -z "$preselect" ]; then
60 echo "Using preselected config ${preselect}"
61 # Meant to be run at the top level
62 .
/arch
/configure_reader.py \
63 -c arch
/configure.defaults \
64 -t cmake
/template
/arch_config.cmake \
65 -o $buildDirectory/wps_config.cmake \
66 ${extraOps} -p "${preselect}"
68 # Meant to be run at the top level
69 .
/arch
/configure_reader.py \
70 -c arch
/configure.defaults \
71 -t cmake
/template
/arch_config.cmake \
72 -o $buildDirectory/wps_config.cmake \
78 if [ $configureStanza -eq 0 ]; then
81 cmake ..
-DCMAKE_INSTALL_PREFIX=$installDirectory -DCMAKE_TOOLCHAIN_FILE=$buildDirectory/wps_config.cmake $
*