2018-05-01 21:50:34 +02:00
|
|
|
<!--
|
|
|
|
Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
|
|
|
-->
|
|
|
|
|
2018-01-25 22:36:26 +01:00
|
|
|
# f18
|
2018-05-03 14:54:53 +02:00
|
|
|
|
|
|
|
## Selection of the C/C++ compiler
|
|
|
|
|
2018-05-04 11:18:34 +02:00
|
|
|
F18 requires a C++17 compiler. As of today, the code was only tested with g++
|
|
|
|
7.2.0, g++ 7.3.0 and clang 6.0.
|
2018-05-03 14:54:53 +02:00
|
|
|
|
|
|
|
For a proper installation, we assume that the PATH and LD_LIBRARY_PATH environment variables
|
|
|
|
are properly set to use gcc, g++ and the associated libraries.
|
|
|
|
|
|
|
|
cmake will require that the environement variables CC and CXX are properly set (else it will
|
|
|
|
search for use the 'cc' and 'c++' program which are likely /usr/bin/cc and /usr/bin/c++) that
|
|
|
|
can be done now or while calling cmake
|
|
|
|
|
|
|
|
export CC=gcc
|
|
|
|
export CXX=g++
|
|
|
|
|
2018-05-04 11:18:34 +02:00
|
|
|
## Installation of LLVM & CLANG 6.0
|
2018-05-03 14:54:53 +02:00
|
|
|
|
2018-05-04 11:18:34 +02:00
|
|
|
F18 depends of the LLVM & CLANG libraries even when clang is not used as C++ compiler.
|
2018-05-03 14:54:53 +02:00
|
|
|
|
2018-05-04 11:18:34 +02:00
|
|
|
If those libraries are not provided by your system then you may want to follow the
|
|
|
|
build instructions at https://clang.llvm.org/get_started.html
|
2018-05-03 14:54:53 +02:00
|
|
|
|
|
|
|
## Installation of F18
|
|
|
|
|
|
|
|
######## Choose the installation directory
|
|
|
|
|
|
|
|
F18_PREFIX=...
|
|
|
|
|
|
|
|
######## Get Flang sources in $ROOT/f18
|
|
|
|
cd $ROOT
|
|
|
|
git clone https://github.com/ThePortlandGroup/f18.git
|
|
|
|
|
|
|
|
######## And build it in a dedicated directory
|
|
|
|
######## Reminder: If LLVM & Clang where not installed in a standard
|
2018-05-04 11:18:34 +02:00
|
|
|
######## location then you may also have to specify it via the
|
|
|
|
######## CMAKE_MODULE_PATH or CMAKE_PREFIX_PATH variables.
|
2018-05-03 14:54:53 +02:00
|
|
|
mkdir $ROOT/f18-build
|
|
|
|
cd $ROOT/f18-build
|
|
|
|
CC=gcc CXX=g++ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$F18_PREFIX $ROOT/f18
|
|
|
|
make -j 4
|
|
|
|
make install
|