From 9630564368153701cd1ec40be998f6ea89bfb67d Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Tue, 18 Jan 2022 11:02:30 +0100 Subject: [PATCH] Allow adjusting of module install subdirectory --- config/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index 80d33e63..29121ade 100644 --- a/config/CMakeLists.txt +++ b/config/CMakeLists.txt @@ -18,8 +18,14 @@ option(WITH_OpenMP "Enable support for shared memory parallelisation with OpenMP option(WITH_JSON "Enable support for JSON parsing via json-fortran" FALSE) set( - module-dir + "${PROJECT_NAME}-module-dir" "${PROJECT_NAME}/${CMAKE_Fortran_COMPILER_ID}-${CMAKE_Fortran_COMPILER_VERSION}" + CACHE STRING + "Subdirectory to install generated module files to" +) +set( + module-dir + "${${PROJECT_NAME}-module-dir}" ) set(module-dir "${module-dir}" PARENT_SCOPE)