bootstrap 44 KB

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