Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Check LIBELTOPO_FIND_REQUIRED before throwing fatal error #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions mex/cmake/FindELTOPO.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ FIND_PATH(LIBELTOPO_INCLUDE_DIR eltopo.h
# Includes must be found
if(NOT LIBELTOPO_INCLUDE_DIR)
set(LIBELTOPO_INCLUDE_DIR FALSE)
message(FATAL_ERROR "could NOT find LIBELTOPO_INCLUDE_DIR")
if(LIBELTOPO_FIND_REQUIRED)
message(FATAL_ERROR "could NOT find LIBELTOPO_INCLUDE_DIR")
endif(LIBELTOPO_FIND_REQUIRED)
endif(NOT LIBELTOPO_INCLUDE_DIR)

if(LIBELTOPO_INCLUDE_DIR)
Expand All @@ -32,7 +34,9 @@ FIND_LIBRARY(LIBELTOPO_LIBRARY NAME eltopo_release PATHS ${LIBELTOPO_INCLUDE_DIR
# Main library must be found
if(NOT LIBELTOPO_LIBRARY)
set(LIBELTOPO_FOUND FALSE)
message(FATAL_ERROR "could NOT find LIBELTOPO")
if(LIBELTOPO_FIND_REQUIRED)
message(FATAL_ERROR "could NOT find LIBELTOPO")
endif(LIBELTOPO_FIND_REQUIRED)
endif(NOT LIBELTOPO_LIBRARY)


Expand Down