Adding new language - source dependencies

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Adding new language - source dependencies

Petr Penzin

I have followed instructions in CMakeAddNewLanguage.txt [1] to add
support for Haskell, but I am a bit stuck on detecting dependencies
between source files. Haskell source compiles to a source file and an
"interface file" (similar to Fortran module file), which is needed for
compiling dependent inputs. Without the proper ordering compilation
would fail to find included files:

[ 16%] Building Haskell object src/CMakeFiles/agave.dir/Main.hs.o

/usr/home/petr/devel/agave/src/Main.hs:6:1: error:
     Could not find module ‘Basic.Status’
     Use -v to see a list of the files searched for.
6 | import Basic.Status
   | ^^^^^^^^^^^^^^^^^^^

GHC (haskell platform) has a flag to output dependency info for a list
of files without performing a full compilation, but I am not sure how to
use that in the build. Any pointers would be appreciated!




Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: