Skip to content

Commit 7cda80d

Browse files
author
sourceryinstitute
committed
Incorporate CMake build script.
1 parent 0b003c0 commit 7cda80d

File tree

1 file changed

+22
-30
lines changed

1 file changed

+22
-30
lines changed

INSTALL.md

+22-30
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,17 @@ install the following:
8484
Fortran and C compilers (preferably the [MPICH] or [MVAPICH] implementations for
8585
robustness and high performance)
8686

87-
The [install_prerequisites] directory contains experimental [buildgcc] and [buildmpich]
88-
bash shell scripts that can download and build any one of several versions of the [GCC]
89-
C, C++, and Fortran compilers, and [MPICH]. (Because newer parts of the GNU Fortran compiler
90-
(gfortran) are written in C++, installing the GNU Fortran compiler from source requires
91-
also installing the GNU C++ compiler (g++).) The CMAke scripts that build OpenCoarrays
92-
also copy [buildgcc] and [buildmpich] into the "bin" directory of the OpenCoarrays
93-
installation for later use.
94-
95-
We have the buildgcc and buildmpich scripts tested on OS X and Linux. Please submit
96-
suggestions for improving the scripts to our [Issues] page or preferably suggested edits by
97-
forking a copy of the [OpenCoarrays] repository, making the suggested edits, and submitting
98-
a pull request.
87+
The [install_prerequisites] directory contains experimental [buildgcc], [buildmpich], and
88+
[buildcmake] bash shell scripts that can download and build any one of several versions of the
89+
[GCC] C, C++, and Fortran compilers; the [CMake] build sytem; and the [MPICH] communication
90+
library. (Because newer parts of the GNU Fortran compiler gfortran are written in C++,
91+
installing the GNU Fortran compiler from source requires also installing the GNU C++ compiler
92+
g++.) The CMake scripts that build OpenCoarrays also copy [buildgcc], [buildmpich], and
93+
[buildcmake] into the "bin" directory of the OpenCoarrays installation for later use.
94+
95+
We have tested the build scripts on OS X and Linux. Please submit suggestions for improving
96+
the scripts to our [Issues] page or preferably suggeste edits by forking a copy of the
97+
[OpenCoarrays] repository, making the suggested edits, and submitting a pull request.
9998

10099
If installing the above prerequisites is infeasible, then a limited coverage of CAF
101100
features is available via the OpenCoarrays "caf" compiler wrapper and the
@@ -175,31 +174,23 @@ system settings. For example, you might need to remove the "-Werror" option fro
175174
compiler flags or name a different compiler. In order to activate efficient strided-array
176175
transfer support, uncomment the -DSTRIDED flag inside the [make.inc] file.
177176

178-
## <a name="obtaingcc">Obtaining GCC</a> ##
177+
## <a name="obtaingcc">Obtaining GCC, MPICH, and CMake</a> ##
179178

180-
[GCC] 5 binary builds are available at [https://gcc.gnu.org/wiki/GFortranBinaries]. Also,
179+
[GFortran Binaries] 5 binary builds are available at [https://gcc.gnu.org/wiki/GFortranBinaries]. Also,
181180
the Lubuntu Linux virtual machine available for download in the [Sourcery Store] includes
182-
builds of GCC 4.9, 5.2, and 6.0 as well as a rudimentary script (/opt/sourcery/bin/buildgcc)
183-
that builds [GCC] from source on Linux and OS X.
181+
builds of GCC 4.9, 5.2, and 6.0.
184182

185-
To build the most up-to-date version of GCC from source manually, you might first try the
186-
steps employed in the buildgcc script:
183+
To build all prerequisites from source, including the current development branch of GCC,
184+
you might first try the running the provided scripts in a manner similar to the following:
187185

188-
svn co svn://gcc.gnu.org/svn/gcc/trunk
189-
cd trunk
190-
./contrib/download_prerequisites
191-
cd ..
192-
mkdir -p trunk-build
186+
cd install_prerequisites
187+
./buildgcc trunk
193188
cd trunk-build
194-
../trunk/configure --prefix=${PWD} --enable-languages=c,c++,fortran,lto --disable-multilib --disable-werror
195-
make -j 2 bootstrap
196189
make install
190+
CC=gcc FC=gfortran CXX=g++ ./buildmpich default
191+
make install
192+
./buildcmake default
197193

198-
where the "2" in the penultimate line launches a multi-threaded build with 2 threads. Use more
199-
threads for additional speedup, depending on your platform.
200-
201-
See the [GFortran Binaries] web page for additional details and the [Installing GCC] page
202-
for an exhaustive description of the build process and options.
203194

204195
[End-User Installation]: #end-user-installation
205196
[OS X]: #os-x
@@ -223,6 +214,7 @@ for an exhaustive description of the build process and options.
223214
[install_prerequisites]: ./install_prerequisites
224215
[buildgcc]: ./install_prerequisites/buildgcc
225216
[buildmpich]: ./install_prerequisites/buildmpich
217+
[buildcmake]: ./install_prerequisites/buildcmake
226218
[MPICH]: http://www.mpich.org
227219
[MVAPICH]:http://mvapich.cse.ohio-state.edu
228220
[Macports]: http://www.macports.org

0 commit comments

Comments
 (0)