Skip to content

Commit

Permalink
CMake: Verify pyAMReX_..._src paths exit (#182)
Browse files Browse the repository at this point in the history
Give a clean error message if a `pyAMReX_thirdparty_src` directory
does not exist.
  • Loading branch information
ax3l authored Aug 30, 2023
1 parent b8e39ab commit a7d3abb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/dependencies/AMReX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ macro(find_amrex)
elseif(pyAMReX_amrex_src)
message(STATUS "Compiling local AMReX ...")
message(STATUS "AMReX source path: ${pyAMReX_amrex_src}")
if(NOT IS_DIRECTORY ${pyAMReX_amrex_src})
message(FATAL_ERROR "Specified directory pyAMReX_amrex_src='${pyAMReX_amrex_src}' does not exist!")
endif()
elseif(pyAMReX_amrex_internal)
message(STATUS "Downloading AMReX ...")
message(STATUS "AMReX repository: ${pyAMReX_amrex_repo} (${pyAMReX_amrex_branch})")
Expand Down
3 changes: 3 additions & 0 deletions cmake/dependencies/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ function(find_pybind11)
elseif(pyAMReX_pybind11_src)
message(STATUS "Compiling local pybind11 ...")
message(STATUS "pybind11 source path: ${pyAMReX_pybind11_src}")
if(NOT IS_DIRECTORY ${pyAMReX_pybind11_src})
message(FATAL_ERROR "Specified directory pyAMReX_pybind11_src='${pyAMReX_pybind11_src}' does not exist!")
endif()
elseif(pyAMReX_pybind11_internal)
message(STATUS "Downloading pybind11 ...")
message(STATUS "pybind11 repository: ${pyAMReX_pybind11_repo} (${pyAMReX_pybind11_branch})")
Expand Down

0 comments on commit a7d3abb

Please sign in to comment.