Giter Club home page Giter Club logo

cmake_fortran_template's People

Contributors

sethmmorton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmake_fortran_template's Issues

OpenBLAS and LAPACK

Hi everyone,

I would like to know how to link OpenBLAS and LAPACK libraries to the fortran code.
Could someone give a CMakeLists.txt example of how to link those libraries?

Thank you

pgfortran/CMake issues

I tried the template code as is, and it worked fine for gfortran on Ubuntu 14.04

When i tried it with ifort, things were good too..
$ FC=ifort cmake ..
The Makefile was created and everything worked.

However, after flushing the build directory, I tried it with the PGI compiler to get
(FC=pgfortran cmake ..)

yosemite@yosemite-xeon:~/Dropbox/cmake_trials/build$ FC=pgfortran cmake ..
-- The Fortran compiler identification is PGI
-- Check for working Fortran compiler: /opt/pgi/linux86-64/15.7/bin/pgfortran
-- Check for working Fortran compiler: /opt/pgi/linux86-64/15.7/bin/pgfortran  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /opt/pgi/linux86-64/15.7/bin/pgfortran supports Fortran 90
-- Checking whether /opt/pgi/linux86-64/15.7/bin/pgfortran supports Fortran 90 -- yes
CMake Error at cmake/Modules/SetCompileFlag.cmake:109 (MESSAGE):
  No compile flags were found
Call Stack (most recent call first):
  cmake/Modules/SetFortranFlags.cmake:99 (SET_COMPILE_FLAG)
  CMakeLists.txt:48 (INCLUDE)


-- Configuring incomplete, errors occurred!

I placed print statements in cmake/Modules/SetFortranFlags.cmake, and it seems like there is an issue with setting the first debug flag with the PGI compiler. Not sure what's going on under the hood, but thought it might be worth digging into.

Update to Modern CMake style

The CMake style in this template is not the preferred style anymore. The CMake folks are advocating for "Modern CMake" (https://cliutils.gitlab.io/modern-cmake/, https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1), which from my understanding attempts to define everything in terms of targets and is less procedural.

I do not like providing examples to users that are using an obsolete style or do not use the best the language has to offer. I would like this template to be updated to use a more modern CMake style.

Unfortunately, I no longer use CMake (or Fortan for that matter) so I am not in a position to be updating the code to conform to best-practices. I am hoping some altruistic soul will stumble upon this issue and then create a Pull Request to make this template more modern.

License

This project is missing a license :(. Can you add it, so that it can be safely used in open source projects (e.g MIT).

LAPACK issues

I can't get LAPACK to work with the template. I enabled the
INCLUDE(${CMAKE_MODULE_PATH}/SetUpLAPACK.cmake)
line, and managed to get rid of the errors, so I think Cmake can find LAPACK. But I always get the error, that 'dgesv' (a lapack function) is an undefined reference. Do I have to enable any other settings or modify the compiler flags?
I'm using the MSYS2 LAPACK installation and it works fine from the command line.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.