bootstrap: Forward options after '--' to cmake
Provide an interface simpler than --init= to set cache values during bootstrap builds. For example: ./bootstrap --system-zlib -- -DZLIB_ROOT=/opt/zlib will configure CMake with a system zlib library and initialize ZLIB_ROOT in the cache for use by FindZLIB.
This commit is contained in:
parent
f39e82c9d5
commit
c19868b256
@ -296,7 +296,7 @@ KWSYS_IOS_FILES="
|
|||||||
cmake_usage()
|
cmake_usage()
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
Usage: '"$0"' [options]
|
Usage: '"$0"' [<options>...] [-- <cmake-options>...]
|
||||||
Options: [defaults in brackets after descriptions]
|
Options: [defaults in brackets after descriptions]
|
||||||
Configuration:
|
Configuration:
|
||||||
--help print this message
|
--help print this message
|
||||||
@ -552,6 +552,7 @@ while test $# != 0; do
|
|||||||
--version) cmake_version_display ; exit 2 ;;
|
--version) cmake_version_display ; exit 2 ;;
|
||||||
--verbose) cmake_verbose=TRUE ;;
|
--verbose) cmake_verbose=TRUE ;;
|
||||||
--enable-ccache) cmake_ccache_enabled=TRUE ;;
|
--enable-ccache) cmake_ccache_enabled=TRUE ;;
|
||||||
|
--) shift; break ;;
|
||||||
*) die "Unknown option: $1" ;;
|
*) die "Unknown option: $1" ;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
@ -1504,7 +1505,7 @@ cmake_options="-DCMAKE_BOOTSTRAP=1"
|
|||||||
if [ -n "${cmake_verbose}" ]; then
|
if [ -n "${cmake_verbose}" ]; then
|
||||||
cmake_options="${cmake_options} -DCMAKE_VERBOSE_MAKEFILE=1"
|
cmake_options="${cmake_options} -DCMAKE_VERBOSE_MAKEFILE=1"
|
||||||
fi
|
fi
|
||||||
"${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_options} ${cmake_bootstrap_system_libs}
|
"${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_options} ${cmake_bootstrap_system_libs} "$@"
|
||||||
RES=$?
|
RES=$?
|
||||||
if [ "${RES}" -ne "0" ]; then
|
if [ "${RES}" -ne "0" ]; then
|
||||||
cmake_error 11 "Problem while running initial CMake"
|
cmake_error 11 "Problem while running initial CMake"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user