Skip to content

Commit a7d3abb

Browse files
authored
CMake: Verify pyAMReX_..._src paths exit (#182)
Give a clean error message if a `pyAMReX_thirdparty_src` directory does not exist.
1 parent b8e39ab commit a7d3abb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

cmake/dependencies/AMReX.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ macro(find_amrex)
44
elseif(pyAMReX_amrex_src)
55
message(STATUS "Compiling local AMReX ...")
66
message(STATUS "AMReX source path: ${pyAMReX_amrex_src}")
7+
if(NOT IS_DIRECTORY ${pyAMReX_amrex_src})
8+
message(FATAL_ERROR "Specified directory pyAMReX_amrex_src='${pyAMReX_amrex_src}' does not exist!")
9+
endif()
710
elseif(pyAMReX_amrex_internal)
811
message(STATUS "Downloading AMReX ...")
912
message(STATUS "AMReX repository: ${pyAMReX_amrex_repo} (${pyAMReX_amrex_branch})")

cmake/dependencies/pybind11.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ function(find_pybind11)
44
elseif(pyAMReX_pybind11_src)
55
message(STATUS "Compiling local pybind11 ...")
66
message(STATUS "pybind11 source path: ${pyAMReX_pybind11_src}")
7+
if(NOT IS_DIRECTORY ${pyAMReX_pybind11_src})
8+
message(FATAL_ERROR "Specified directory pyAMReX_pybind11_src='${pyAMReX_pybind11_src}' does not exist!")
9+
endif()
710
elseif(pyAMReX_pybind11_internal)
811
message(STATUS "Downloading pybind11 ...")
912
message(STATUS "pybind11 repository: ${pyAMReX_pybind11_repo} (${pyAMReX_pybind11_branch})")

0 commit comments

Comments
 (0)