CMake installation fails with Fortran disabled

Issue #16 resolved
codecircuit created an issue

Compile Magma with:

\$ cmake -DUSE_FORTRAN=no ..
\$ make -j install # will fail

will fail because it tries to install the
Fortran modules. The fix:

diff -ru magma-2.5.1-orig/CMakeLists.txt magma-2.5.1/CMakeLists.txt
--- magma-2.5.1-orig/CMakeLists.txt 2019-01-02 11:18:39.000000000 -0800
+++ magma-2.5.1/CMakeLists.txt  2019-04-03 15:58:01.871234891 -0700
@@ -551,8 +551,13 @@
          LIBRARY DESTINATION lib
          ARCHIVE DESTINATION lib )
 file( GLOB headers include/*.h sparse/include/*.h )
+if (USE_FORTRAN)
 install( FILES ${headers} ${modules}
          DESTINATION include )
+else()
+install( FILES ${headers} DESTINATION include )
+endif()
+

 # ----------------------------------------
 # pkg-config

Comments (2)

  1. Log in to comment