Hello,

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!

Files:
https://github.com/ppenzin/agave/tree/cmake/cmake
https://github.com/ppenzin/agave/blob/cmake/src/CMakeLists.txt

Best,
Petr

[1]: https://github.com/Kitware/CMake/blob/master/Modules/CMakeAddNewLanguage.txt
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

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

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to