Skip to content
Snippets Groups Projects
Commit 8da9646d authored by Carsten Gräser's avatar Carsten Gräser
Browse files

[cmake] Do not add python flags unconditionally

This add a patch from !239
and also removes some 2.7 backward compatibility code, since we only
support dune versions >= 2.9 which all require Python3.
parent 27d7517f
No related branches found
No related tags found
1 merge request!260[cmake] Do not add python flags unconditionally
Pipeline #77089 passed
......@@ -13,12 +13,8 @@ function(add_dune_pythonlibs_flags _targets)
if(Python3_FOUND)
target_link_libraries(${_target} PUBLIC ${Python3_LIBRARIES})
set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Python3_INCLUDE_DIRS})
# backward compatibility with 2.7 core tests
elseif(PYTHONLIBS_FOUND)
target_link_libraries(${_target} PUBLIC ${PYTHON_LIBRARIES})
set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRS})
endif()
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS "HAVE_PYTHON")
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_OPTIONS "-fno-strict-aliasing")
endif()
endforeach(_target ${_targets})
endfunction(add_dune_pythonlibs_flags)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment