Skip to content
Snippets Groups Projects
Commit 678f75ca authored by Markus Blatt's avatar Markus Blatt Committed by Timo Koch
Browse files

Unconditionally define add_python_targets for ease of use.

If there is no python interpreter then it will do nothing.
parent e305d93c
Branches
Tags
1 merge request!1096Fix/python bindings python requirements
......@@ -128,17 +128,6 @@ if(Python3_Interpreter_FOUND)
include_directories("${Python3_INCLUDE_DIRS}")
function(add_python_targets base)
include(DuneSymlinkOrCopy)
if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
message(WARNING "Source and binary dir are the same, skipping symlink!")
else()
foreach(file ${ARGN})
dune_symlink_to_source_files(FILES ${file}.py)
endforeach()
endif()
endfunction()
include(DuneAddPybind11Module)
message(STATUS "Python bindings enabled")
endif()
......@@ -176,3 +165,17 @@ else()
)
set(DUNE_ENABLE_PYTHONBINDINGS OFF)
endif()
include(DuneSymlinkOrCopy)
function(add_python_targets base)
if(Python3_Interpreter_FOUND)
if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
message(WARNING "Source and binary dir are the same, skipping symlink!")
else()
foreach(file ${ARGN})
dune_symlink_to_source_files(FILES ${file}.py)
endforeach()
endif()
endif()
endfunction()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment