Commit 9e6d37e9 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

compatibility with cmake < 3.8

parent 6cc29c32
Pipeline #2393 failed with stage
in 23 seconds
......@@ -89,7 +89,11 @@ macro(dg_add_swig_module module filename libname)
# see CMake bug 4147
SWIG_GET_WRAPPER_DEPENDENCIES(${filename} ${CMAKE_CURRENT_BINARY_DIR}/${module}PYTHON_wrap.cxx python swig_extra_dependencies)
LIST(APPEND SWIG_MODULE_${module}_EXTRA_DEPS ${swig_extra_dependencies})
swig_add_library(${module} LANGUAGE python SOURCES ${filename})
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.8)
swig_add_module(${module} python ${filename})
else()
swig_add_library(${module} LANGUAGE python SOURCES ${filename})
endif()
swig_link_libraries(${module} "${PYTHON_LIBRARIES};${libname}")
set_target_properties(${SWIG_MODULE_${module}_REAL_NAME} PROPERTIES COMPILE_FLAGS "-Wno-literal-suffix")
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment