Detect if the user wants Julia bindings and fail if Julia is not found.
This commit is contained in:
@@ -26,6 +26,14 @@ else ()
|
||||
option(BUILD_SHARED_LIBS
|
||||
"Compile shared libraries (if OFF, static libraries are compiled)." ON)
|
||||
endif()
|
||||
|
||||
# Detect whether the user passed BUILD_JULIA_BINDINGS in order to determine if
|
||||
# we should fail if Julia isn't found.
|
||||
if (BUILD_JULIA_BINDINGS)
|
||||
set(FORCE_BUILD_JULIA_BINDINGS ON)
|
||||
else()
|
||||
set(FORCE_BUILD_JULIA_BINDINGS OFF)
|
||||
endif()
|
||||
option(BUILD_JULIA_BINDINGS "Build Julia bindings." ON)
|
||||
|
||||
# Build Markdown bindings for documentation. This is used as part of website
|
||||
|
||||
@@ -2,7 +2,12 @@ if (BUILD_JULIA_BINDINGS)
|
||||
## We need to check here if Julia is even available. Although actually
|
||||
## technically, I'm not sure if we even need to know! For the tests though we
|
||||
## do. So it's probably a good idea to check.
|
||||
find_package(Julia 0.7.0)
|
||||
if (FORCE_BUILD_JULIA_BINDINGS)
|
||||
find_package(Julia 0.7.0 REQUIRED)
|
||||
else ()
|
||||
find_package(Julia 0.7.0)
|
||||
endif ()
|
||||
|
||||
if (NOT JULIA_FOUND)
|
||||
# We can't build anything, so define the macro to do nothing.
|
||||
macro (add_julia_binding name)
|
||||
|
||||
Reference in New Issue
Block a user