Skip to content

Commit

Permalink
Supress unused variable warning due to pFUnit bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikolaj-A-Kowalski committed Aug 21, 2023
1 parent 8612baa commit 3170b67
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ if(BUILD_TESTS)
LINK_LIBRARIES scone ${LAPACK_LIBRARIES}
)

# pFUnit may have a bug which causes a unused variable `class(Test), allocatable :: t` be
# present if the suite contains only a TestCase and its methods
# We need to suppress this warning for clarity
target_compile_options(unitTests PRIVATE "-Wno-unused-variable" )

####################################################################################################
# COMPILE INTEGRATION TESTS

Expand All @@ -183,6 +188,11 @@ if(BUILD_TESTS)
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)

# pFUnit may have a bug which causes a unused variable `class(Test), allocatable :: t` be
# present if the suite contains only a TestCase and its methods
# We need to suppress this warning for clarity
target_compile_options(integrationTests PRIVATE "-Wno-unused-variable" )

endif()

####################################################################################################
Expand Down

0 comments on commit 3170b67

Please sign in to comment.