Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support in CMakeLists.txt for flang #202

Open
dhermes opened this issue Feb 11, 2020 · 3 comments
Open

Add support in CMakeLists.txt for flang #202

dhermes opened this issue Feb 11, 2020 · 3 comments

Comments

@dhermes
Copy link
Owner

dhermes commented Feb 11, 2020

An old version is available on conda-forge:

@dhermes
Copy link
Owner Author

dhermes commented Feb 11, 2020

To actually invoke these (as of e4aaec7):

$ SRC_DIR=".../bezier/src/fortran"
$ BUILD_DIR="$(pwd)/build-flang/build"
$ INSTALL_PREFIX="$(pwd)/build-flang/usr"
$ FLANG_BIN="${HOME}/miniconda3/bin/flang"
$ mkdir -p "${BUILD_DIR}"
$ cmake \
>     -DCMAKE_Fortran_COMPILER="${FLANG_BIN}" \
>     -DCMAKE_BUILD_TYPE=Release \
>     -DCMAKE_INSTALL_PREFIX:PATH="${INSTALL_PREFIX}" \
>     -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
>     -S "${SRC_DIR}" \
>     -B "${BUILD_DIR}"
-- The Fortran compiler identification is Flang 99.99.1
-- The C compiler identification is Clang 5.0.0
-- Check for working Fortran compiler: .../miniconda3/bin/flang
-- Check for working Fortran compiler: .../miniconda3/bin/flang  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether .../miniconda3/bin/flang supports Fortran 90
-- Checking whether .../miniconda3/bin/flang supports Fortran 90 -- yes
-- Check for working C compiler: .../miniconda3/bin/clang
-- Check for working C compiler: .../miniconda3/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:15 (message):
  gfortran and ifort are the only supported compilers


-- Configuring incomplete, errors occurred!
See also ".../build-flang/build/CMakeFiles/CMakeOutput.log".

@dhermes
Copy link
Owner Author

dhermes commented Feb 11, 2020

I started a branch for this (issue-202) but it may not go anywhere in the near term due to missing feature(s) in flang.

@dhermes
Copy link
Owner Author

dhermes commented Feb 13, 2020

I've been using https://github.com/flang-compiler/flang/wiki/Building-Flang to (try to) build flang from source. Currently (on macOS Catalina 10.15.3) hit a wall because the custom built clang++ can't find standard headers, e.g. <atomic> and <iostream>.

@dhermes dhermes changed the title Add support in CMakeLists.txt for flang and lfortran Add support in CMakeLists.txt for flang May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant