bootstrap 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466
  1. #!/bin/sh
  2. #=============================================================================
  3. # CMake - Cross Platform Makefile Generator
  4. # Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
  5. #
  6. # Distributed under the OSI-approved BSD License (the "License");
  7. # see accompanying file Copyright.txt for details.
  8. #
  9. # This software is distributed WITHOUT ANY WARRANTY; without even the
  10. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. # See the License for more information.
  12. #=============================================================================
  13. die() {
  14. echo "$@" 1>&2 ; exit 1
  15. }
  16. # Version number extraction function.
  17. cmake_version_component()
  18. {
  19. cat "${cmake_source_dir}/Source/CMakeVersion.cmake" | sed -n "
  20. /^set(CMake_VERSION_${1}/ {s/set(CMake_VERSION_${1} *\([0-9]*\))/\1/;p;}
  21. "
  22. }
  23. # Install destination extraction function.
  24. cmake_install_dest_default()
  25. {
  26. cat "${cmake_source_dir}/Source/CMakeInstallDestinations.cmake" | sed -n '
  27. /^ *set(CMAKE_'"${1}"'_DIR_DEFAULT.*) # '"${2}"'$/ {
  28. s/^ *set(CMAKE_'"${1}"'_DIR_DEFAULT *"\([^"]*\)").*$/\1/
  29. s/${CMake_VERSION_MAJOR}/'"${cmake_version_major}"'/
  30. s/${CMake_VERSION_MINOR}/'"${cmake_version_minor}"'/
  31. s/${CMake_VERSION_PATCH}/'"${cmake_version_patch}"'/
  32. p
  33. q
  34. }
  35. '
  36. }
  37. cmake_toupper()
  38. {
  39. echo "$1" | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'
  40. }
  41. # Detect system and directory information.
  42. cmake_system=`uname`
  43. cmake_source_dir=`cd "\`dirname \"$0\"\`";pwd`
  44. cmake_binary_dir=`pwd`
  45. # Load version information.
  46. cmake_version_major="`cmake_version_component MAJOR`"
  47. cmake_version_minor="`cmake_version_component MINOR`"
  48. cmake_version_patch="`cmake_version_component PATCH`"
  49. cmake_version="${cmake_version_major}.${cmake_version_minor}.${cmake_version_patch}"
  50. cmake_version_rc="`cmake_version_component RC`"
  51. if [ "$cmake_version_rc" != "" ]; then
  52. cmake_version="${cmake_version}-rc${cmake_version_rc}"
  53. fi
  54. cmake_copyright="`grep '^Copyright .* Kitware' "${cmake_source_dir}/Copyright.txt"`"
  55. cmake_data_dir_keyword="OTHER"
  56. cmake_doc_dir_keyword="OTHER"
  57. cmake_man_dir_keyword="OTHER"
  58. cmake_xdgdata_dir_keyword="OTHER"
  59. cmake_data_dir=""
  60. cmake_doc_dir=""
  61. cmake_man_dir=""
  62. cmake_xdgdata_dir=""
  63. cmake_init_file=""
  64. cmake_bootstrap_system_libs=""
  65. cmake_bootstrap_qt_gui=""
  66. cmake_bootstrap_qt_qmake=""
  67. cmake_sphinx_man=""
  68. cmake_sphinx_html=""
  69. cmake_sphinx_qthelp=""
  70. cmake_sphinx_build=""
  71. cmake_sphinx_flags=""
  72. # Determine whether this is a Cygwin environment.
  73. if echo "${cmake_system}" | grep CYGWIN >/dev/null 2>&1; then
  74. cmake_system_cygwin=true
  75. cmake_doc_dir_keyword="CYGWIN"
  76. cmake_man_dir_keyword="CYGWIN"
  77. else
  78. cmake_system_cygwin=false
  79. fi
  80. # Determine whether this is a MinGW environment.
  81. if echo "${cmake_system}" | grep MINGW >/dev/null 2>&1; then
  82. cmake_system_mingw=true
  83. else
  84. cmake_system_mingw=false
  85. fi
  86. # Determine whether this is OS X
  87. if echo "${cmake_system}" | grep Darwin >/dev/null 2>&1; then
  88. cmake_system_darwin=true
  89. else
  90. cmake_system_darwin=false
  91. fi
  92. # Determine whether this is BeOS
  93. if echo "${cmake_system}" | grep BeOS >/dev/null 2>&1; then
  94. cmake_system_beos=true
  95. cmake_doc_dir_keyword="HAIKU"
  96. cmake_man_dir_keyword="HAIKU"
  97. else
  98. cmake_system_beos=false
  99. fi
  100. # Determine whether this is Haiku
  101. if echo "${cmake_system}" | grep Haiku >/dev/null 2>&1; then
  102. cmake_system_haiku=true
  103. cmake_doc_dir_keyword="HAIKU"
  104. cmake_man_dir_keyword="HAIKU"
  105. else
  106. cmake_system_haiku=false
  107. fi
  108. # Determine whether this is OpenVMS
  109. if echo "${cmake_system}" | grep OpenVMS >/dev/null 2>&1; then
  110. cmake_system_openvms=true
  111. else
  112. cmake_system_openvms=false
  113. fi
  114. # Determine whether this is HP-UX
  115. if echo "${cmake_system}" | grep HP-UX >/dev/null 2>&1; then
  116. cmake_system_hpux=true
  117. else
  118. cmake_system_hpux=false
  119. fi
  120. # Determine whether this is Linux
  121. if echo "${cmake_system}" | grep Linux >/dev/null 2>&1; then
  122. cmake_system_linux=true
  123. else
  124. cmake_system_linux=false
  125. fi
  126. # Determine whether this is a PA-RISC machine
  127. # This only works for Linux or HP-UX, not other PA-RISC OSs (BSD maybe?). Also
  128. # may falsely detect parisc on HP-UX m68k
  129. cmake_machine_parisc=false
  130. if ${cmake_system_linux}; then
  131. if uname -m | grep parisc >/dev/null 2>&1; then
  132. cmake_machine_parisc=true
  133. fi
  134. elif ${cmake_system_hpux}; then
  135. if uname -m | grep ia64 >/dev/null 2>&1; then : ; else
  136. cmake_machine_parisc=true
  137. fi
  138. fi
  139. # Choose the generator to use for bootstrapping.
  140. if ${cmake_system_mingw}; then
  141. # Bootstrapping from an MSYS prompt.
  142. cmake_bootstrap_generator="MSYS Makefiles"
  143. else
  144. # Bootstrapping from a standard UNIX prompt.
  145. cmake_bootstrap_generator="Unix Makefiles"
  146. fi
  147. # Choose tools and extensions for this platform.
  148. if ${cmake_system_openvms}; then
  149. _tmp="_tmp"
  150. _cmk="_cmk"
  151. _diff=`which diff`
  152. else
  153. _tmp=".tmp"
  154. _cmk=".cmk"
  155. _diff="diff"
  156. fi
  157. # Construct bootstrap directory name.
  158. cmake_bootstrap_dir="${cmake_binary_dir}/Bootstrap${_cmk}"
  159. # Helper function to fix windows paths.
  160. case "${cmake_system}" in
  161. *MINGW*)
  162. cmake_fix_slashes()
  163. {
  164. cmd //c echo "$(echo "$1" | sed 's/\\/\//g')" | sed 's/^"//;s/" *$//'
  165. }
  166. ;;
  167. *)
  168. cmake_fix_slashes()
  169. {
  170. echo "$1" | sed 's/\\/\//g'
  171. }
  172. ;;
  173. esac
  174. # Choose the default install prefix.
  175. if ${cmake_system_mingw}; then
  176. if [ "x${PROGRAMFILES}" != "x" ]; then
  177. cmake_default_prefix=`cmake_fix_slashes "${PROGRAMFILES}/CMake"`
  178. elif [ "x${ProgramFiles}" != "x" ]; then
  179. cmake_default_prefix=`cmake_fix_slashes "${ProgramFiles}/CMake"`
  180. elif [ "x${SYSTEMDRIVE}" != "x" ]; then
  181. cmake_default_prefix=`cmake_fix_slashes "${SYSTEMDRIVE}/Program Files/CMake"`
  182. elif [ "x${SystemDrive}" != "x" ]; then
  183. cmake_default_prefix=`cmake_fix_slashes "${SystemDrive}/Program Files/CMake"`
  184. else
  185. cmake_default_prefix="c:/Program Files/CMake"
  186. fi
  187. elif ${cmake_system_haiku}; then
  188. cmake_default_prefix=`finddir B_COMMON_DIRECTORY`
  189. else
  190. cmake_default_prefix="/usr/local"
  191. fi
  192. # Lookup default install destinations.
  193. cmake_data_dir_default="`cmake_install_dest_default DATA ${cmake_data_dir_keyword}`"
  194. cmake_doc_dir_default="`cmake_install_dest_default DOC ${cmake_doc_dir_keyword}`"
  195. cmake_man_dir_default="`cmake_install_dest_default MAN ${cmake_man_dir_keyword}`"
  196. cmake_xdgdata_dir_default="`cmake_install_dest_default XDGDATA ${cmake_xdgdata_dir_keyword}`"
  197. CMAKE_KNOWN_C_COMPILERS="cc gcc xlc icc tcc"
  198. CMAKE_KNOWN_CXX_COMPILERS="aCC xlC CC g++ c++ icc como "
  199. CMAKE_KNOWN_MAKE_PROCESSORS="gmake make"
  200. CMAKE_PROBLEMATIC_FILES="\
  201. CMakeCache.txt \
  202. CMakeSystem.cmake \
  203. CMakeCCompiler.cmake \
  204. CMakeCXXCompiler.cmake \
  205. */CMakeSystem.cmake \
  206. */CMakeCCompiler.cmake \
  207. */CMakeCXXCompiler.cmake \
  208. Source/cmConfigure.h \
  209. Source/CTest/Curl/config.h \
  210. Utilities/cmexpat/expatConfig.h \
  211. Utilities/cmexpat/expatDllConfig.h \
  212. "
  213. CMAKE_UNUSED_SOURCES="\
  214. cmGlobalXCodeGenerator \
  215. cmLocalXCodeGenerator \
  216. cmXCodeObject \
  217. cmXCode21Object \
  218. cmSourceGroup \
  219. "
  220. CMAKE_CXX_SOURCES="\
  221. cmake \
  222. cmakemain \
  223. cmcmd \
  224. cmCommandArgumentLexer \
  225. cmCommandArgumentParser \
  226. cmCommandArgumentParserHelper \
  227. cmCommonTargetGenerator \
  228. cmCPackPropertiesGenerator \
  229. cmDefinitions \
  230. cmDepends \
  231. cmDependsC \
  232. cmDocumentationFormatter \
  233. cmPolicies \
  234. cmProperty \
  235. cmPropertyMap \
  236. cmPropertyDefinition \
  237. cmPropertyDefinitionMap \
  238. cmMakefile \
  239. cmExportBuildFileGenerator \
  240. cmExportFileGenerator \
  241. cmExportInstallFileGenerator \
  242. cmExportTryCompileFileGenerator \
  243. cmExportSet \
  244. cmExportSetMap \
  245. cmExternalMakefileProjectGenerator \
  246. cmGeneratorExpressionEvaluationFile \
  247. cmGeneratedFileStream \
  248. cmGeneratorTarget \
  249. cmGeneratorExpressionContext \
  250. cmGeneratorExpressionDAGChecker \
  251. cmGeneratorExpressionEvaluator \
  252. cmGeneratorExpressionLexer \
  253. cmGeneratorExpressionNode \
  254. cmGeneratorExpressionParser \
  255. cmGeneratorExpression \
  256. cmGlobalCommonGenerator \
  257. cmGlobalGenerator \
  258. cmInstallDirectoryGenerator \
  259. cmLocalCommonGenerator \
  260. cmLocalGenerator \
  261. cmInstalledFile \
  262. cmInstallGenerator \
  263. cmInstallExportGenerator \
  264. cmInstallFilesGenerator \
  265. cmInstallScriptGenerator \
  266. cmInstallTargetGenerator \
  267. cmScriptGenerator \
  268. cmSourceFile \
  269. cmSourceFileLocation \
  270. cmState \
  271. cmSystemTools \
  272. cmTestGenerator \
  273. cmVersion \
  274. cmFileTimeComparison \
  275. cmGlobalUnixMakefileGenerator3 \
  276. cmLocalUnixMakefileGenerator3 \
  277. cmMakefileExecutableTargetGenerator \
  278. cmMakefileLibraryTargetGenerator \
  279. cmMakefileTargetGenerator \
  280. cmMakefileUtilityTargetGenerator \
  281. cmOutputConverter \
  282. cmOSXBundleGenerator \
  283. cmNewLineStyle \
  284. cmBootstrapCommands1 \
  285. cmBootstrapCommands2 \
  286. cmCommandsForBootstrap \
  287. cmTarget \
  288. cmTest \
  289. cmCustomCommand \
  290. cmCustomCommandGenerator \
  291. cmCacheManager \
  292. cmListFileCache \
  293. cmComputeLinkDepends \
  294. cmComputeLinkInformation \
  295. cmOrderDirectories \
  296. cmComputeTargetDepends \
  297. cmComputeComponentGraph \
  298. cmExprLexer \
  299. cmExprParser \
  300. cmExprParserHelper \
  301. "
  302. if ${cmake_system_mingw}; then
  303. CMAKE_CXX_SOURCES="${CMAKE_CXX_SOURCES}\
  304. cmGlobalMSYSMakefileGenerator \
  305. cmGlobalMinGWMakefileGenerator"
  306. fi
  307. CMAKE_C_SOURCES="\
  308. cmListFileLexer \
  309. "
  310. if ${cmake_system_mingw}; then
  311. KWSYS_C_SOURCES="\
  312. EncodingC \
  313. ProcessWin32 \
  314. String \
  315. System \
  316. Terminal"
  317. else
  318. KWSYS_C_SOURCES="\
  319. EncodingC \
  320. ProcessUNIX \
  321. String \
  322. System \
  323. Terminal"
  324. fi
  325. KWSYS_CXX_SOURCES="\
  326. Directory \
  327. EncodingCXX \
  328. FStream \
  329. Glob \
  330. RegularExpression \
  331. SystemTools"
  332. KWSYS_FILES="\
  333. auto_ptr.hxx \
  334. Directory.hxx \
  335. Encoding.h \
  336. Encoding.hxx \
  337. FStream.hxx \
  338. Glob.hxx \
  339. Process.h \
  340. RegularExpression.hxx \
  341. String.h \
  342. String.hxx \
  343. System.h \
  344. SystemTools.hxx \
  345. Terminal.h"
  346. # Display CMake bootstrap usage
  347. cmake_usage()
  348. {
  349. echo '
  350. Usage: '"$0"' [<options>...] [-- <cmake-options>...]
  351. Options: [defaults in brackets after descriptions]
  352. Configuration:
  353. --help print this message
  354. --version only print version information
  355. --verbose display more information
  356. --parallel=n bootstrap cmake in parallel, where n is
  357. number of nodes [1]
  358. --enable-ccache Enable ccache when building cmake
  359. --init=FILE load FILE as script to populate cache
  360. --system-libs use all system-installed third-party libraries
  361. (for use only by package maintainers)
  362. --no-system-libs use all cmake-provided third-party libraries
  363. (default)
  364. --system-curl use system-installed curl library
  365. --no-system-curl use cmake-provided curl library (default)
  366. --system-expat use system-installed expat library
  367. --no-system-expat use cmake-provided expat library (default)
  368. --system-jsoncpp use system-installed jsoncpp library
  369. --no-system-jsoncpp use cmake-provided jsoncpp library (default)
  370. --system-zlib use system-installed zlib library
  371. --no-system-zlib use cmake-provided zlib library (default)
  372. --system-bzip2 use system-installed bzip2 library
  373. --no-system-bzip2 use cmake-provided bzip2 library (default)
  374. --system-libarchive use system-installed libarchive library
  375. --no-system-libarchive use cmake-provided libarchive library (default)
  376. --qt-gui build the Qt-based GUI (requires Qt >= 4.2)
  377. --no-qt-gui do not build the Qt-based GUI (default)
  378. --qt-qmake=<qmake> use <qmake> as the qmake executable to find Qt
  379. --sphinx-man build man pages with Sphinx
  380. --sphinx-html build html help with Sphinx
  381. --sphinx-qthelp build qch help with Sphinx
  382. --sphinx-build=<sb> use <sb> as the sphinx-build executable
  383. --sphinx-flags=<flags> pass <flags> to sphinx-build executable
  384. Directory and file names:
  385. --prefix=PREFIX install files in tree rooted at PREFIX
  386. ['"${cmake_default_prefix}"']
  387. --datadir=DIR install data files in PREFIX/DIR
  388. ['"${cmake_data_dir_default}"']
  389. --docdir=DIR install documentation files in PREFIX/DIR
  390. ['"${cmake_doc_dir_default}"']
  391. --mandir=DIR install man pages files in PREFIX/DIR/manN
  392. ['"${cmake_man_dir_default}"']
  393. --xdgdatadir=DIR install XDG specific files in PREFIX/DIR
  394. ['"${cmake_xdgdata_dir_default}"']
  395. '
  396. exit 10
  397. }
  398. # Display CMake bootstrap usage
  399. cmake_version_display()
  400. {
  401. echo "CMake ${cmake_version}, ${cmake_copyright}"
  402. }
  403. # Display CMake bootstrap error, display the log file and exit
  404. cmake_error()
  405. {
  406. res=$1
  407. shift 1
  408. echo "---------------------------------------------"
  409. echo "Error when bootstrapping CMake:"
  410. echo "$*"
  411. echo "---------------------------------------------"
  412. if [ -f cmake_bootstrap.log ]; then
  413. echo "Log of errors: `pwd`/cmake_bootstrap.log"
  414. #cat cmake_bootstrap.log
  415. echo "---------------------------------------------"
  416. fi
  417. exit ${res}
  418. }
  419. cmake_generate_file ()
  420. {
  421. OUTFILE="$1"
  422. CONTENT="$2"
  423. echo "$CONTENT" > "$OUTFILE.tmp"
  424. if "${_diff}" "$OUTFILE.tmp" "$OUTFILE" > /dev/null 2> /dev/null ; then
  425. rm -f "$OUTFILE.tmp"
  426. else
  427. mv -f "$OUTFILE.tmp" "$OUTFILE"
  428. fi
  429. }
  430. # Replace KWSYS_NAMESPACE with cmsys
  431. cmake_replace_string ()
  432. {
  433. INFILE="$1"
  434. OUTFILE="$2"
  435. SEARCHFOR="$3"
  436. REPLACEWITH="$4"
  437. if [ -f "${INFILE}" ] || ${cmake_system_openvms}; then
  438. cat "${INFILE}" |
  439. sed "s/\@${SEARCHFOR}\@/${REPLACEWITH}/g" > "${OUTFILE}${_tmp}"
  440. if [ -f "${OUTFILE}${_tmp}" ]; then
  441. if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null ; then
  442. #echo "Files are the same"
  443. rm -f "${OUTFILE}${_tmp}"
  444. else
  445. mv -f "${OUTFILE}${_tmp}" "${OUTFILE}"
  446. fi
  447. fi
  448. else
  449. cmake_error 1 "Cannot find file ${INFILE}"
  450. fi
  451. }
  452. cmake_kwsys_config_replace_string ()
  453. {
  454. INFILE="$1"
  455. OUTFILE="$2"
  456. shift 2
  457. APPEND="$*"
  458. if [ -f "${INFILE}" ] || ${cmake_system_openvms}; then
  459. echo "${APPEND}" > "${OUTFILE}${_tmp}"
  460. cat "${INFILE}" |
  461. sed "/./ {s/\@KWSYS_NAMESPACE\@/cmsys/g;
  462. s/@KWSYS_BUILD_SHARED@/${KWSYS_BUILD_SHARED}/g;
  463. s/@KWSYS_LFS_AVAILABLE@/${KWSYS_LFS_AVAILABLE}/g;
  464. s/@KWSYS_LFS_REQUESTED@/${KWSYS_LFS_REQUESTED}/g;
  465. s/@KWSYS_NAME_IS_KWSYS@/${KWSYS_NAME_IS_KWSYS}/g;
  466. s/@KWSYS_STL_HAS_WSTRING@/${KWSYS_STL_HAS_WSTRING}/g;
  467. }" >> "${OUTFILE}${_tmp}"
  468. if [ -f "${OUTFILE}${_tmp}" ]; then
  469. if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null ; then
  470. #echo "Files are the same"
  471. rm -f "${OUTFILE}${_tmp}"
  472. else
  473. mv -f "${OUTFILE}${_tmp}" "${OUTFILE}"
  474. fi
  475. fi
  476. else
  477. cmake_error 2 "Cannot find file ${INFILE}"
  478. fi
  479. }
  480. # Write string into a file
  481. cmake_report ()
  482. {
  483. FILE=$1
  484. shift
  485. echo "$*" >> ${FILE}
  486. }
  487. # Escape spaces in strings
  488. cmake_escape ()
  489. {
  490. echo $1 | sed "s/ /\\\\ /g"
  491. }
  492. # Strip prefix from argument
  493. cmake_arg ()
  494. {
  495. echo "$1" | sed "s/^${2-[^=]*=}//"
  496. }
  497. # Write message to the log
  498. cmake_log ()
  499. {
  500. echo "$*" >> cmake_bootstrap.log
  501. }
  502. # Return temp file
  503. cmake_tmp_file ()
  504. {
  505. echo "cmake_bootstrap_$$_test"
  506. }
  507. # Run a compiler test. First argument is compiler, second one are compiler
  508. # flags, third one is test source file to be compiled
  509. cmake_try_run ()
  510. {
  511. COMPILER=$1
  512. FLAGS=$2
  513. TESTFILE=$3
  514. if [ ! -f "${TESTFILE}" ]; then
  515. echo "Test file ${TESTFILE} missing. Please verify your CMake source tree."
  516. exit 4
  517. fi
  518. TMPFILE=`cmake_tmp_file`
  519. echo "Try: ${COMPILER}"
  520. echo "Line: ${COMPILER} ${FLAGS} ${TESTFILE} -o ${TMPFILE}"
  521. echo "---------- file -----------------------"
  522. cat "${TESTFILE}"
  523. echo "------------------------------------------"
  524. "${COMPILER}" ${FLAGS} "${TESTFILE}" -o "${TMPFILE}"
  525. RES=$?
  526. if [ "${RES}" -ne "0" ]; then
  527. echo "Test failed to compile"
  528. return 1
  529. fi
  530. if [ ! -f "${TMPFILE}" ] && [ ! -f "${TMPFILE}.exe" ]; then
  531. echo "Test failed to produce executable"
  532. return 2
  533. fi
  534. ./${TMPFILE}
  535. RES=$?
  536. rm -f "${TMPFILE}"
  537. if [ "${RES}" -ne "0" ]; then
  538. echo "Test produced non-zero return code"
  539. return 3
  540. fi
  541. echo "Test succeeded"
  542. return 0
  543. }
  544. # Run a make test. First argument is the make interpreter.
  545. cmake_try_make ()
  546. {
  547. MAKE_PROC="$1"
  548. MAKE_FLAGS="$2"
  549. echo "Try: ${MAKE_PROC}"
  550. "${MAKE_PROC}" ${MAKE_FLAGS}
  551. RES=$?
  552. if [ "${RES}" -ne "0" ]; then
  553. echo "${MAKE_PROC} does not work"
  554. return 1
  555. fi
  556. if [ ! -f "test" ] && [ ! -f "test.exe" ]; then
  557. echo "${COMPILER} does not produce output"
  558. return 2
  559. fi
  560. ./test
  561. RES=$?
  562. rm -f "test"
  563. if [ "${RES}" -ne "0" ]; then
  564. echo "${MAKE_PROC} produces strange executable"
  565. return 3
  566. fi
  567. echo "${MAKE_PROC} works"
  568. return 0
  569. }
  570. # Parse arguments
  571. cmake_verbose=
  572. cmake_parallel_make=
  573. cmake_ccache_enabled=
  574. cmake_prefix_dir="${cmake_default_prefix}"
  575. while test $# != 0; do
  576. case "$1" in
  577. --prefix=*) dir=`cmake_arg "$1"`
  578. cmake_prefix_dir=`cmake_fix_slashes "$dir"` ;;
  579. --parallel=*) cmake_parallel_make=`cmake_arg "$1"` ;;
  580. --datadir=*) cmake_data_dir=`cmake_arg "$1"` ;;
  581. --docdir=*) cmake_doc_dir=`cmake_arg "$1"` ;;
  582. --mandir=*) cmake_man_dir=`cmake_arg "$1"` ;;
  583. --xdgdatadir=*) cmake_xdgdata_dir=`cmake_arg "$1"` ;;
  584. --init=*) cmake_init_file=`cmake_arg "$1"` ;;
  585. --system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;;
  586. --no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;;
  587. --system-bzip2|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-zlib)
  588. lib=`cmake_arg "$1" "--system-"`
  589. cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=1" ;;
  590. --no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-jsoncpp|--no-system-libarchive|--no-system-zlib)
  591. lib=`cmake_arg "$1" "--no-system-"`
  592. cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=0" ;;
  593. --qt-gui) cmake_bootstrap_qt_gui="1" ;;
  594. --no-qt-gui) cmake_bootstrap_qt_gui="0" ;;
  595. --qt-qmake=*) cmake_bootstrap_qt_qmake=`cmake_arg "$1"` ;;
  596. --sphinx-man) cmake_sphinx_man="1" ;;
  597. --sphinx-html) cmake_sphinx_html="1" ;;
  598. --sphinx-qthelp) cmake_sphinx_qthelp="1" ;;
  599. --sphinx-build=*) cmake_sphinx_build=`cmake_arg "$1"` ;;
  600. --sphinx-flags=*) cmake_sphinx_flags=`cmake_arg "$1"` ;;
  601. --help) cmake_usage ;;
  602. --version) cmake_version_display ; exit 2 ;;
  603. --verbose) cmake_verbose=TRUE ;;
  604. --enable-ccache) cmake_ccache_enabled=TRUE ;;
  605. --) shift; break ;;
  606. *) die "Unknown option: $1" ;;
  607. esac
  608. shift
  609. done
  610. # If verbose, display some information about bootstrap
  611. if [ -n "${cmake_verbose}" ]; then
  612. echo "---------------------------------------------"
  613. echo "Source directory: ${cmake_source_dir}"
  614. echo "Binary directory: ${cmake_binary_dir}"
  615. echo "Prefix directory: ${cmake_prefix_dir}"
  616. echo "System: ${cmake_system}"
  617. if [ "x${cmake_parallel_make}" != "x" ]; then
  618. echo "Doing parallel make: ${cmake_parallel_make}"
  619. fi
  620. echo ""
  621. fi
  622. echo "---------------------------------------------"
  623. # Get CMake version
  624. echo "`cmake_version_display`"
  625. # Check for in-source build
  626. cmake_in_source_build=
  627. if [ -f "${cmake_binary_dir}/Source/cmake.cxx" -a \
  628. -f "${cmake_binary_dir}/Source/cmake.h" ]; then
  629. if [ -n "${cmake_verbose}" ]; then
  630. echo "Warning: This is an in-source build"
  631. fi
  632. cmake_in_source_build=TRUE
  633. fi
  634. # If this is not an in-source build, then Bootstrap stuff should not exist.
  635. if [ -z "${cmake_in_source_build}" ]; then
  636. # Did somebody bootstrap in the source tree?
  637. if [ -d "${cmake_source_dir}/Bootstrap${_cmk}" ]; then
  638. cmake_error 10 "Found directory \"${cmake_source_dir}/Bootstrap${_cmk}\".
  639. Looks like somebody did bootstrap CMake in the source tree, but now you are
  640. trying to do bootstrap in the binary tree. Please remove Bootstrap${_cmk}
  641. directory from the source tree."
  642. fi
  643. # Is there a cache in the source tree?
  644. for cmake_problematic_file in ${CMAKE_PROBLEMATIC_FILES}; do
  645. if [ -f "${cmake_source_dir}/${cmake_problematic_file}" ]; then
  646. cmake_error 10 "Found \"${cmake_source_dir}/${cmake_problematic_file}\".
  647. Looks like somebody tried to build CMake in the source tree, but now you are
  648. trying to do bootstrap in the binary tree. Please remove \"${cmake_problematic_file}\"
  649. from the source tree."
  650. fi
  651. done
  652. fi
  653. # Make bootstrap directory
  654. [ -d "${cmake_bootstrap_dir}" ] || mkdir "${cmake_bootstrap_dir}"
  655. if [ ! -d "${cmake_bootstrap_dir}" ]; then
  656. cmake_error 3 "Cannot create directory ${cmake_bootstrap_dir} to bootstrap CMake."
  657. fi
  658. cd "${cmake_bootstrap_dir}"
  659. [ -d "cmsys" ] || mkdir "cmsys"
  660. if [ ! -d "cmsys" ]; then
  661. cmake_error 4 "Cannot create directory ${cmake_bootstrap_dir}/cmsys"
  662. fi
  663. # Delete all the bootstrap files
  664. rm -f "${cmake_bootstrap_dir}/cmake_bootstrap.log"
  665. rm -f "${cmake_bootstrap_dir}/cmConfigure.h${_tmp}"
  666. rm -f "${cmake_bootstrap_dir}/cmVersionConfig.h${_tmp}"
  667. # If exist compiler flags, set them
  668. cmake_c_flags=${CFLAGS}
  669. cmake_cxx_flags=${CXXFLAGS}
  670. cmake_ld_flags=${LDFLAGS}
  671. # Add Cygwin-specific flags
  672. if ${cmake_system_cygwin}; then
  673. cmake_ld_flags="${LDFLAGS} -Wl,--enable-auto-import"
  674. fi
  675. # Add CoreFoundation framework on Darwin
  676. if ${cmake_system_darwin}; then
  677. cmake_ld_flags="${LDFLAGS} -framework CoreFoundation"
  678. fi
  679. # Add BeOS toolkits...
  680. if ${cmake_system_beos}; then
  681. cmake_ld_flags="${LDFLAGS} -lroot -lbe"
  682. fi
  683. # Add Haiku toolkits...
  684. if ${cmake_system_haiku}; then
  685. cmake_ld_flags="${LDFLAGS} -lroot -lbe"
  686. fi
  687. # Workaround for short jump tables on PA-RISC
  688. if ${cmake_machine_parisc}; then
  689. if ${cmake_c_compiler_is_gnu}; then
  690. cmake_c_flags="${CFLAGS} -mlong-calls"
  691. fi
  692. if ${cmake_cxx_compiler_is_gnu}; then
  693. cmake_cxx_flags="${CXXFLAGS} -mlong-calls"
  694. fi
  695. fi
  696. #-----------------------------------------------------------------------------
  697. # Detect known toolchains on some platforms.
  698. cmake_toolchains=''
  699. case "${cmake_system}" in
  700. *AIX*) cmake_toolchains='XL GNU' ;;
  701. *CYGWIN*) cmake_toolchains='GNU' ;;
  702. *Darwin*) cmake_toolchains='GNU Clang' ;;
  703. *Linux*) cmake_toolchains='GNU Clang XL PGI PathScale' ;;
  704. *MINGW*) cmake_toolchains='GNU' ;;
  705. esac
  706. # Toolchain compiler name table.
  707. cmake_toolchain_Clang_CC='clang'
  708. cmake_toolchain_Clang_CXX='clang++'
  709. cmake_toolchain_GNU_CC='gcc'
  710. cmake_toolchain_GNU_CXX='g++'
  711. cmake_toolchain_PGI_CC='pgcc'
  712. cmake_toolchain_PGI_CXX='pgCC'
  713. cmake_toolchain_PathScale_CC='pathcc'
  714. cmake_toolchain_PathScale_CXX='pathCC'
  715. cmake_toolchain_XL_CC='xlc'
  716. cmake_toolchain_XL_CXX='xlC'
  717. cmake_toolchain_try()
  718. {
  719. tc="$1"
  720. TMPFILE=`cmake_tmp_file`
  721. eval "tc_CC=\${cmake_toolchain_${tc}_CC}"
  722. echo 'int main() { return 0; }' > "${TMPFILE}.c"
  723. cmake_try_run "$tc_CC" "" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1
  724. tc_result_CC="$?"
  725. rm -f "${TMPFILE}.c"
  726. test "${tc_result_CC}" = "0" || return 1
  727. eval "tc_CXX=\${cmake_toolchain_${tc}_CXX}"
  728. echo 'int main() { return 0; }' > "${TMPFILE}.cpp"
  729. cmake_try_run "$tc_CXX" "" "${TMPFILE}.cpp" >> cmake_bootstrap.log 2>&1
  730. tc_result_CXX="$?"
  731. rm -f "${TMPFILE}.cpp"
  732. test "${tc_result_CXX}" = "0" || return 1
  733. cmake_toolchain="$tc"
  734. }
  735. cmake_toolchain_detect()
  736. {
  737. cmake_toolchain=
  738. for tc in ${cmake_toolchains}; do
  739. echo "Checking for $tc toolchain" >> cmake_bootstrap.log 2>&1
  740. cmake_toolchain_try "$tc" &&
  741. echo "Found $tc toolchain" &&
  742. break
  743. done
  744. }
  745. if [ -z "${CC}" -a -z "${CXX}" ]; then
  746. cmake_toolchain_detect
  747. fi
  748. #-----------------------------------------------------------------------------
  749. # Test C compiler
  750. cmake_c_compiler=
  751. # If CC is set, use that for compiler, otherwise use list of known compilers
  752. if [ -n "${cmake_toolchain}" ]; then
  753. eval cmake_c_compilers="\${cmake_toolchain_${cmake_toolchain}_CC}"
  754. elif [ -n "${CC}" ]; then
  755. cmake_c_compilers="${CC}"
  756. else
  757. cmake_c_compilers="${CMAKE_KNOWN_C_COMPILERS}"
  758. fi
  759. # Check if C compiler works
  760. TMPFILE=`cmake_tmp_file`
  761. echo '
  762. #ifdef __cplusplus
  763. # error "The CMAKE_C_COMPILER is set to a C++ compiler"
  764. #endif
  765. #include<stdio.h>
  766. #if defined(__CLASSIC_C__)
  767. int main(argc, argv)
  768. int argc;
  769. char* argv[];
  770. #else
  771. int main(int argc, char* argv[])
  772. #endif
  773. {
  774. printf("%d%c", (argv != 0), (char)0x0a);
  775. return argc-1;
  776. }
  777. ' > "${TMPFILE}.c"
  778. for a in ${cmake_c_compilers}; do
  779. if [ -z "${cmake_c_compiler}" ] && \
  780. cmake_try_run "${a}" "${cmake_c_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
  781. cmake_c_compiler="${a}"
  782. fi
  783. done
  784. rm -f "${TMPFILE}.c"
  785. if [ -z "${cmake_c_compiler}" ]; then
  786. cmake_error 6 "Cannot find appropriate C compiler on this system.
  787. Please specify one using environment variable CC.
  788. See cmake_bootstrap.log for compilers attempted.
  789. "
  790. fi
  791. echo "C compiler on this system is: ${cmake_c_compiler} ${cmake_c_flags}"
  792. #-----------------------------------------------------------------------------
  793. # Test CXX compiler
  794. cmake_cxx_compiler=
  795. # On Mac OSX, CC is the same as cc, so make sure not to try CC as c++ compiler.
  796. # If CC is set, use that for compiler, otherwise use list of known compilers
  797. if [ -n "${cmake_toolchain}" ]; then
  798. eval cmake_cxx_compilers="\${cmake_toolchain_${cmake_toolchain}_CXX}"
  799. elif [ -n "${CXX}" ]; then
  800. cmake_cxx_compilers="${CXX}"
  801. else
  802. cmake_cxx_compilers="${CMAKE_KNOWN_CXX_COMPILERS}"
  803. fi
  804. # Check if C++ compiler works
  805. TMPFILE=`cmake_tmp_file`
  806. echo '
  807. #if defined(TEST1)
  808. # include <iostream>
  809. #else
  810. # include <iostream.h>
  811. #endif
  812. class NeedCXX
  813. {
  814. public:
  815. NeedCXX() { this->Foo = 1; }
  816. int GetFoo() { return this->Foo; }
  817. private:
  818. int Foo;
  819. };
  820. int main()
  821. {
  822. NeedCXX c;
  823. #ifdef TEST3
  824. cout << c.GetFoo() << endl;
  825. #else
  826. std::cout << c.GetFoo() << std::endl;
  827. #endif
  828. return 0;
  829. }
  830. ' > "${TMPFILE}.cxx"
  831. for a in ${cmake_cxx_compilers}; do
  832. for b in 1 2 3; do
  833. if [ -z "${cmake_cxx_compiler}" ] && \
  834. cmake_try_run "${a}" "${cmake_cxx_flags} -DTEST${b}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  835. cmake_cxx_compiler="${a}"
  836. fi
  837. done
  838. done
  839. rm -f "${TMPFILE}.cxx"
  840. if [ -z "${cmake_cxx_compiler}" ]; then
  841. cmake_error 7 "Cannot find appropriate C++ compiler on this system.
  842. Please specify one using environment variable CXX.
  843. See cmake_bootstrap.log for compilers attempted."
  844. fi
  845. echo "C++ compiler on this system is: ${cmake_cxx_compiler} ${cmake_cxx_flags}"
  846. #-----------------------------------------------------------------------------
  847. # Test Make
  848. cmake_make_processor=
  849. cmake_make_flags=
  850. # If MAKE is set, use that for make processor, otherwise use list of known make
  851. if [ -n "${MAKE}" ]; then
  852. cmake_make_processors="${MAKE}"
  853. else
  854. cmake_make_processors="${CMAKE_KNOWN_MAKE_PROCESSORS}"
  855. fi
  856. TMPFILE="`cmake_tmp_file`_dir"
  857. rm -rf "${cmake_bootstrap_dir}/${TMPFILE}"
  858. mkdir "${cmake_bootstrap_dir}/${TMPFILE}"
  859. cd "${cmake_bootstrap_dir}/${TMPFILE}"
  860. echo '
  861. test: test.c
  862. "'"${cmake_c_compiler}"'" '"${cmake_ld_flags} ${cmake_c_flags}"' -o test test.c
  863. '>"Makefile"
  864. echo '
  865. #include <stdio.h>
  866. int main(){ printf("1%c", (char)0x0a); return 0; }
  867. ' > "test.c"
  868. cmake_original_make_flags="${cmake_make_flags}"
  869. if [ "x${cmake_parallel_make}" != "x" ]; then
  870. cmake_make_flags="${cmake_make_flags} -j ${cmake_parallel_make}"
  871. fi
  872. for a in ${cmake_make_processors}; do
  873. if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then
  874. cmake_make_processor="${a}"
  875. fi
  876. done
  877. cmake_full_make_flags="${cmake_make_flags}"
  878. if [ "x${cmake_original_make_flags}" != "x${cmake_make_flags}" ]; then
  879. if [ -z "${cmake_make_processor}" ]; then
  880. cmake_make_flags="${cmake_original_make_flags}"
  881. for a in ${cmake_make_processors}; do
  882. if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then
  883. cmake_make_processor="${a}"
  884. fi
  885. done
  886. fi
  887. fi
  888. cd "${cmake_bootstrap_dir}"
  889. if [ -z "${cmake_make_processor}" ]; then
  890. cmake_error 8 "Cannot find appropriate Makefile processor on this system.
  891. Please specify one using environment variable MAKE."
  892. fi
  893. rm -rf "${cmake_bootstrap_dir}/${TMPFILE}"
  894. echo "Makefile processor on this system is: ${cmake_make_processor}"
  895. if [ "x${cmake_full_make_flags}" != "x${cmake_make_flags}" ]; then
  896. echo "---------------------------------------------"
  897. echo "Makefile processor ${cmake_make_processor} does not support parallel build"
  898. echo "---------------------------------------------"
  899. fi
  900. # Ok, we have CC, CXX, and MAKE.
  901. # Test C++ compiler features
  902. # Are we GCC?
  903. TMPFILE=`cmake_tmp_file`
  904. echo '
  905. #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
  906. #include <iostream>
  907. int main() { std::cout << "This is GNU" << std::endl; return 0;}
  908. #endif
  909. ' > ${TMPFILE}.cxx
  910. cmake_cxx_compiler_is_gnu=0
  911. if cmake_try_run "${cmake_cxx_compiler}" \
  912. "${cmake_cxx_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  913. cmake_cxx_compiler_is_gnu=1
  914. fi
  915. if [ "x${cmake_cxx_compiler_is_gnu}" = "x1" ]; then
  916. echo "${cmake_cxx_compiler} is GNU compiler"
  917. else
  918. echo "${cmake_cxx_compiler} is not GNU compiler"
  919. fi
  920. rm -f "${TMPFILE}.cxx"
  921. if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then
  922. # Check for non-GNU compiler flags
  923. # If we are on IRIX, check for -LANG:std
  924. cmake_test_flags="-LANG:std"
  925. if [ "x${cmake_system}" = "xIRIX64" ]; then
  926. TMPFILE=`cmake_tmp_file`
  927. echo '
  928. #include <iostream>
  929. int main() { std::cout << "No need for '"${cmake_test_flags}"'" << std::endl; return 0;}
  930. ' > ${TMPFILE}.cxx
  931. cmake_need_lang_std=0
  932. if cmake_try_run "${cmake_cxx_compiler}" \
  933. "${cmake_cxx_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  934. :
  935. else
  936. if cmake_try_run "${cmake_cxx_compiler}" \
  937. "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  938. cmake_need_lang_std=1
  939. fi
  940. fi
  941. if [ "x${cmake_need_lang_std}" = "x1" ]; then
  942. cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
  943. echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
  944. else
  945. echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
  946. fi
  947. rm -f "${TMPFILE}.cxx"
  948. fi
  949. cmake_test_flags=
  950. # If we are on OSF, check for -timplicit_local -no_implicit_include
  951. cmake_test_flags="-timplicit_local -no_implicit_include"
  952. if [ "x${cmake_system}" = "xOSF1" ]; then
  953. TMPFILE=`cmake_tmp_file`
  954. echo '
  955. #include <iostream>
  956. int main() { std::cout << "We need '"${cmake_test_flags}"'" << std::endl; return 0;}
  957. ' > ${TMPFILE}.cxx
  958. cmake_need_flags=1
  959. if cmake_try_run "${cmake_cxx_compiler}" \
  960. "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  961. :
  962. else
  963. cmake_need_flags=0
  964. fi
  965. if [ "x${cmake_need_flags}" = "x1" ]; then
  966. cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
  967. echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
  968. else
  969. echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
  970. fi
  971. rm -f "${TMPFILE}.cxx"
  972. fi
  973. cmake_test_flags=
  974. # If we are on OSF, check for -std strict_ansi -nopure_cname
  975. cmake_test_flags="-std strict_ansi -nopure_cname"
  976. if [ "x${cmake_system}" = "xOSF1" ]; then
  977. TMPFILE=`cmake_tmp_file`
  978. echo '
  979. #include <iostream>
  980. int main() { std::cout << "We need '"${cmake_test_flags}"'" << std::endl; return 0;}
  981. ' > ${TMPFILE}.cxx
  982. cmake_need_flags=1
  983. if cmake_try_run "${cmake_cxx_compiler}" \
  984. "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  985. :
  986. else
  987. cmake_need_flags=0
  988. fi
  989. if [ "x${cmake_need_flags}" = "x1" ]; then
  990. cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
  991. echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
  992. else
  993. echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
  994. fi
  995. rm -f "${TMPFILE}.cxx"
  996. fi
  997. cmake_test_flags=
  998. # If we are on HP-UX, check for -Ae for the C compiler.
  999. if [ "x${cmake_system}" = "xHP-UX" ]; then
  1000. cmake_test_flags="-Ae"
  1001. TMPFILE=`cmake_tmp_file`
  1002. echo '
  1003. int main(int argc, char** argv) { (void)argc; (void)argv; return 0; }
  1004. ' > ${TMPFILE}.c
  1005. cmake_need_Ae=0
  1006. if cmake_try_run "${cmake_c_compiler}" "${cmake_c_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
  1007. :
  1008. else
  1009. if cmake_try_run "${cmake_c_compiler}" \
  1010. "${cmake_c_flags} ${cmake_test_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
  1011. cmake_need_Ae=1
  1012. fi
  1013. fi
  1014. if [ "x${cmake_need_Ae}" = "x1" ]; then
  1015. cmake_c_flags="${cmake_c_flags} ${cmake_test_flags}"
  1016. echo "${cmake_c_compiler} needs ${cmake_test_flags}"
  1017. else
  1018. echo "${cmake_c_compiler} does not need ${cmake_test_flags}"
  1019. fi
  1020. rm -f "${TMPFILE}.c"
  1021. echo '
  1022. #include <iostream>
  1023. int main(int argc, char** argv) {
  1024. for(int i=0; i < 1; ++i);
  1025. for(int i=0; i < 1; ++i);
  1026. (void)argc; (void)argv; return 0; }
  1027. ' > ${TMPFILE}.cxx
  1028. cmake_need_AAstd98=0
  1029. cmake_test_flags="-AA +hpxstd98"
  1030. if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  1031. :
  1032. else
  1033. if cmake_try_run "${cmake_cxx_compiler}" \
  1034. "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  1035. cmake_need_AAstd98=1
  1036. fi
  1037. fi
  1038. if [ "x${cmake_need_AAstd98}" = "x1" ]; then
  1039. cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
  1040. echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
  1041. else
  1042. echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
  1043. fi
  1044. fi
  1045. cmake_test_flags=
  1046. fi
  1047. if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then
  1048. # Are we SolarisStudio?
  1049. TMPFILE=`cmake_tmp_file`
  1050. echo '
  1051. #if defined(__SUNPRO_CC)
  1052. #include <iostream>
  1053. int main() { std::cout << "This is SolarisStudio" << std::endl; return 0;}
  1054. #endif
  1055. ' > ${TMPFILE}.cxx
  1056. cmake_cxx_compiler_is_solarisstudio=0
  1057. if cmake_try_run "${cmake_cxx_compiler}" \
  1058. "${cmake_cxx_flags} " "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  1059. cmake_cxx_compiler_is_solarisstudio=1
  1060. fi
  1061. if [ "x${cmake_cxx_compiler_is_solarisstudio}" = "x1" ]; then
  1062. echo "${cmake_cxx_compiler} is SolarisStudio compiler"
  1063. else
  1064. echo "${cmake_cxx_compiler} is not SolarisStudio compiler"
  1065. fi
  1066. rm -f "${TMPFILE}.cxx"
  1067. if [ "x${cmake_cxx_compiler_is_solarisstudio}" = "x1" ]; then
  1068. cmake_cxx_flags="${cmake_cxx_flags} -library=stlport4"
  1069. fi
  1070. fi
  1071. # Test for kwsys features
  1072. KWSYS_NAME_IS_KWSYS=0
  1073. KWSYS_BUILD_SHARED=0
  1074. KWSYS_LFS_AVAILABLE=0
  1075. KWSYS_LFS_REQUESTED=0
  1076. KWSYS_STL_HAS_WSTRING=0
  1077. KWSYS_CXX_HAS_SETENV=0
  1078. KWSYS_CXX_HAS_UNSETENV=0
  1079. KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=0
  1080. KWSYS_CXX_HAS_UTIMENSAT=0
  1081. KWSYS_CXX_HAS_UTIMES=0
  1082. if cmake_try_run "${cmake_cxx_compiler}" \
  1083. "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_SETENV" \
  1084. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  1085. KWSYS_CXX_HAS_SETENV=1
  1086. echo "${cmake_cxx_compiler} has setenv"
  1087. else
  1088. echo "${cmake_cxx_compiler} does not have setenv"
  1089. fi
  1090. if cmake_try_run "${cmake_cxx_compiler}" \
  1091. "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_UNSETENV" \
  1092. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  1093. KWSYS_CXX_HAS_UNSETENV=1
  1094. echo "${cmake_cxx_compiler} has unsetenv"
  1095. else
  1096. echo "${cmake_cxx_compiler} does not have unsetenv"
  1097. fi
  1098. if cmake_try_run "${cmake_cxx_compiler}" \
  1099. "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H" \
  1100. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  1101. KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=1
  1102. echo "${cmake_cxx_compiler} has environ in stdlib.h"
  1103. else
  1104. echo "${cmake_cxx_compiler} does not have environ in stdlib.h"
  1105. fi
  1106. if cmake_try_run "${cmake_cxx_compiler}" \
  1107. "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_WSTRING" \
  1108. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  1109. KWSYS_STL_HAS_WSTRING=1
  1110. echo "${cmake_cxx_compiler} has stl wstring"
  1111. else
  1112. echo "${cmake_cxx_compiler} does not have stl wstring"
  1113. fi
  1114. # Just to be safe, let us store compiler and flags to the header file
  1115. cmake_bootstrap_version='$Revision$'
  1116. cmake_compiler_settings_comment="/*
  1117. * Generated by ${cmake_source_dir}/bootstrap
  1118. * Version: ${cmake_bootstrap_version}
  1119. *
  1120. * Source directory: ${cmake_source_dir}
  1121. * Binary directory: ${cmake_bootstrap_dir}
  1122. *
  1123. * C compiler: ${cmake_c_compiler}
  1124. * C flags: ${cmake_c_flags}
  1125. *
  1126. * C++ compiler: ${cmake_cxx_compiler}
  1127. * C++ flags: ${cmake_cxx_flags}
  1128. *
  1129. * Make: ${cmake_make_processor}
  1130. *
  1131. * Sources:
  1132. * ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES}
  1133. * kwSys Sources:
  1134. * ${KWSYS_CXX_SOURCES} ${KWSYS_C_SOURCES}
  1135. */
  1136. "
  1137. cmake_report cmConfigure.h${_tmp} "${cmake_compiler_settings_comment}"
  1138. # When bootstrapping on MinGW with MSYS we must convert the source
  1139. # directory to a windows path.
  1140. if ${cmake_system_mingw}; then
  1141. CMAKE_BOOTSTRAP_SOURCE_DIR=`cd "${cmake_source_dir}"; pwd -W`
  1142. CMAKE_BOOTSTRAP_BINARY_DIR=`cd "${cmake_binary_dir}"; pwd -W`
  1143. else
  1144. CMAKE_BOOTSTRAP_SOURCE_DIR="${cmake_source_dir}"
  1145. CMAKE_BOOTSTRAP_BINARY_DIR="${cmake_binary_dir}"
  1146. fi
  1147. # Write CMake version
  1148. cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_MAJOR ${cmake_version_major}"
  1149. cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_MINOR ${cmake_version_minor}"
  1150. cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_PATCH ${cmake_version_patch}"
  1151. cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION \"${cmake_version}\""
  1152. cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP_SOURCE_DIR \"${CMAKE_BOOTSTRAP_SOURCE_DIR}\""
  1153. cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP_BINARY_DIR \"${CMAKE_BOOTSTRAP_BINARY_DIR}\""
  1154. cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/bootstrap-not-insalled\""
  1155. cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP"
  1156. # Regenerate configured headers
  1157. for h in Configure VersionConfig; do
  1158. if "${_diff}" cm${h}.h cm${h}.h${_tmp} > /dev/null 2> /dev/null; then
  1159. rm -f cm${h}.h${_tmp}
  1160. else
  1161. mv -f cm${h}.h${_tmp} cm${h}.h
  1162. fi
  1163. done
  1164. # Prepare KWSYS
  1165. cmake_kwsys_config_replace_string \
  1166. "${cmake_source_dir}/Source/kwsys/Configure.hxx.in" \
  1167. "${cmake_bootstrap_dir}/cmsys/Configure.hxx" \
  1168. "${cmake_compiler_settings_comment}"
  1169. cmake_kwsys_config_replace_string \
  1170. "${cmake_source_dir}/Source/kwsys/Configure.h.in" \
  1171. "${cmake_bootstrap_dir}/cmsys/Configure.h" \
  1172. "${cmake_compiler_settings_comment}"
  1173. for a in ${KWSYS_FILES}; do
  1174. cmake_replace_string "${cmake_source_dir}/Source/kwsys/${a}.in" \
  1175. "${cmake_bootstrap_dir}/cmsys/${a}" KWSYS_NAMESPACE cmsys
  1176. done
  1177. cmake_generate_file "${cmake_bootstrap_dir}/cmThirdParty.h" ""
  1178. # Generate Makefile
  1179. dep="cmConfigure.h cmsys/*.hxx cmsys/*.h `cmake_escape \"${cmake_source_dir}\"`/Source/*.h"
  1180. objs=""
  1181. for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} ${KWSYS_CXX_SOURCES} ${KWSYS_C_SOURCES}; do
  1182. objs="${objs} ${a}.o"
  1183. done
  1184. # Generate dependencies for cmBootstrapCommands1.cxx
  1185. for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands1.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do
  1186. cmBootstrapCommands1Deps="${cmBootstrapCommands1Deps} `cmake_escape "${cmake_source_dir}/Source/$file"`"
  1187. done
  1188. cmBootstrapCommands1Deps=`echo $cmBootstrapCommands1Deps`
  1189. for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands2.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do
  1190. cmBootstrapCommands2Deps="${cmBootstrapCommands2Deps} `cmake_escape "${cmake_source_dir}/Source/$file"`"
  1191. done
  1192. cmBootstrapCommands2Deps=`echo $cmBootstrapCommands2Deps`
  1193. if [ "x${cmake_ansi_cxx_flags}" != "x" ]; then
  1194. cmake_cxx_flags="${cmake_ansi_cxx_flags} ${cmake_cxx_flags}"
  1195. fi
  1196. if [ "x${cmake_c_flags}" != "x" ]; then
  1197. cmake_c_flags="${cmake_c_flags} "
  1198. fi
  1199. if [ "x${cmake_cxx_flags}" != "x" ]; then
  1200. cmake_cxx_flags="${cmake_cxx_flags} "
  1201. fi
  1202. cmake_c_flags_String="-DKWSYS_STRING_C"
  1203. if ${cmake_system_mingw}; then
  1204. cmake_c_flags_EncodingC="-DKWSYS_ENCODING_DEFAULT_CODEPAGE=CP_ACP"
  1205. fi
  1206. cmake_cxx_flags_SystemTools="
  1207. -DKWSYS_CXX_HAS_SETENV=${KWSYS_CXX_HAS_SETENV}
  1208. -DKWSYS_CXX_HAS_UNSETENV=${KWSYS_CXX_HAS_UNSETENV}
  1209. -DKWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=${KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H}
  1210. -DKWSYS_CXX_HAS_UTIMENSAT=${KWSYS_CXX_HAS_UTIMENSAT}
  1211. -DKWSYS_CXX_HAS_UTIMES=${KWSYS_CXX_HAS_UTIMES}
  1212. "
  1213. cmake_c_flags="${cmake_c_flags}-I`cmake_escape \"${cmake_bootstrap_dir}\"` -I`cmake_escape \"${cmake_source_dir}/Source\"` \
  1214. -I`cmake_escape \"${cmake_source_dir}/Utilities\"`"
  1215. cmake_cxx_flags="${cmake_cxx_flags} -I`cmake_escape \"${cmake_bootstrap_dir}\"` -I`cmake_escape \"${cmake_source_dir}/Source\"` \
  1216. -I`cmake_escape \"${cmake_source_dir}/Utilities\"`"
  1217. echo "cmake: ${objs}" > "${cmake_bootstrap_dir}/Makefile"
  1218. echo " ${cmake_cxx_compiler} ${cmake_ld_flags} ${cmake_cxx_flags} ${objs} -o cmake" >> "${cmake_bootstrap_dir}/Makefile"
  1219. for a in ${CMAKE_CXX_SOURCES}; do
  1220. src=`cmake_escape "${cmake_source_dir}/Source/${a}.cxx"`
  1221. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1222. echo " ${cmake_cxx_compiler} ${cmake_cxx_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1223. done
  1224. echo "cmBootstrapCommands1.o : $cmBootstrapCommands1Deps" >> "${cmake_bootstrap_dir}/Makefile"
  1225. echo "cmBootstrapCommands2.o : $cmBootstrapCommands2Deps" >> "${cmake_bootstrap_dir}/Makefile"
  1226. for a in ${CMAKE_C_SOURCES}; do
  1227. src=`cmake_escape "${cmake_source_dir}/Source/${a}.c"`
  1228. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1229. echo " ${cmake_c_compiler} ${cmake_c_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1230. done
  1231. for a in ${KWSYS_C_SOURCES}; do
  1232. src=`cmake_escape "${cmake_source_dir}/Source/kwsys/${a}.c"`
  1233. src_flags=`eval echo \\${cmake_c_flags_\${a}}`
  1234. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1235. echo " ${cmake_c_compiler} ${cmake_c_flags} -DKWSYS_NAMESPACE=cmsys ${src_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1236. done
  1237. for a in ${KWSYS_CXX_SOURCES}; do
  1238. src=`cmake_escape "${cmake_source_dir}/Source/kwsys/${a}.cxx"`
  1239. src_flags=`eval echo \\${cmake_cxx_flags_\${a}}`
  1240. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1241. echo " ${cmake_cxx_compiler} ${cmake_cxx_flags} -DKWSYS_NAMESPACE=cmsys ${src_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1242. done
  1243. echo '
  1244. rebuild_cache:
  1245. cd "${cmake_binary_dir}" && "${cmake_source_dir}/bootstrap"
  1246. ' >> "${cmake_bootstrap_dir}/Makefile"
  1247. # Write our default settings to Bootstrap${_cmk}/InitialCacheFlags.cmake.
  1248. echo '
  1249. # Generated by '"${cmake_source_dir}"'/bootstrap
  1250. # Default cmake settings. These may be overridden any settings below.
  1251. set (CMAKE_INSTALL_PREFIX "'"${cmake_prefix_dir}"'" CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
  1252. set (CMAKE_DOC_DIR "'"${cmake_doc_dir}"'" CACHE PATH "Install location for documentation (relative to prefix)." FORCE)
  1253. set (CMAKE_MAN_DIR "'"${cmake_man_dir}"'" CACHE PATH "Install location for man pages (relative to prefix)." FORCE)
  1254. set (CMAKE_DATA_DIR "'"${cmake_data_dir}"'" CACHE PATH "Install location for data (relative to prefix)." FORCE)
  1255. set (CMAKE_XDGDATA_DIR "'"${cmake_xdgdata_dir}"'" CACHE PATH "Install location for XDG specific files (relative to prefix)." FORCE)
  1256. ' > "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1257. # Add configuration settings given as command-line options.
  1258. if [ "x${cmake_bootstrap_qt_gui}" != "x" ]; then
  1259. echo '
  1260. set (BUILD_QtDialog '"${cmake_bootstrap_qt_gui}"' CACHE BOOL "Build Qt dialog for CMake" FORCE)
  1261. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1262. fi
  1263. if [ "x${cmake_bootstrap_qt_qmake}" != "x" ]; then
  1264. echo '
  1265. set (QT_QMAKE_EXECUTABLE "'"${cmake_bootstrap_qt_qmake}"'" CACHE FILEPATH "Location of Qt qmake" FORCE)
  1266. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1267. fi
  1268. if [ "x${cmake_sphinx_man}" != "x" ]; then
  1269. echo '
  1270. set (SPHINX_MAN "'"${cmake_sphinx_man}"'" CACHE BOOL "Build man pages with Sphinx" FORCE)
  1271. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1272. fi
  1273. if [ "x${cmake_sphinx_html}" != "x" ]; then
  1274. echo '
  1275. set (SPHINX_HTML "'"${cmake_sphinx_html}"'" CACHE BOOL "Build html help with Sphinx" FORCE)
  1276. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1277. fi
  1278. if [ "x${cmake_sphinx_qthelp}" != "x" ]; then
  1279. echo '
  1280. set (SPHINX_QTHELP "'"${cmake_sphinx_qthelp}"'" CACHE BOOL "Build qch help with Sphinx" FORCE)
  1281. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1282. fi
  1283. if [ "x${cmake_sphinx_build}" != "x" ]; then
  1284. echo '
  1285. set (SPHINX_EXECUTABLE "'"${cmake_sphinx_build}"'" CACHE FILEPATH "Location of Qt sphinx-build" FORCE)
  1286. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1287. fi
  1288. if [ "x${cmake_sphinx_flags}" != "x" ]; then
  1289. echo '
  1290. set (SPHINX_FLAGS [==['"${cmake_sphinx_flags}"']==] CACHE STRING "Flags to pass to sphinx-build" FORCE)
  1291. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1292. fi
  1293. # Add user-specified settings. Handle relative-path case for
  1294. # specification of cmake_init_file.
  1295. (
  1296. cd "${cmake_binary_dir}"
  1297. if [ -f "${cmake_init_file}" ]; then
  1298. cat "${cmake_init_file}" >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1299. fi
  1300. )
  1301. echo "---------------------------------------------"
  1302. # Run make to build bootstrap cmake
  1303. if [ "x${cmake_parallel_make}" != "x" ]; then
  1304. ${cmake_make_processor} ${cmake_make_flags}
  1305. else
  1306. ${cmake_make_processor}
  1307. fi
  1308. RES=$?
  1309. if [ "${RES}" -ne "0" ]; then
  1310. cmake_error 9 "Problem while running ${cmake_make_processor}"
  1311. fi
  1312. cd "${cmake_binary_dir}"
  1313. # Set C, CXX, and MAKE environment variables, so that real real cmake will be
  1314. # build with same compiler and make
  1315. CC="${cmake_c_compiler}"
  1316. CXX="${cmake_cxx_compiler}"
  1317. if [ -n "${cmake_ccache_enabled}" ]; then
  1318. CC="ccache ${CC}"
  1319. CXX="ccache ${CXX}"
  1320. fi
  1321. MAKE="${cmake_make_processor}"
  1322. export CC
  1323. export CXX
  1324. export MAKE
  1325. # Run bootstrap CMake to configure real CMake
  1326. cmake_options="-DCMAKE_BOOTSTRAP=1"
  1327. if [ -n "${cmake_verbose}" ]; then
  1328. cmake_options="${cmake_options} -DCMAKE_VERBOSE_MAKEFILE=1"
  1329. fi
  1330. "${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_options} ${cmake_bootstrap_system_libs} "$@"
  1331. RES=$?
  1332. if [ "${RES}" -ne "0" ]; then
  1333. cmake_error 11 "Problem while running initial CMake"
  1334. fi
  1335. echo "---------------------------------------------"
  1336. # And we are done. Now just run make
  1337. echo "CMake has bootstrapped. Now run ${cmake_make_processor}."