Skip to content

Commit

Permalink
Merge pull request #1218 from LLNL/bugfix/chapman39/duplicate-exec-error
Browse files Browse the repository at this point in the history
Resolve duplication issue when configuring with Ninja and codevelop
  • Loading branch information
chapman39 authored Aug 28, 2024
2 parents 0a6a464 + 2aa48be commit 770e678
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmake/thirdparty/SetupSeracThirdParty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,19 @@ if (NOT SERAC_THIRD_PARTY_LIBRARIES_FOUND)
# Build MFEM shared if Serac is being built shared
set(MFEM_SHARED_BUILD ${BUILD_SHARED_LIBS} CACHE BOOL "")

# Unset runtime output directory to prevent duplication issue that occurs when using Ninja
# https://github.com/LLNL/blt/issues/695
set(tmp_cmake_runtime_output_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY CACHE)

if(${PROJECT_NAME} STREQUAL "smith")
add_subdirectory(${PROJECT_SOURCE_DIR}/serac/mfem ${CMAKE_BINARY_DIR}/mfem)
else()
add_subdirectory(${PROJECT_SOURCE_DIR}/mfem ${CMAKE_BINARY_DIR}/mfem)
endif()

# Restore previous runtime output directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${tmp_cmake_runtime_output_directory} CACHE PATH "" FORCE)

set(MFEM_FOUND TRUE CACHE BOOL "" FORCE)

Expand Down

0 comments on commit 770e678

Please sign in to comment.