Skip to content

Commit

Permalink
Merge pull request #82 from GEOS-ESM/feature/tclune/#58-support-varia…
Browse files Browse the repository at this point in the history
…nt-placement-of-@

Patch for fix # 58.
  • Loading branch information
mathomp4 authored Apr 15, 2020
2 parents 4ee2187 + 236478f commit 6947c44
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions esma_add_subdirectories.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Only add the directories in alldirs list that actually exist. GEOS
# can build in multiple configurations, and the build system must be
# able to skip non-existent directiories in the list.
# able to skip non-existent directories in the list.

# We allow nested repositories to have leading or trailing "@" in their
# name which is disregarded for everything except path.
Expand All @@ -21,20 +21,23 @@ function (esma_add_subdirectory dir)
set (${ARGS_FOUND} TRUE PARENT_SCOPE)
endif()
return()
else ()
if (ARGS_FOUND)
set (${ARGS_FOUND} FALSE PARENT_SCOPE)
else ()
ecbuild_warn(" directory not found ${dir}")
endif()
endif ()
endif()
endforeach()

# dir not found
if (ARGS_FOUND)
set (${ARGS_FOUND} FALSE PARENT_SCOPE)
else ()
# The below should be changed to ecbuild_error() once the FOUND option
# is propagated through client code.
ecbuild_info(" directory not found ${dir} (possibly sparse checkout)")
endif()

endfunction (esma_add_subdirectory)

function (esma_add_subdirectories dirs)
set (dirs_ ${dirs} ${ARGN})
ecbuild_info ("esma_add_subdirectiories: ${dirs}")
ecbuild_debug ("esma_add_subdirectories: ${dirs}")
foreach (subdir ${dirs_})
esma_add_subdirectory(${subdir})
endforeach()
Expand Down

0 comments on commit 6947c44

Please sign in to comment.