bootstrap 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326
  1. #!/bin/sh
  2. #=========================================================================
  3. #
  4. # Program: CMake - Cross-Platform Makefile Generator
  5. # Module: $RCSfile$
  6. # Language: Bourne Shell
  7. # Date: $Date$
  8. # Version: $Revision$
  9. #
  10. # Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  11. # See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  12. #
  13. # This software is distributed WITHOUT ANY WARRANTY; without even
  14. # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. # PURPOSE. See the above copyright notices for more information.
  16. #
  17. #=========================================================================
  18. # Version number extraction function.
  19. cmake_version_component()
  20. {
  21. cat "${cmake_source_dir}/CMakeLists.txt" | sed -n "
  22. /^SET(CMake_VERSION_${1}/ {s/SET(CMake_VERSION_${1} *\([0-9]*\))/\1/;p;}
  23. "
  24. }
  25. # Detect system and directory information.
  26. cmake_system=`uname`
  27. cmake_source_dir=`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'`
  28. cmake_source_dir=`(cd "${cmake_source_dir}";pwd)`
  29. cmake_binary_dir=`pwd`
  30. cmake_bootstrap_dir="${cmake_binary_dir}/Bootstrap.cmk"
  31. cmake_version="`cmake_version_component MAJOR`.`cmake_version_component MINOR`"
  32. cmake_data_dir="/share/cmake-${cmake_version}"
  33. cmake_doc_dir="/doc/cmake-${cmake_version}"
  34. cmake_man_dir="/man"
  35. cmake_init_file=""
  36. cmake_bootstrap_system_libs=""
  37. # Determine whether this is a MinGW environment.
  38. if echo "${cmake_system}" | grep MINGW >/dev/null 2>&1; then
  39. cmake_system_mingw=true
  40. else
  41. cmake_system_mingw=false
  42. fi
  43. # Determine whether this is OS X
  44. if echo "${cmake_system}" | grep Darwin >/dev/null 2>&1; then
  45. cmake_system_darwin=true
  46. else
  47. cmake_system_darwin=false
  48. fi
  49. # Determine whether this is BeOS
  50. if echo "${cmake_system}" | grep BeOS >/dev/null 2>&1; then
  51. cmake_system_beos=true
  52. else
  53. cmake_system_beos=false
  54. fi
  55. # Choose the generator to use for bootstrapping.
  56. if ${cmake_system_mingw}; then
  57. # Bootstrapping from an MSYS prompt.
  58. cmake_bootstrap_generator="MSYS Makefiles"
  59. else
  60. # Bootstrapping from a standard UNIX prompt.
  61. cmake_bootstrap_generator="Unix Makefiles"
  62. fi
  63. # Helper function to fix windows paths.
  64. cmake_fix_slashes ()
  65. {
  66. echo "$1" | sed 's/\\/\//g'
  67. }
  68. # Choose the default install prefix.
  69. if ${cmake_system_mingw}; then
  70. if [ "x${PROGRAMFILES}" != "x" ]; then
  71. cmake_default_prefix=`cmake_fix_slashes "${PROGRAMFILES}/CMake"`
  72. elif [ "x${ProgramFiles}" != "x" ]; then
  73. cmake_default_prefix=`cmake_fix_slashes "${ProgramFiles}/CMake"`
  74. elif [ "x${SYSTEMDRIVE}" != "x" ]; then
  75. cmake_default_prefix=`cmake_fix_slashes "${SYSTEMDRIVE}/Program Files/CMake"`
  76. elif [ "x${SystemDrive}" != "x" ]; then
  77. cmake_default_prefix=`cmake_fix_slashes "${SystemDrive}/Program Files/CMake"`
  78. else
  79. cmake_default_prefix="c:/Program Files/CMake"
  80. fi
  81. else
  82. cmake_default_prefix="/usr/local"
  83. fi
  84. CMAKE_KNOWN_C_COMPILERS="cc gcc xlc icc tcc"
  85. CMAKE_KNOWN_CXX_COMPILERS="aCC xlC CC g++ c++ icc como "
  86. CMAKE_KNOWN_MAKE_PROCESSORS="gmake make"
  87. CMAKE_PROBLEMATIC_FILES="\
  88. CMakeCache.txt \
  89. CMakeSystem.cmake \
  90. CMakeCCompiler.cmake \
  91. CMakeCXXCompiler.cmake \
  92. Source/cmConfigure.h \
  93. Source/CTest/Curl/config.h \
  94. Utilities/cmexpat/expatConfig.h \
  95. Utilities/cmexpat/expatDllConfig.h \
  96. "
  97. CMAKE_UNUSED_SOURCES="\
  98. cmGlobalXCodeGenerator \
  99. cmLocalXCodeGenerator \
  100. cmXCodeObject \
  101. cmXCode21Object \
  102. cmSourceGroup \
  103. "
  104. CMAKE_CXX_SOURCES="\
  105. cmake \
  106. cmakemain \
  107. cmakewizard \
  108. cmCommandArgumentLexer \
  109. cmCommandArgumentParser \
  110. cmCommandArgumentParserHelper \
  111. cmDepends \
  112. cmDependsC \
  113. cmProperty \
  114. cmPropertyMap \
  115. cmPropertyDefinition \
  116. cmPropertyDefinitionMap \
  117. cmMakeDepend \
  118. cmMakefile \
  119. cmGeneratedFileStream \
  120. cmGlobalGenerator \
  121. cmLocalGenerator \
  122. cmInstallGenerator \
  123. cmInstallFilesGenerator \
  124. cmInstallScriptGenerator \
  125. cmInstallTargetGenerator \
  126. cmSourceFile \
  127. cmSystemTools \
  128. cmVersion \
  129. cmFileTimeComparison \
  130. cmGlobalUnixMakefileGenerator3 \
  131. cmLocalUnixMakefileGenerator3 \
  132. cmMakefileExecutableTargetGenerator \
  133. cmMakefileLibraryTargetGenerator \
  134. cmMakefileTargetGenerator \
  135. cmMakefileUtilityTargetGenerator \
  136. cmBootstrapCommands \
  137. cmCommands \
  138. cmTarget \
  139. cmTest \
  140. cmCustomCommand \
  141. cmCacheManager \
  142. cmListFileCache \
  143. cmOrderLinkDirectories \
  144. "
  145. if ${cmake_system_mingw}; then
  146. CMAKE_CXX_SOURCES="${CMAKE_CXX_SOURCES}\
  147. cmGlobalMSYSMakefileGenerator \
  148. cmGlobalMinGWMakefileGenerator \
  149. cmWin32ProcessExecution"
  150. fi
  151. CMAKE_C_SOURCES="\
  152. cmListFileLexer \
  153. "
  154. if ${cmake_system_mingw}; then
  155. KWSYS_C_SOURCES="\
  156. ProcessWin32 \
  157. System"
  158. KWSYS_C_MINGW_SOURCES="\
  159. ProcessFwd9x \
  160. EncodeExecutable"
  161. KWSYS_C_GENERATED_SOURCES="\
  162. cmsysProcessFwd9xEnc"
  163. else
  164. KWSYS_C_SOURCES="\
  165. ProcessUNIX \
  166. System"
  167. KWSYS_C_MINGW_SOURCES=""
  168. KWSYS_C_GENERATED_SOURCES=""
  169. fi
  170. KWSYS_CXX_SOURCES="\
  171. Directory \
  172. Glob \
  173. RegularExpression \
  174. SystemTools"
  175. KWSYS_FILES="\
  176. Directory.hxx \
  177. Glob.hxx \
  178. Process.h \
  179. RegularExpression.hxx \
  180. String.hxx \
  181. System.h \
  182. SystemTools.hxx"
  183. KWSYS_IOS_FILES="
  184. fstream \
  185. iosfwd \
  186. iostream \
  187. sstream"
  188. # Display CMake bootstrap usage
  189. cmake_usage()
  190. {
  191. cat <<EOF
  192. Usage: $0 [options]
  193. Options: [defaults in brackets after descriptions]
  194. Configuration:
  195. --help print this message
  196. --version only print version information
  197. --verbose display more information
  198. --parallel=n bootstrap cmake in parallel, where n is
  199. number of nodes [1]
  200. --init=FILE use FILE for cmake initialization
  201. --system-libs use system-installed third-party libraries
  202. (for use only by package maintainers)
  203. --no-system-libs use cmake-provided third-party libraries
  204. (default)
  205. Directory and file names:
  206. --prefix=PREFIX install files in tree rooted at PREFIX
  207. [${cmake_default_prefix}]
  208. --datadir=DIR install data files in PREFIX/DIR
  209. [/share/CMake]
  210. --docdir=DIR install documentation files in PREFIX/DIR
  211. [/doc/CMake]
  212. --mandir=DIR install man pages files in PREFIX/DIR/manN
  213. [/man]
  214. EOF
  215. exit 10
  216. }
  217. # Display CMake bootstrap usage
  218. cmake_version()
  219. {
  220. # Get CMake version
  221. CMAKE_VERSION=""
  222. for a in MAJOR MINOR PATCH; do
  223. CMake_VERSION=`cat "${cmake_source_dir}/CMakeLists.txt" | \
  224. grep "SET(CMake_VERSION_${a} *[0-9]*)" | sed "s/SET(CMake_VERSION_${a} *\([0-9]*\))/\1/"`
  225. CMAKE_VERSION="${CMAKE_VERSION}.${CMake_VERSION}"
  226. done
  227. if echo "$CMAKE_VERSION" | grep "\.[0-9][0-9]*\.[0-9]*[13579]\.[0-9]" > /dev/null 2>&1; then
  228. CMake_DATE=`cat "${cmake_source_dir}/Source/cmVersion.cxx" | grep "\".Date: [0-9][0-9]*/[0-9][0-9]*/[0-9][0-9]* [0-9][0-9]*:[0-9][0-9]*:[0-9][0-9]* .\";"`
  229. CMake_DATE=`echo "${CMake_DATE}" | sed "s/.*Date: \([0-9][0-9]*\)\/\([0-9][0-9]*\)\/\([0-9][0-9]*\) .*/\1\2\3/" `
  230. CMAKE_VERSION=`echo $CMAKE_VERSION | sed "s/\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)/\1.\2-${CMake_DATE}/"`
  231. else
  232. CMAKE_VERSION=`echo $CMAKE_VERSION | sed "s/\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)/\1.\2-\3/"`
  233. fi
  234. echo "CMake ${CMAKE_VERSION}, Copyright (c) 2007 Kitware, Inc., Insight Consortium"
  235. }
  236. # Display CMake bootstrap error, display the log file and exit
  237. cmake_error()
  238. {
  239. res=$1
  240. shift 1
  241. echo "---------------------------------------------"
  242. echo "Error when bootstrapping CMake:"
  243. echo "$*"
  244. echo "---------------------------------------------"
  245. if [ -f cmake_bootstrap.log ]; then
  246. echo "Log of errors: `pwd`/cmake_bootstrap.log"
  247. #cat cmake_bootstrap.log
  248. echo "---------------------------------------------"
  249. fi
  250. exit ${res}
  251. }
  252. # Replace KWSYS_NAMESPACE with cmsys
  253. cmake_replace_string ()
  254. {
  255. INFILE="$1"
  256. OUTFILE="$2"
  257. SEARCHFOR="$3"
  258. REPLACEWITH="$4"
  259. if [ -f "${INFILE}" ]; then
  260. cat "${INFILE}" |
  261. sed "s/\@${SEARCHFOR}\@/${REPLACEWITH}/g" > "${OUTFILE}.tmp"
  262. if [ -f "${OUTFILE}.tmp" ]; then
  263. if diff "${OUTFILE}" "${OUTFILE}.tmp" > /dev/null 2> /dev/null ; then
  264. #echo "Files are the same"
  265. rm -f "${OUTFILE}.tmp"
  266. else
  267. mv -f "${OUTFILE}.tmp" "${OUTFILE}"
  268. fi
  269. fi
  270. else
  271. cmake_error 1 "Cannot find file ${INFILE}"
  272. fi
  273. }
  274. cmake_kwsys_config_replace_string ()
  275. {
  276. INFILE="$1"
  277. OUTFILE="$2"
  278. shift 2
  279. APPEND="$*"
  280. if [ -f "${INFILE}" ]; then
  281. echo "${APPEND}" > "${OUTFILE}.tmp"
  282. cat "${INFILE}" |
  283. sed "/./ {s/\@KWSYS_NAMESPACE\@/cmsys/g;
  284. s/@KWSYS_BUILD_SHARED@/${KWSYS_BUILD_SHARED}/g;
  285. s/@KWSYS_LFS_AVAILABLE@/${KWSYS_LFS_AVAILABLE}/g;
  286. s/@KWSYS_LFS_REQUESTED@/${KWSYS_LFS_REQUESTED}/g;
  287. s/@KWSYS_NAME_IS_KWSYS@/${KWSYS_NAME_IS_KWSYS}/g;
  288. s/@KWSYS_IOS_USE_ANSI@/${KWSYS_IOS_USE_ANSI}/g;
  289. s/@KWSYS_IOS_HAVE_STD@/${KWSYS_IOS_HAVE_STD}/g;
  290. s/@KWSYS_IOS_USE_SSTREAM@/${KWSYS_IOS_USE_SSTREAM}/g;
  291. s/@KWSYS_IOS_USE_STRSTREAM_H@/${KWSYS_IOS_USE_STRSTREAM_H}/g;
  292. s/@KWSYS_IOS_USE_STRSTREA_H@/${KWSYS_IOS_USE_STRSTREA_H}/g;
  293. s/@KWSYS_STL_HAVE_STD@/${KWSYS_STL_HAVE_STD}/g;
  294. s/@KWSYS_STL_STRING_HAVE_ISTREAM@/${KWSYS_STL_STRING_HAVE_ISTREAM}/g;
  295. s/@KWSYS_STL_STRING_HAVE_OSTREAM@/${KWSYS_STL_STRING_HAVE_OSTREAM}/g;
  296. s/@KWSYS_STL_STRING_HAVE_NEQ_CHAR@/${KWSYS_STL_STRING_HAVE_NEQ_CHAR}/g;
  297. s/@KWSYS_STL_HAS_ITERATOR_TRAITS@/${KWSYS_STL_HAS_ITERATOR_TRAITS}/g;
  298. s/@KWSYS_STL_HAS_ITERATOR_CATEGORY@/${KWSYS_STL_HAS_ITERATOR_CATEGORY}/g;
  299. s/@KWSYS_STL_HAS___ITERATOR_CATEGORY@/${KWSYS_STL_HAS___ITERATOR_CATEGORY}/g;
  300. s/@KWSYS_STL_HAS_ALLOCATOR_TEMPLATE@/${KWSYS_STL_HAS_ALLOCATOR_TEMPLATE}/g;
  301. s/@KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE@/${KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE}/g;
  302. s/@KWSYS_STL_HAS_ALLOCATOR_REBIND@/${KWSYS_STL_HAS_ALLOCATOR_REBIND}/g;
  303. s/@KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT@/${KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT}/g;
  304. s/@KWSYS_STL_HAS_ALLOCATOR_OBJECTS@/${KWSYS_STL_HAS_ALLOCATOR_OBJECTS}/g;
  305. s/@KWSYS_CXX_HAS_CSTDDEF@/${KWSYS_CXX_HAS_CSTDDEF}/g;
  306. s/@KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS@/${KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS}/g;
  307. s/@KWSYS_CXX_HAS_MEMBER_TEMPLATES@/${KWSYS_CXX_HAS_MEMBER_TEMPLATES}/g;
  308. s/@KWSYS_CXX_HAS_FULL_SPECIALIZATION@/${KWSYS_CXX_HAS_FULL_SPECIALIZATION}/g;
  309. s/@KWSYS_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP@/${KWSYS_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP}/g;
  310. s/@KWSYS_STAT_HAS_ST_MTIM@/${KWSYS_STAT_HAS_ST_MTIM}/g;}" >> "${OUTFILE}.tmp"
  311. if [ -f "${OUTFILE}.tmp" ]; then
  312. if diff "${OUTFILE}" "${OUTFILE}.tmp" > /dev/null 2> /dev/null ; then
  313. #echo "Files are the same"
  314. rm -f "${OUTFILE}.tmp"
  315. else
  316. mv -f "${OUTFILE}.tmp" "${OUTFILE}"
  317. fi
  318. fi
  319. else
  320. cmake_error 2 "Cannot find file ${INFILE}"
  321. fi
  322. }
  323. # Write string into a file
  324. cmake_report ()
  325. {
  326. FILE=$1
  327. shift
  328. echo "$*" >> ${FILE}
  329. }
  330. # Escape spaces in strings
  331. cmake_escape ()
  332. {
  333. echo $1 | sed "s/ /\\\\ /g"
  334. }
  335. # Write message to the log
  336. cmake_log ()
  337. {
  338. echo "$*" >> cmake_bootstrap.log
  339. }
  340. # Return temp file
  341. cmake_tmp_file ()
  342. {
  343. echo "cmake_bootstrap_$$.test"
  344. }
  345. # Run a compiler test. First argument is compiler, second one are compiler
  346. # flags, third one is test source file to be compiled
  347. cmake_try_run ()
  348. {
  349. COMPILER=$1
  350. FLAGS=$2
  351. TESTFILE=$3
  352. if [ ! -f "${TESTFILE}" ]; then
  353. echo "Test file ${TESTFILE} missing. Please verify your CMake source tree."
  354. exit 4
  355. fi
  356. TMPFILE=`cmake_tmp_file`
  357. echo "Try: ${COMPILER}"
  358. echo "Line: ${COMPILER} ${FLAGS} ${TESTFILE} -o ${TMPFILE}"
  359. echo "---------- file -----------------------"
  360. cat "${TESTFILE}"
  361. echo "------------------------------------------"
  362. "${COMPILER}" ${FLAGS} "${TESTFILE}" -o "${TMPFILE}"
  363. RES=$?
  364. if [ "${RES}" -ne "0" ]; then
  365. echo "Test failed to compile"
  366. return 1
  367. fi
  368. if [ ! -f "${TMPFILE}" ] && [ ! -f "${TMPFILE}.exe" ]; then
  369. echo "Test failed to produce executable"
  370. return 2
  371. fi
  372. ./${TMPFILE}
  373. RES=$?
  374. rm -f "${TMPFILE}"
  375. if [ "${RES}" -ne "0" ]; then
  376. echo "Test produced non-zero return code"
  377. return 3
  378. fi
  379. echo "Test succeded"
  380. return 0
  381. }
  382. # Run a make test. First argument is the make interpreter.
  383. cmake_try_make ()
  384. {
  385. MAKE_PROC="$1"
  386. MAKE_FLAGS="$2"
  387. echo "Try: ${MAKE_PROC}"
  388. "${MAKE_PROC}" ${MAKE_FLAGS}
  389. RES=$?
  390. if [ "${RES}" -ne "0" ]; then
  391. echo "${MAKE_PROC} does not work"
  392. return 1
  393. fi
  394. if [ ! -f "test" ] && [ ! -f "test.exe" ]; then
  395. echo "${COMPILER} does not produce output"
  396. return 2
  397. fi
  398. ./test
  399. RES=$?
  400. rm -f "test"
  401. if [ "${RES}" -ne "0" ]; then
  402. echo "${MAKE_PROC} produces strange executable"
  403. return 3
  404. fi
  405. echo "${MAKE_PROC} works"
  406. return 0
  407. }
  408. # Parse arguments
  409. cmake_verbose=
  410. cmake_parallel_make=
  411. cmake_prefix_dir="${cmake_default_prefix}"
  412. for a in "$@"; do
  413. if echo $a | grep "^--prefix=" > /dev/null 2> /dev/null; then
  414. cmake_prefix_dir=`echo $a | sed "s/^--prefix=//"`
  415. cmake_prefix_dir=`cmake_fix_slashes "${cmake_prefix_dir}"`
  416. fi
  417. if echo $a | grep "^--parallel=" > /dev/null 2> /dev/null; then
  418. cmake_parallel_make=`echo $a | sed "s/^--parallel=//" | grep "[0-9][0-9]*"`
  419. fi
  420. if echo $a | grep "^--datadir=" > /dev/null 2> /dev/null; then
  421. cmake_data_dir=`echo $a | sed "s/^--datadir=//"`
  422. fi
  423. if echo $a | grep "^--docdir=" > /dev/null 2> /dev/null; then
  424. cmake_doc_dir=`echo $a | sed "s/^--docdir=//"`
  425. fi
  426. if echo $a | grep "^--mandir=" > /dev/null 2> /dev/null; then
  427. cmake_man_dir=`echo $a | sed "s/^--mandir=//"`
  428. fi
  429. if echo $a | grep "^--init=" > /dev/null 2> /dev/null; then
  430. cmake_init_file=`echo $a | sed "s/^--init=//"`
  431. fi
  432. if echo $a | grep "^--system-libs" > /dev/null 2> /dev/null; then
  433. cmake_bootstrap_system_libs="-DCMAKE_USE_SYSTEM_LIBRARIES=1"
  434. fi
  435. if echo $a | grep "^--no-system-libs" > /dev/null 2> /dev/null; then
  436. cmake_bootstrap_system_libs="-DCMAKE_USE_SYSTEM_LIBRARIES=0"
  437. fi
  438. if echo $a | grep "^--help" > /dev/null 2> /dev/null; then
  439. cmake_usage
  440. fi
  441. if echo $a | grep "^--version" > /dev/null 2> /dev/null; then
  442. cmake_version
  443. exit 2
  444. fi
  445. if echo $a | grep "^--verbose" > /dev/null 2> /dev/null; then
  446. cmake_verbose=TRUE
  447. fi
  448. done
  449. # If verbose, display some information about bootstrap
  450. if [ -n "${cmake_verbose}" ]; then
  451. echo "---------------------------------------------"
  452. echo "Source directory: ${cmake_source_dir}"
  453. echo "Binary directory: ${cmake_binary_dir}"
  454. echo "Prefix directory: ${cmake_prefix_dir}"
  455. echo "System: ${cmake_system}"
  456. if [ "x${cmake_parallel_make}" != "x" ]; then
  457. echo "Doing parallel make: ${cmake_parallel_make}"
  458. fi
  459. echo ""
  460. fi
  461. echo "---------------------------------------------"
  462. # Get CMake version
  463. echo "`cmake_version`"
  464. # Check for in-source build
  465. cmake_in_source_build=
  466. if [ -f "${cmake_binary_dir}/Source/cmake.cxx" -a \
  467. -f "${cmake_binary_dir}/Source/cmake.h" ]; then
  468. if [ -n "${cmake_verbose}" ]; then
  469. echo "Warning: This is an in-source build"
  470. fi
  471. cmake_in_source_build=TRUE
  472. fi
  473. # If this is not an in-source build, then Bootstrap stuff should not exist.
  474. if [ -z "${cmake_in_source_build}" ]; then
  475. # Did somebody bootstrap in the source tree?
  476. if [ -d "${cmake_source_dir}/Bootstrap.cmk" ]; then
  477. cmake_error 10 "Found directory \"${cmake_source_dir}/Bootstrap.cmk\".
  478. Looks like somebody did bootstrap CMake in the source tree, but now you are
  479. trying to do bootstrap in the binary tree. Please remove Bootstrap.cmk
  480. directory from the source tree."
  481. fi
  482. # Is there a cache in the source tree?
  483. for cmake_problematic_file in ${CMAKE_PROBLEMATIC_FILES}; do
  484. if [ -f "${cmake_source_dir}/${cmake_problematic_file}" ]; then
  485. cmake_error 10 "Found \"${cmake_source_dir}/${cmake_problematic_file}\".
  486. Looks like somebody tried to build CMake in the source tree, but now you are
  487. trying to do bootstrap in the binary tree. Please remove \"${cmake_problematic_file}\"
  488. from the source tree."
  489. fi
  490. done
  491. fi
  492. # Make bootstrap directory
  493. [ -d "${cmake_bootstrap_dir}" ] || mkdir "${cmake_bootstrap_dir}"
  494. if [ ! -d "${cmake_bootstrap_dir}" ]; then
  495. cmake_error 3 "Cannot create directory ${cmake_bootstrap_dir} to bootstrap CMake."
  496. fi
  497. cd "${cmake_bootstrap_dir}"
  498. [ -d "cmsys" ] || mkdir "cmsys"
  499. if [ ! -d "cmsys" ]; then
  500. cmake_error 4 "Cannot create directory ${cmake_bootstrap_dir}/cmsys"
  501. fi
  502. for a in stl ios; do
  503. [ -d "cmsys/${a}" ] || mkdir "cmsys/${a}"
  504. if [ ! -d "cmsys/${a}" ]; then
  505. cmake_error 5 "Cannot create directory ${cmake_bootstrap_dir}/cmsys/${a}"
  506. fi
  507. done
  508. # Delete all the bootstrap files
  509. rm -f "${cmake_bootstrap_dir}/cmake_bootstrap.log"
  510. rm -f "${cmake_bootstrap_dir}/cmConfigure.h.tmp"
  511. # If exist compiler flags, set them
  512. cmake_c_flags=${CFLAGS}
  513. cmake_cxx_flags=${CXXFLAGS}
  514. cmake_ld_flags=${LDFLAGS}
  515. # Add Carbon framework on Darwin
  516. if ${cmake_system_darwin}; then
  517. cmake_ld_flags="${LDFLAGS} -framework Carbon"
  518. fi
  519. # Add BeOS toolkits...
  520. if ${cmake_system_beos}; then
  521. cmake_ld_flags="${LDFLAGS} -lroot -lbe"
  522. fi
  523. # Test C compiler
  524. cmake_c_compiler=
  525. # If CC is set, use that for compiler, otherwise use list of known compilers
  526. if [ -n "${CC}" ]; then
  527. cmake_c_compilers="${CC}"
  528. else
  529. cmake_c_compilers="${CMAKE_KNOWN_C_COMPILERS}"
  530. fi
  531. # Check if C compiler works
  532. TMPFILE=`cmake_tmp_file`
  533. cat > "${TMPFILE}.c" <<EOF
  534. #ifdef __cplusplus
  535. # error "The CMAKE_C_COMPILER is set to a C++ compiler"
  536. #endif
  537. #include<stdio.h>
  538. #if defined(__CLASSIC_C__)
  539. int main(argc, argv)
  540. int argc;
  541. char* argv[];
  542. #else
  543. int main(int argc, char* argv[])
  544. #endif
  545. {
  546. printf("%d\n", (argv != 0));
  547. return argc-1;
  548. }
  549. EOF
  550. for a in ${cmake_c_compilers}; do
  551. if [ -z "${cmake_c_compiler}" ] && \
  552. cmake_try_run "${a}" "${cmake_c_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
  553. cmake_c_compiler="${a}"
  554. fi
  555. done
  556. rm -f "${TMPFILE}.c"
  557. if [ -z "${cmake_c_compiler}" ]; then
  558. cmake_error 6 "Cannot find appropriate C compiler on this system.
  559. Please specify one using environment variable CC.
  560. See cmake_bootstrap.log for compilers attempted.
  561. "
  562. fi
  563. echo "C compiler on this system is: ${cmake_c_compiler} ${cmake_c_flags}"
  564. # Test CXX compiler
  565. cmake_cxx_compiler=
  566. # On Mac OSX, CC is the same as cc, so make sure not to try CC as c++ compiler.
  567. # If CC is set, use that for compiler, otherwise use list of known compilers
  568. if [ -n "${CXX}" ]; then
  569. cmake_cxx_compilers="${CXX}"
  570. else
  571. cmake_cxx_compilers="${CMAKE_KNOWN_CXX_COMPILERS}"
  572. fi
  573. # Check if C++ compiler works
  574. TMPFILE=`cmake_tmp_file`
  575. cat > "${TMPFILE}.cxx" <<EOF
  576. #if defined(TEST1)
  577. # include <iostream>
  578. #else
  579. # include <iostream.h>
  580. #endif
  581. class NeedCXX
  582. {
  583. public:
  584. NeedCXX() { this->Foo = 1; }
  585. int GetFoo() { return this->Foo; }
  586. private:
  587. int Foo;
  588. };
  589. int main()
  590. {
  591. NeedCXX c;
  592. #ifdef TEST3
  593. cout << c.GetFoo() << endl;
  594. #else
  595. std::cout << c.GetFoo() << std::endl;
  596. #endif
  597. return 0;
  598. }
  599. EOF
  600. for a in ${cmake_cxx_compilers}; do
  601. for b in 1 2 3; do
  602. if [ -z "${cmake_cxx_compiler}" ] && \
  603. cmake_try_run "${a}" "${cmake_cxx_flags} -DTEST${b}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  604. cmake_cxx_compiler="${a}"
  605. fi
  606. done
  607. done
  608. rm -f "${TMPFILE}.cxx"
  609. if [ -z "${cmake_cxx_compiler}" ]; then
  610. cmake_error 7 "Cannot find appropriate C++ compiler on this system.
  611. Please specify one using environment variable CXX.
  612. See cmake_bootstrap.log for compilers attempted."
  613. fi
  614. echo "C++ compiler on this system is: ${cmake_cxx_compiler} ${cmake_cxx_flags}"
  615. # Test Make
  616. cmake_make_processor=
  617. cmake_make_flags=
  618. # If MAKE is set, use that for make processor, otherwise use list of known make
  619. if [ -n "${MAKE}" ]; then
  620. cmake_make_processors="${MAKE}"
  621. else
  622. cmake_make_processors="${CMAKE_KNOWN_MAKE_PROCESSORS}"
  623. fi
  624. TMPFILE="`cmake_tmp_file`_dir"
  625. rm -rf "${cmake_bootstrap_dir}/${TMPFILE}"
  626. mkdir "${cmake_bootstrap_dir}/${TMPFILE}"
  627. cd "${cmake_bootstrap_dir}/${TMPFILE}"
  628. cat>"Makefile"<<EOF
  629. test: test.c
  630. "${cmake_c_compiler}" -o test test.c
  631. EOF
  632. cat>"test.c"<<EOF
  633. #include <stdio.h>
  634. int main(){ printf("1\n"); return 0; }
  635. EOF
  636. cmake_original_make_flags="${cmake_make_flags}"
  637. if [ "x${cmake_parallel_make}" != "x" ]; then
  638. cmake_make_flags="${cmake_make_flags} -j ${cmake_parallel_make}"
  639. fi
  640. for a in ${cmake_make_processors}; do
  641. if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> cmake_bootstrap.log 2>&1; then
  642. cmake_make_processor="${a}"
  643. fi
  644. done
  645. cmake_full_make_flags="${cmake_make_flags}"
  646. if [ "x${cmake_original_make_flags}" != "x${cmake_make_flags}" ]; then
  647. if [ -z "${cmake_make_processor}" ]; then
  648. cmake_make_flags="${cmake_original_make_flags}"
  649. for a in ${cmake_make_processors}; do
  650. if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> cmake_bootstrap.log 2>&1; then
  651. cmake_make_processor="${a}"
  652. fi
  653. done
  654. fi
  655. fi
  656. cd "${cmake_bootstrap_dir}"
  657. rm -rf "${cmake_bootstrap_dir}/${TMPFILE}"
  658. if [ -z "${cmake_make_processor}" ]; then
  659. cmake_error 8 "Cannot find appropriate Makefile processor on this system.
  660. Please specify one using environment variable MAKE."
  661. fi
  662. echo "Makefile processor on this system is: ${cmake_make_processor}"
  663. if [ "x${cmake_full_make_flags}" != "x${cmake_make_flags}" ]; then
  664. echo "---------------------------------------------"
  665. echo "Makefile processor ${cmake_make_processor} does not support parallel build"
  666. echo "---------------------------------------------"
  667. fi
  668. # Ok, we have CC, CXX, and MAKE.
  669. # Test C++ compiler features
  670. # Are we GCC?
  671. TMPFILE=`cmake_tmp_file`
  672. cat > ${TMPFILE}.cxx <<EOF
  673. #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
  674. #include <iostream>
  675. int main() { std::cout << "This is GNU" << std::endl; return 0;}
  676. #endif
  677. EOF
  678. cmake_cxx_compiler_is_gnu=0
  679. if cmake_try_run "${cmake_cxx_compiler}" \
  680. "${cmake_cxx_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  681. cmake_cxx_compiler_is_gnu=1
  682. fi
  683. if [ "x${cmake_cxx_compiler_is_gnu}" = "x1" ]; then
  684. echo "${cmake_cxx_compiler} is GNU compiler"
  685. else
  686. echo "${cmake_cxx_compiler} is not GNU compiler"
  687. fi
  688. rm -f "${TMPFILE}.cxx"
  689. if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then
  690. # Check for non-GNU compiler flags
  691. # If we are on IRIX, check for -LANG:std
  692. cmake_test_flags="-LANG:std"
  693. if [ "x${cmake_system}" = "xIRIX64" ]; then
  694. TMPFILE=`cmake_tmp_file`
  695. cat > ${TMPFILE}.cxx <<EOF
  696. #include <iostream>
  697. int main() { std::cout << "No need for ${cmake_test_flags}" << std::endl; return 0;}
  698. EOF
  699. cmake_need_lang_std=0
  700. if cmake_try_run "${cmake_cxx_compiler}" \
  701. "${cmake_cxx_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  702. :
  703. else
  704. if cmake_try_run "${cmake_cxx_compiler}" \
  705. "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  706. cmake_need_lang_std=1
  707. fi
  708. fi
  709. if [ "x${cmake_need_lang_std}" = "x1" ]; then
  710. cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
  711. echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
  712. else
  713. echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
  714. fi
  715. rm -f "${TMPFILE}.cxx"
  716. fi
  717. cmake_test_flags=
  718. # If we are on OSF, check for -timplicit_local -no_implicit_include
  719. cmake_test_flags="-timplicit_local -no_implicit_include"
  720. if [ "x${cmake_system}" = "xOSF1" ]; then
  721. TMPFILE=`cmake_tmp_file`
  722. cat > ${TMPFILE}.cxx <<EOF
  723. #include <iostream>
  724. int main() { std::cout << "We need ${cmake_test_flags}" << std::endl; return 0;}
  725. EOF
  726. cmake_need_flags=1
  727. if cmake_try_run "${cmake_cxx_compiler}" \
  728. "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  729. :
  730. else
  731. cmake_need_flags=0
  732. fi
  733. if [ "x${cmake_need_flags}" = "x1" ]; then
  734. cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
  735. echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
  736. else
  737. echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
  738. fi
  739. rm -f "${TMPFILE}.cxx"
  740. fi
  741. cmake_test_flags=
  742. # If we are on OSF, check for -std strict_ansi -nopure_cname
  743. cmake_test_flags="-std strict_ansi -nopure_cname"
  744. if [ "x${cmake_system}" = "xOSF1" ]; then
  745. TMPFILE=`cmake_tmp_file`
  746. cat > ${TMPFILE}.cxx <<EOF
  747. #include <iostream>
  748. int main() { std::cout << "We need ${cmake_test_flags}" << std::endl; return 0;}
  749. EOF
  750. cmake_need_flags=1
  751. if cmake_try_run "${cmake_cxx_compiler}" \
  752. "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  753. :
  754. else
  755. cmake_need_flags=0
  756. fi
  757. if [ "x${cmake_need_flags}" = "x1" ]; then
  758. cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
  759. echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
  760. else
  761. echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
  762. fi
  763. rm -f "${TMPFILE}.cxx"
  764. fi
  765. cmake_test_flags=
  766. # If we are on HP-UX, check for -Ae for the C compiler.
  767. cmake_test_flags="-Ae"
  768. if [ "x${cmake_system}" = "xHP-UX" ]; then
  769. TMPFILE=`cmake_tmp_file`
  770. cat > ${TMPFILE}.c <<EOF
  771. int main(int argc, char** argv) { (void)argc; (void)argv; return 0; }
  772. EOF
  773. cmake_need_Ae=0
  774. if cmake_try_run "${cmake_c_compiler}" "${cmake_c_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
  775. :
  776. else
  777. if cmake_try_run "${cmake_c_compiler}" \
  778. "${cmake_c_flags} ${cmake_test_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
  779. cmake_need_Ae=1
  780. fi
  781. fi
  782. if [ "x${cmake_need_Ae}" = "x1" ]; then
  783. cmake_c_flags="${cmake_c_flags} ${cmake_test_flags}"
  784. echo "${cmake_c_compiler} needs ${cmake_test_flags}"
  785. else
  786. echo "${cmake_c_compiler} does not need ${cmake_test_flags}"
  787. fi
  788. rm -f "${TMPFILE}.c"
  789. fi
  790. cmake_test_flags=
  791. fi
  792. # Test for kwsys features
  793. KWSYS_NAME_IS_KWSYS=0
  794. KWSYS_BUILD_SHARED=0
  795. KWSYS_LFS_AVAILABLE=0
  796. KWSYS_LFS_REQUESTED=0
  797. KWSYS_IOS_USE_STRSTREAM_H=0
  798. KWSYS_IOS_USE_STRSTREA_H=0
  799. KWSYS_IOS_HAVE_STD=0
  800. KWSYS_IOS_USE_SSTREAM=0
  801. KWSYS_IOS_USE_ANSI=0
  802. KWSYS_STL_HAVE_STD=0
  803. KWSYS_STAT_HAS_ST_MTIM=0
  804. KWSYS_STL_STRING_HAVE_NEQ_CHAR=0
  805. KWSYS_STL_HAS_ITERATOR_TRAITS=0
  806. KWSYS_STL_HAS_ITERATOR_CATEGORY=0
  807. KWSYS_STL_HAS___ITERATOR_CATEGORY=0
  808. KWSYS_STL_HAS_ALLOCATOR_TEMPLATE=0
  809. KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE=0
  810. KWSYS_STL_HAS_ALLOCATOR_REBIND=0
  811. KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT=0
  812. KWSYS_STL_HAS_ALLOCATOR_OBJECTS=0
  813. KWSYS_CXX_HAS_CSTDDEF=0
  814. KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS=0
  815. KWSYS_CXX_HAS_MEMBER_TEMPLATES=0
  816. KWSYS_CXX_HAS_FULL_SPECIALIZATION=0
  817. KWSYS_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP=0
  818. # Hardcode these kwsys features. They work on all known UNIX compilers anyway.
  819. KWSYS_STL_STRING_HAVE_ISTREAM=1
  820. KWSYS_STL_STRING_HAVE_OSTREAM=1
  821. if cmake_try_run "${cmake_cxx_compiler}" \
  822. "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAVE_STD" \
  823. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  824. KWSYS_STL_HAVE_STD=1
  825. echo "${cmake_cxx_compiler} has STL in std:: namespace"
  826. else
  827. echo "${cmake_cxx_compiler} does not have STL in std:: namespace"
  828. fi
  829. if cmake_try_run "${cmake_cxx_compiler}" \
  830. "${cmake_cxx_flags} -DTEST_KWSYS_IOS_USE_ANSI" \
  831. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  832. KWSYS_IOS_USE_ANSI=1
  833. echo "${cmake_cxx_compiler} has ANSI streams"
  834. else
  835. echo "${cmake_cxx_compiler} does not have ANSI streams"
  836. fi
  837. if [ "x$KWSYS_IOS_USE_ANSI" = "x1" ]; then
  838. if cmake_try_run "${cmake_cxx_compiler}" \
  839. "${cmake_cxx_flags} -DTEST_KWSYS_IOS_HAVE_STD" \
  840. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  841. KWSYS_IOS_HAVE_STD=1
  842. echo "${cmake_cxx_compiler} has streams in std:: namespace"
  843. else
  844. echo "${cmake_cxx_compiler} does not have streams in std:: namespace"
  845. fi
  846. if cmake_try_run "${cmake_cxx_compiler}" \
  847. "${cmake_cxx_flags} -DTEST_KWSYS_IOS_USE_SSTREAM" \
  848. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  849. KWSYS_IOS_USE_SSTREAM=1
  850. echo "${cmake_cxx_compiler} has sstream"
  851. else
  852. echo "${cmake_cxx_compiler} does not have sstream"
  853. fi
  854. fi
  855. if [ "x$KWSYS_IOS_USE_SSTREAM" = "x0" ]; then
  856. if cmake_try_run "${cmake_cxx_compiler}" \
  857. "${cmake_cxx_flags} -DTEST_KWSYS_IOS_USE_STRSTREAM_H" \
  858. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  859. KWSYS_IOS_USE_STRSTREAM_H=1
  860. echo "${cmake_cxx_compiler} has strstream.h"
  861. else
  862. echo "${cmake_cxx_compiler} does not have strstream.h"
  863. fi
  864. if [ "x$KWSYS_IOS_USE_STRSTREAM_H" = "x0" ]; then
  865. if cmake_try_run "${cmake_cxx_compiler}" \
  866. "${cmake_cxx_flags} -DTEST_KWSYS_IOS_USE_STRSTREA_H" \
  867. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  868. KWSYS_IOS_USE_STRSTREA_H=1
  869. echo "${cmake_cxx_compiler} has strstrea.h"
  870. else
  871. echo "${cmake_cxx_compiler} does not have strstrea.h"
  872. fi
  873. fi
  874. fi
  875. if cmake_try_run "${cmake_cxx_compiler}" \
  876. "${cmake_cxx_flags} -DTEST_KWSYS_STL_STRING_HAVE_NEQ_CHAR -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \
  877. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  878. KWSYS_STL_STRING_HAVE_NEQ_CHAR=1
  879. echo "${cmake_cxx_compiler} has operator!=(string, char*)"
  880. else
  881. echo "${cmake_cxx_compiler} does not have operator!=(string, char*)"
  882. fi
  883. if cmake_try_run "${cmake_cxx_compiler}" \
  884. "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_ITERATOR_TRAITS -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \
  885. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  886. KWSYS_STL_HAS_ITERATOR_TRAITS=1
  887. echo "${cmake_cxx_compiler} has stl iterator_traits"
  888. else
  889. echo "${cmake_cxx_compiler} does not have stl iterator_traits"
  890. fi
  891. if [ "x${KWSYS_STL_HAS_ITERATOR_TRAITS}" = "x0" ]; then
  892. if cmake_try_run "${cmake_cxx_compiler}" \
  893. "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_ITERATOR_CATEGORY -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \
  894. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  895. KWSYS_STL_HAS_ITERATOR_CATEGORY=1
  896. echo "${cmake_cxx_compiler} has old iterator_category"
  897. else
  898. echo "${cmake_cxx_compiler} does not have old iterator_category"
  899. fi
  900. if [ "x${KWSYS_STL_HAS_ITERATOR_CATEGORY}" = "x0" ]; then
  901. if cmake_try_run "${cmake_cxx_compiler}" \
  902. "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS___ITERATOR_CATEGORY -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \
  903. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  904. KWSYS_STL_HAS___ITERATOR_CATEGORY=1
  905. echo "${cmake_cxx_compiler} has old __iterator_category"
  906. else
  907. echo "${cmake_cxx_compiler} does not have old __iterator_category"
  908. fi
  909. fi
  910. fi
  911. if cmake_try_run "${cmake_cxx_compiler}" \
  912. "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_ALLOCATOR_TEMPLATE -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \
  913. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  914. KWSYS_STL_HAS_ALLOCATOR_TEMPLATE=1
  915. echo "${cmake_cxx_compiler} has standard template allocator"
  916. else
  917. echo "${cmake_cxx_compiler} does not have standard template allocator"
  918. fi
  919. if [ "x${KWSYS_STL_HAS_ALLOCATOR_TEMPLATE}" = "x1" ]; then
  920. if cmake_try_run "${cmake_cxx_compiler}" \
  921. "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_ALLOCATOR_REBIND -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \
  922. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  923. KWSYS_STL_HAS_ALLOCATOR_REBIND=1
  924. echo "${cmake_cxx_compiler} has allocator<>::rebind<>"
  925. else
  926. echo "${cmake_cxx_compiler} does not have allocator<>::rebind<>"
  927. fi
  928. if cmake_try_run "${cmake_cxx_compiler}" \
  929. "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \
  930. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  931. KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT=1
  932. echo "${cmake_cxx_compiler} has non-standard allocator<>::max_size argument"
  933. else
  934. echo "${cmake_cxx_compiler} does not have non-standard allocator<>::max_size argument"
  935. fi
  936. else
  937. if cmake_try_run "${cmake_cxx_compiler}" \
  938. "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \
  939. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  940. KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE=1
  941. echo "${cmake_cxx_compiler} has old non-template allocator"
  942. else
  943. echo "${cmake_cxx_compiler} does not have old non-template allocator"
  944. fi
  945. fi
  946. if cmake_try_run "${cmake_cxx_compiler}" \
  947. "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_ALLOCATOR_OBJECTS -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \
  948. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  949. KWSYS_STL_HAS_ALLOCATOR_OBJECTS=1
  950. echo "${cmake_cxx_compiler} has stl containers supporting allocator objects"
  951. else
  952. echo "${cmake_cxx_compiler} does not have stl containers supporting allocator objects"
  953. fi
  954. if cmake_try_run "${cmake_cxx_compiler}" \
  955. "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_CSTDDEF" \
  956. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  957. KWSYS_CXX_HAS_CSTDDEF=1
  958. echo "${cmake_cxx_compiler} has header cstddef"
  959. else
  960. echo "${cmake_cxx_compiler} does not have header cstddef"
  961. fi
  962. if cmake_try_run "${cmake_cxx_compiler}" \
  963. "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS" \
  964. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  965. echo "${cmake_cxx_compiler} does not require template friends to use <>"
  966. else
  967. KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS=1
  968. echo "${cmake_cxx_compiler} requires template friends to use <>"
  969. fi
  970. if cmake_try_run "${cmake_cxx_compiler}" \
  971. "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_MEMBER_TEMPLATES" \
  972. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  973. KWSYS_CXX_HAS_MEMBER_TEMPLATES=1
  974. echo "${cmake_cxx_compiler} supports member templates"
  975. else
  976. echo "${cmake_cxx_compiler} does not support member templates"
  977. fi
  978. if cmake_try_run "${cmake_cxx_compiler}" \
  979. "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_FULL_SPECIALIZATION" \
  980. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  981. KWSYS_CXX_HAS_FULL_SPECIALIZATION=1
  982. echo "${cmake_cxx_compiler} has standard template specialization syntax"
  983. else
  984. echo "${cmake_cxx_compiler} does not have standard template specialization syntax"
  985. fi
  986. if cmake_try_run "${cmake_cxx_compiler}" \
  987. "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP" \
  988. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  989. KWSYS_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP=1
  990. echo "${cmake_cxx_compiler} has argument dependent lookup"
  991. else
  992. echo "${cmake_cxx_compiler} does not have argument dependent lookup"
  993. fi
  994. if cmake_try_run "${cmake_cxx_compiler}" \
  995. "${cmake_cxx_flags} -DTEST_KWSYS_STAT_HAS_ST_MTIM" \
  996. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  997. KWSYS_STAT_HAS_ST_MTIM=1
  998. echo "${cmake_cxx_compiler} has struct stat with st_mtim member"
  999. else
  1000. echo "${cmake_cxx_compiler} does not have struct stat with st_mtim member"
  1001. fi
  1002. # Just to be safe, let us store compiler and flags to the header file
  1003. cmake_bootstrap_version='$Revision$'
  1004. cmake_compiler_settings_comment="/*
  1005. * Generated by ${cmake_source_dir}/bootstrap
  1006. * Version: ${cmake_bootstrap_version}
  1007. *
  1008. * Source directory: ${cmake_source_dir}
  1009. * Binary directory: ${cmake_bootstrap_dir}
  1010. *
  1011. * C compiler: ${cmake_c_compiler}
  1012. * C flags: ${cmake_c_flags}
  1013. *
  1014. * C++ compiler: ${cmake_cxx_compiler}
  1015. * C++ flags: ${cmake_cxx_flags}
  1016. *
  1017. * Make: ${cmake_make_processor}
  1018. *
  1019. * Sources:
  1020. * ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES}
  1021. * kwSys Sources:
  1022. * ${KWSYS_CXX_SOURCES} ${KWSYS_C_SOURCES} ${KWSYS_C_MINGW_SOURCES}
  1023. */
  1024. "
  1025. cmake_report cmConfigure.h.tmp "${cmake_compiler_settings_comment}"
  1026. if [ "x$KWSYS_STL_HAVE_STD" = "x1" ]; then
  1027. cmake_report cmConfigure.h.tmp "/* #undef CMAKE_NO_STD_NAMESPACE */"
  1028. else
  1029. cmake_report cmConfigure.h.tmp "#define CMAKE_NO_STD_NAMESPACE 1"
  1030. fi
  1031. if [ "x$KWSYS_IOS_USE_ANSI" = "x1" ]; then
  1032. cmake_report cmConfigure.h.tmp "/* #undef CMAKE_NO_ANSI_STREAM_HEADERS */"
  1033. else
  1034. cmake_report cmConfigure.h.tmp "#define CMAKE_NO_ANSI_STREAM_HEADERS 1"
  1035. fi
  1036. if [ "x$KWSYS_IOS_USE_SSTREAM" = "x1" ]; then
  1037. cmake_report cmConfigure.h.tmp "/* #undef CMAKE_NO_ANSI_STRING_STREAM */"
  1038. else
  1039. cmake_report cmConfigure.h.tmp "#define CMAKE_NO_ANSI_STRING_STREAM 1"
  1040. fi
  1041. # Test for ansi FOR scope
  1042. if cmake_try_run "${cmake_cxx_compiler}" \
  1043. "${cmake_cxx_flags}" \
  1044. "${cmake_source_dir}/Modules/TestForAnsiForScope.cxx" >> cmake_bootstrap.log 2>&1; then
  1045. cmake_report cmConfigure.h.tmp "/* #undef CMAKE_NO_ANSI_FOR_SCOPE */"
  1046. echo "${cmake_cxx_compiler} has ANSI for scoping"
  1047. else
  1048. cmake_report cmConfigure.h.tmp "#define CMAKE_NO_ANSI_FOR_SCOPE 1"
  1049. echo "${cmake_cxx_compiler} does not have ANSI for scoping"
  1050. fi
  1051. # When bootstrapping on MinGW with MSYS we must convert the source
  1052. # directory to a windows path.
  1053. if ${cmake_system_mingw}; then
  1054. cmake_root_dir=`cd "${cmake_source_dir}"; pwd -W`
  1055. else
  1056. cmake_root_dir="${cmake_source_dir}"
  1057. fi
  1058. # Write CMake version
  1059. for a in MAJOR MINOR PATCH; do
  1060. CMake_VERSION=`cat "${cmake_source_dir}/CMakeLists.txt" | \
  1061. grep "SET(CMake_VERSION_${a} *[0-9]*)" | sed "s/SET(CMake_VERSION_${a} *\([0-9]*\))/\1/"`
  1062. cmake_report cmConfigure.h.tmp "#define CMake_VERSION_${a} ${CMake_VERSION}"
  1063. done
  1064. cmake_report cmConfigure.h.tmp "#define CMAKE_ROOT_DIR \"${cmake_root_dir}\""
  1065. cmake_report cmConfigure.h.tmp "#define CMAKE_DATA_DIR \"${cmake_data_dir}\""
  1066. cmake_report cmConfigure.h.tmp "#define CMAKE_BOOTSTRAP"
  1067. # Regenerate real cmConfigure.h
  1068. if diff cmConfigure.h cmConfigure.h.tmp > /dev/null 2> /dev/null; then
  1069. rm -f cmConfigure.h.tmp
  1070. else
  1071. mv -f cmConfigure.h.tmp cmConfigure.h
  1072. fi
  1073. # Prepare KWSYS
  1074. cmake_kwsys_config_replace_string \
  1075. "${cmake_source_dir}/Source/kwsys/Configure.hxx.in" \
  1076. "${cmake_bootstrap_dir}/cmsys/Configure.hxx" \
  1077. "${cmake_compiler_settings_comment}"
  1078. cmake_kwsys_config_replace_string \
  1079. "${cmake_source_dir}/Source/kwsys/Configure.h.in" \
  1080. "${cmake_bootstrap_dir}/cmsys/Configure.h" \
  1081. "${cmake_compiler_settings_comment}"
  1082. for a in ${KWSYS_FILES}; do
  1083. cmake_replace_string "${cmake_source_dir}/Source/kwsys/${a}.in" \
  1084. "${cmake_bootstrap_dir}/cmsys/${a}" KWSYS_NAMESPACE cmsys
  1085. done
  1086. for a in ${KWSYS_IOS_FILES}; do
  1087. cmake_replace_string "${cmake_source_dir}/Source/kwsys/kwsys_ios_${a}.h.in" \
  1088. "${cmake_bootstrap_dir}/cmsys/ios/${a}" KWSYS_NAMESPACE cmsys
  1089. done
  1090. cmake_replace_string "${cmake_source_dir}/Source/kwsys/kwsys_stl.hxx.in" \
  1091. "${cmake_bootstrap_dir}/cmsys/stl/stl.hxx.in" KWSYS_STL_HEADER_EXTRA ""
  1092. cmake_replace_string "${cmake_bootstrap_dir}/cmsys/stl/stl.hxx.in" \
  1093. "${cmake_bootstrap_dir}/cmsys/stl/stl.h.in" KWSYS_NAMESPACE cmsys
  1094. for a in string vector map; do
  1095. cmake_replace_string "${cmake_bootstrap_dir}/cmsys/stl/stl.h.in" \
  1096. "${cmake_bootstrap_dir}/cmsys/stl/${a}" KWSYS_STL_HEADER ${a}
  1097. done
  1098. # Generate Makefile
  1099. dep="cmConfigure.h cmsys/*.hxx cmsys/*.h `cmake_escape \"${cmake_source_dir}\"`/Source/*.h"
  1100. objs=""
  1101. for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} ${KWSYS_CXX_SOURCES} ${KWSYS_C_SOURCES} ${KWSYS_C_GENERATED_SOURCES}; do
  1102. objs="${objs} ${a}.o"
  1103. done
  1104. # Generate dependencies for cmBootstrapCommands.cxx
  1105. for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do
  1106. cmBootstrapCommandsDeps="${cmBootstrapCommandsDeps} `cmake_escape "${cmake_source_dir}/Source/$file"`"
  1107. done
  1108. cmBootstrapCommandsDeps=`echo $cmBootstrapCommandsDeps`
  1109. if [ "x${cmake_ansi_cxx_flags}" != "x" ]; then
  1110. cmake_cxx_flags="${cmake_ansi_cxx_flags} ${cmake_cxx_flags}"
  1111. fi
  1112. if [ "x${cmake_c_flags}" != "x" ]; then
  1113. cmake_c_flags="${cmake_c_flags} "
  1114. fi
  1115. if [ "x${cmake_cxx_flags}" != "x" ]; then
  1116. cmake_cxx_flags="${cmake_cxx_flags} "
  1117. fi
  1118. cmake_c_flags="${cmake_c_flags}-I`cmake_escape \"${cmake_source_dir}/Source\"` \
  1119. -I`cmake_escape \"${cmake_bootstrap_dir}\"`"
  1120. cmake_cxx_flags="${cmake_cxx_flags}-I`cmake_escape \"${cmake_source_dir}/Source\"` \
  1121. -I`cmake_escape \"${cmake_bootstrap_dir}\"`"
  1122. echo "cmake: ${objs}" > "${cmake_bootstrap_dir}/Makefile"
  1123. echo " ${cmake_cxx_compiler} ${cmake_ld_flags} ${cmake_cxx_flags} ${objs} -o cmake" >> "${cmake_bootstrap_dir}/Makefile"
  1124. for a in ${CMAKE_CXX_SOURCES}; do
  1125. src=`cmake_escape "${cmake_source_dir}/Source/${a}.cxx"`
  1126. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1127. echo " ${cmake_cxx_compiler} ${cmake_cxx_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1128. done
  1129. echo "cmBootstrapCommands.o : $cmBootstrapCommandsDeps" >> "${cmake_bootstrap_dir}/Makefile"
  1130. for a in ${CMAKE_C_SOURCES}; do
  1131. src=`cmake_escape "${cmake_source_dir}/Source/${a}.c"`
  1132. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1133. echo " ${cmake_c_compiler} ${cmake_c_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1134. done
  1135. for a in ${KWSYS_C_SOURCES} ${KWSYS_C_MINGW_SOURCES}; do
  1136. src=`cmake_escape "${cmake_source_dir}/Source/kwsys/${a}.c"`
  1137. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1138. echo " ${cmake_c_compiler} ${cmake_c_flags} -DKWSYS_NAMESPACE=cmsys -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1139. done
  1140. for a in ${KWSYS_CXX_SOURCES}; do
  1141. src=`cmake_escape "${cmake_source_dir}/Source/kwsys/${a}.cxx"`
  1142. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1143. echo " ${cmake_cxx_compiler} ${cmake_cxx_flags} -DKWSYS_NAMESPACE=cmsys -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1144. done
  1145. if ${cmake_system_mingw}; then
  1146. src=`cmake_escape "${cmake_bootstrap_dir}/cmsysProcessFwd9xEnc.c"`
  1147. in=`cmake_escape "${cmake_bootstrap_dir}/cmsysProcessFwd9x.exe"`
  1148. cmd=`cmake_escape "${cmake_bootstrap_dir}/cmsysEncodeExecutable.exe"`
  1149. a="cmsysProcessFwd9xEnc"
  1150. echo "${cmd} : EncodeExecutable.o" >> "${cmake_bootstrap_dir}/Makefile"
  1151. echo " ${cmake_c_compiler} ${cmake_ld_flags} ${cmake_c_flags} EncodeExecutable.o -o ${cmd}" >> "${cmake_bootstrap_dir}/Makefile"
  1152. echo "${in} : ProcessFwd9x.o" >> "${cmake_bootstrap_dir}/Makefile"
  1153. echo " ${cmake_c_compiler} ${cmake_ld_flags} ${cmake_c_flags} ProcessFwd9x.o -o ${in}" >> "${cmake_bootstrap_dir}/Makefile"
  1154. echo "${src} : ${cmd} ${in}" >> "${cmake_bootstrap_dir}/Makefile"
  1155. echo " ${cmd} ${in} ${src} cmsys ProcessFwd9x" >> "${cmake_bootstrap_dir}/Makefile"
  1156. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1157. echo " ${cmake_c_compiler} ${cmake_c_flags} -I`cmake_escape \"${cmake_source_dir}/Source/kwsys\"` -DKWSYS_NAMESPACE=cmsys -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1158. fi
  1159. cat>>"${cmake_bootstrap_dir}/Makefile"<<EOF
  1160. rebuild_cache:
  1161. cd "${cmake_binary_dir}" && "${cmake_source_dir}/bootstrap"
  1162. EOF
  1163. # Write our default settings to Bootstrap.cmk/InitialCacheFlags.cmake.
  1164. cat > "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" <<EOF
  1165. # Generated by ${cmake_source_dir}/bootstrap
  1166. # Default cmake settings. These may be overridden any settings below.
  1167. SET (CMAKE_INSTALL_PREFIX "${cmake_prefix_dir}" CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
  1168. SET (CMAKE_DOC_DIR "${cmake_doc_dir}" CACHE PATH "Install location for documentation (relative to prefix)." FORCE)
  1169. SET (CMAKE_MAN_DIR "${cmake_man_dir}" CACHE PATH "Install location for man pages (relative to prefix)." FORCE)
  1170. SET (CMAKE_DATA_DIR "${cmake_data_dir}" CACHE PATH "Install location for data (relative to prefix)." FORCE)
  1171. EOF
  1172. # Add user-specified settings. Handle relative-path case for
  1173. # specification of cmake_init_file.
  1174. (
  1175. cd "${cmake_binary_dir}"
  1176. if [ -f "${cmake_init_file}" ]; then
  1177. cat "${cmake_init_file}" >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1178. fi
  1179. )
  1180. echo "---------------------------------------------"
  1181. # Run make to build bootstrap cmake
  1182. if [ "x${cmake_parallel_make}" != "x" ]; then
  1183. ${cmake_make_processor} ${cmake_make_flags}
  1184. else
  1185. ${cmake_make_processor}
  1186. fi
  1187. RES=$?
  1188. if [ "${RES}" -ne "0" ]; then
  1189. cmake_error 9 "Problem while running ${cmake_make_processor}"
  1190. fi
  1191. cd "${cmake_binary_dir}"
  1192. # Set C, CXX, and MAKE environment variables, so that real real cmake will be
  1193. # build with same compiler and make
  1194. CC="${cmake_c_compiler}"
  1195. CXX="${cmake_cxx_compiler}"
  1196. MAKE="${cmake_make_processor}"
  1197. export CC
  1198. export CXX
  1199. export MAKE
  1200. # Run bootstrap CMake to configure real CMake
  1201. "${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_bootstrap_system_libs}
  1202. RES=$?
  1203. if [ "${RES}" -ne "0" ]; then
  1204. cmake_error 11 "Problem while running initial CMake"
  1205. fi
  1206. echo "---------------------------------------------"
  1207. # And we are done. Now just run make
  1208. echo "CMake has bootstrapped. Now run ${cmake_make_processor}."