5.6.7 : The CMakeLists.txt
First we manage the project name and the minimal cmake version for the file
1 2 |
project(AstericsHPC) cmake_minimum_required(VERSION 3.0) |
Then, we get the files used to build the module :
1 |
file(GLOB moduleSrc "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/*.py") |
We call the cmake function to create a module :
1 |
createPythonModule(install_asterics_hpc_module setup.py ${moduleSrc})
|
Finally, we add a dependency to ensure the module will not be installed before the asterics_hpc library is done :
1 |
add_dependencies(install_asterics_hpc_module asterics_hpc)
|
The full allocMatrixWrapper.cpp file :
1 2 3 4 5 6 7 8 |
project(AstericsHPC) cmake_minimum_required(VERSION 3.0) file(GLOB moduleSrc "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/*.py") createPythonModule(install_asterics_hpc_module setup.py ${moduleSrc}) add_dependencies(install_asterics_hpc_module asterics_hpc) |
You can download it here.