From 196cedfedbe3dfeb6f70befe1f47a351c75f7ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20Pep=C3=A8=20Sciarria?= Date: Thu, 17 Apr 2025 13:51:02 +0200 Subject: [PATCH] correct PSB_IPK/LPK flags, now set only for fortran compiler --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0210e26c..dbd636ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,9 +42,9 @@ include_directories(${INCDIR} ${MODDIR} ${LIBDIR}) message(STATUS "Using IPK size: ${PSB_IPK_SIZE}") message(STATUS "Using LPK size: ${PSB_LPK_SIZE}") - -add_compile_options(-DPSB_IPK${PSB_IPK_SIZE}) -add_compile_options(-DPSB_LPK${PSB_LPK_SIZE}) +# Add PSB_IPK/LPK flag only for fortran files. +set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DPSB_IPK${IPK_SIZE}") +set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DPSB_LPK${LPK_SIZE}")