From f0d272299e646ac1f8f76f41a8debac98164504f Mon Sep 17 00:00:00 2001 From: Algiane Froehly Date: Sat, 14 Sep 2024 22:10:04 +0200 Subject: [PATCH] Fix mmg_get_tagname test case compilation when USE_ELAS is OFF and USE_VTK is ON. --- cmake/testing/mmg_tests.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/testing/mmg_tests.cmake b/cmake/testing/mmg_tests.cmake index 6f1c8883a..82436951b 100644 --- a/cmake/testing/mmg_tests.cmake +++ b/cmake/testing/mmg_tests.cmake @@ -459,10 +459,12 @@ IF ( NOT WIN32 ) INCLUDE_DIRECTORIES ( AFTER ${SCOTCH_INCLUDE_DIRS} ) ENDIF() + SET( GET_TAGNAME_LIBRARIES ${LIBRARIES} ) + IF( ELAS_FOUND AND NOT USE_ELAS MATCHES OFF ) # Set flags for building test program INCLUDE_DIRECTORIES(AFTER ${ELAS_INCLUDE_DIR}) - SET( GET_TAGNAME_LIBRARIES ${ELAS_LINK_FLAGS} ${ELAS_LIBRARY} ${LIBRARIES}) + SET( GET_TAGNAME_LIBRARIES ${ELAS_LINK_FLAGS} ${ELAS_LIBRARY} ${GET_TAGNAME_LIBRARIES} ) ENDIF ( ) @@ -476,9 +478,11 @@ IF ( NOT WIN32 ) target_include_directories( mmg_get_tagname BEFORE PUBLIC ${SCOTCH_INCLUDE_DIRS} ) ENDIF ( ) + SET( GET_TAGNAME_LIBRARIES ${LIBRARIES} ) + IF( ELAS_FOUND AND NOT USE_ELAS MATCHES OFF ) target_include_directories( mmg_get_tagname AFTER PUBLIC ${ELAS_INCLUDE_DIR} ) - SET( GET_TAGNAME_LIBRARIES ${ELAS_LINK_FLAGS} ${ELAS_LIBRARY} ${LIBRARIES}) + SET( GET_TAGNAME_LIBRARIES ${ELAS_LINK_FLAGS} ${ELAS_LIBRARY} ${GET_TAGNAME_LIBRARIES}) ENDIF ( ) ENDIF ( )