${LINEARSOLVER_DIR}/inc
)
SET(_extra_lib_SWIG linearsolver ${PETSC_LIBRARIES} ${SLEPC_LIBRARIES})
- file(COPY cdmath_with_petsc.i DESTINATION ${CMAKE_BINARY_DIR}/swig)
- file(RENAME ${CMAKE_BINARY_DIR}/swig/cdmath_with_petsc.i ${CMAKE_BINARY_DIR}/swig/cdmath.i)
+ file(COPY cdmath_with_petsc.i DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+ file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/cdmath_with_petsc.i ${CMAKE_CURRENT_BINARY_DIR}/cdmath.i)
else (CDMATH_WITH_PETSC)
- file(COPY cdmath_without_petsc.i DESTINATION ${CMAKE_BINARY_DIR}/swig)
- file(RENAME ${CMAKE_BINARY_DIR}/swig/cdmath_without_petsc.i ${CMAKE_BINARY_DIR}/swig/cdmath.i)
+ file(COPY cdmath_without_petsc.i DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+ file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/cdmath_without_petsc.i ${CMAKE_CURRENT_BINARY_DIR}/cdmath.i)
endif (CDMATH_WITH_PETSC)
-SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/swig/cdmath.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/swig/cdmath.i PROPERTIES C OFF)
-SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/swig/cdmath.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/cdmath.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/cdmath.i PROPERTIES C OFF)
+SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/cdmath.i PROPERTIES SWIG_DEFINITIONS "-shadow")
#Trying to remove warnings due to cmake policies cmp0078 and cmp0086
IF (${CMAKE_VERSION} VERSION_GREATER "3.13.0")
ENDIF(${CMAKE_VERSION} VERSION_GREATER "3.13.0")
IF (${CMAKE_VERSION} VERSION_LESS "3.8.0")
- SWIG_ADD_MODULE(cdmath python ${CMAKE_BINARY_DIR}/swig/cdmath.i)
+ SWIG_ADD_MODULE(cdmath python ${CMAKE_CURRENT_BINARY_DIR}/cdmath.i)
ELSE (${CMAKE_VERSION} VERSION_LESS "3.8.0")
- SWIG_ADD_LIBRARY(cdmath TYPE SHARED LANGUAGE python SOURCES ${CMAKE_BINARY_DIR}/swig/cdmath.i)
+ SWIG_ADD_LIBRARY(cdmath TYPE SHARED LANGUAGE python SOURCES ${CMAKE_CURRENT_BINARY_DIR}/cdmath.i)
ENDIF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
SWIG_LINK_LIBRARIES(cdmath ${Python_LIBRARIES} base mesh ${medloader} ${medcoupling} ${_extra_lib_SWIG})
SET(_extra_lib_CoreFlows ${CDMATH_LIBRARIES} ${PETSC_LIBRARIES} ) #
ADD_EXECUTABLE(CoreFlowsMainExe ${MAIN_SOURCES}) #
SET_TARGET_PROPERTIES(CoreFlowsMainExe PROPERTIES COMPILE_FLAGS "") #
-TARGET_LINK_LIBRARIES(CoreFlowsMainExe CoreFlows ${_extra_lib_CoreFlows}) #
+TARGET_LINK_LIBRARIES(CoreFlowsMainExe CoreFlowsLibs ${_extra_lib_CoreFlows}) #
INSTALL(TARGETS CoreFlowsMainExe DESTINATION bin) #
#
configure_file(
utilitaire_algebre.cxx
)
-ADD_LIBRARY(CoreFlows SHARED ${src_models_CXX})
-target_link_libraries(CoreFlows ${CDMATH_LIBRARIES} ${PETSC_LIBRARIES} ${SLEPC_LIBRARIES})
+ADD_LIBRARY(CoreFlowsLibs SHARED ${src_models_CXX})
+target_link_libraries(CoreFlowsLibs ${CDMATH_LIBRARIES} ${PETSC_LIBRARIES} ${SLEPC_LIBRARIES})
-INSTALL(TARGETS CoreFlows DESTINATION lib)
+INSTALL(TARGETS CoreFlowsLibs DESTINATION lib)
SET(_extra_lib_SWIG ${CDMATH_LIBRARIES} ${PETSC_LIBRARIES} ${SLEPC_LIBRARIES})
+IF (${CMAKE_VERSION} VERSION_LESS "3.8.0")
+ SWIG_ADD_MODULE(CoreFlows python CoreFlows.i)
+ELSE (${CMAKE_VERSION} VERSION_LESS "3.8.0")
+ SWIG_ADD_LIBRARY(CoreFlows TYPE SHARED LANGUAGE python SOURCES CoreFlows.i)
+ENDIF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
-SWIG_ADD_MODULE(CoreFlows python CoreFlows.i)
-SWIG_LINK_LIBRARIES(CoreFlows ${Python_LIBRARIES} ${_extra_lib_SWIG} CoreFlows ${PETSC_LIBRARIES} ${SLEPC_LIBRARIES})
+SWIG_LINK_LIBRARIES(CoreFlows ${Python_LIBRARIES} ${_extra_lib_SWIG} CoreFlowsLibs ${PETSC_LIBRARIES} ${SLEPC_LIBRARIES})
INSTALL(TARGETS _CoreFlows DESTINATION lib/coreflows)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/CoreFlows.py DESTINATION bin/coreflows)