bootstrap 44 KB

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