Skip to content

Commit

Permalink
Merge pull request #14 from LLNL/bugfix/corbett/gcc8-no-fortran
Browse files Browse the repository at this point in the history
Fixed bug when using gcc8 without fortran.
  • Loading branch information
corbett5 committed May 1, 2019
2 parents 794110f + 13b3818 commit 9c2e475
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,13 @@ if (AXOM_ENABLE_SPARSEHASH)
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/thirdparty>)

# Disable warning introduced in gcc@8.1 related to how sparsehash casts memory
if(C_COMPILER_FAMILY_IS_GNU)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "8.1")
blt_add_target_compile_flags(TO sparsehash FLAGS
$<$<NOT:$<COMPILE_LANGUAGE:Fortran>>:-Wno-class-memaccess>)
endif()
if(C_COMPILER_FAMILY_IS_GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "8.1")
if (ENABLE_FORTRAN)
blt_add_target_compile_flags(TO sparsehash FLAGS
$<$<NOT:$<COMPILE_LANGUAGE:Fortran>>:-Wno-class-memaccess>)
else()
blt_add_target_compile_flags(TO sparsehash FLAGS -Wno-class-memaccess>)
endif()
endif()

install(TARGETS sparsehash
Expand Down

0 comments on commit 9c2e475

Please sign in to comment.