bootstrap 44 KB

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