Closed
Description
Describe the issue
Hi. I use cmake 3.17.2 to compile and install stdlib. When I type make install
library files are copied to a folder named lib
, but module files are copied to a folder named OFF
which looks wierd.
I use the following commands:
mkdir build
cd build
FC=/opt/gcc-10.2.0/bin/gfortran /opt/cmake/bin/cmake .. -DCMAKE_INSTALL_PREFIX=/opt/Fortran_stdlib/stdlib/install
make
make install
Expected behaviour
I think the name of the folder of the module files is OFF
because it is set to False in cmake files. I am not sure if this might be a problem of my cmake installation, but applying the following change I manage to get them installed in a folder named include
:
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b56d75b..2392c3d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -87,4 +87,4 @@ install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
-install(DIRECTORY ${LIB_MOD_DIR} DESTINATION "${CMAKE_INSTALL_MODULEDIR}")
+install(DIRECTORY ${LIB_MOD_DIR} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
Technical Details
stdlib version
commit 68ec64f
Compiler version
GCC 10.2.0 and cmake 3.17.2
Platform and Architecture
Kubuntu 18.04 x86_64