Skip to content

Commit

Permalink
Tweak CMake modules in cmake/.
Browse files Browse the repository at this point in the history
  • Loading branch information
puneetmatharu committed Nov 20, 2023
1 parent 9d1486e commit 2501359
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions cmake/OomphDocProjectSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# oomph_doc_project_settings()
# =============================================================================
# cmake-format: on
include_guard()

# ------------------------------------------------------------------------------
function(oomph_doc_project_settings)
Expand Down
1 change: 1 addition & 0 deletions cmake/OomphFindExternalSrcFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
# shell command).
# =============================================================================
# cmake-format: on
include_guard()

function(oomph_find_external_src_file)
# Define the supported set of keywords. The value of PREFIX will be prepended
Expand Down
1 change: 1 addition & 0 deletions cmake/OomphInstallLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# defined in OomphConfigureProject.cmake.
# =============================================================================
# Define additional variables required by the oomphlibConfig.cmake.in file here
include_guard()

# Get the compile definitions
get_directory_property(
Expand Down
15 changes: 14 additions & 1 deletion cmake/OomphSilenceWarnings.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# cmake-format: off
# =============================================================================
# DESCRIPTION:
# ------------
#
#
# USAGE:
# ------
# include(OomphSilenceWarnings)
# =============================================================================
# cmake-format: on
include_guard()

# ----------------------------------------------------------------------------
set(OOMPH_C_AND_CXX_FLAGS)
set(OOMPH_C_FLAGS ${OOMPH_C_FLAGS} ${OOMPH_C_AND_CXX_FLAGS})
set(OOMPH_CXX_FLAGS ${OOMPH_CXX_FLAGS} ${OOMPH_C_AND_CXX_FLAGS})
Expand Down Expand Up @@ -25,7 +39,6 @@ foreach(CXX_COMPILE_FLAG IN LISTS OOMPH_CXX_FLAGS)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:${CXX_COMPILE_FLAG}>)
endif()
endforeach()

# ----------------------------------------------------------------------------
# Keep around!

Expand Down
2 changes: 0 additions & 2 deletions cmake/oomphlibConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ if(OOMPH_HAS_MPI)
if(OOMPH_USE_MPI_FROM)
set(BACKUP_CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}")
set(CMAKE_PREFIX_PATH "${OOMPH_USE_MPI_FROM}" CACHE INTERNAL "" FORCE)

find_dependency(MPI REQUIRED)

set(CMAKE_PREFIX_PATH "${BACKUP_CMAKE_PREFIX_PATH}" CACHE INTERNAL "" FORCE)
endif()
find_dependency(MPI REQUIRED)
Expand Down

0 comments on commit 2501359

Please sign in to comment.