JonMcCullough / HemePure_tools

BSD 3-Clause "New" or "Revised" License
2 stars 4 forks source link

Add CMake build system #3

Open ivan-pi opened 1 year ago

ivan-pi commented 1 year ago

Here is a CMake build for the collection of Hemepure tools that require compilation. Due to issue #2, the voxelizer is currently inside an if-block that was turned off.

To test the build I used:

CXX=g++-12 cmake .. -DBUILD_VOXELIZER=OFF

Palabos is fetched automatically from the University of Geneva repository. Alternatively, it could be extracted from your tarball:

    set(palabos_SOURCE_DIR ${CMAKE_BINARY_DIR}/palabos)
    file(ARCHIVE_EXTRACT 
        INPUT ${CMAKE_SOURCE_DIR}/voxelizer/palabos.tar.gz
        DESTINATION ${palabos_SOURCE_DIR}
    )

The choice for one or the other could be done with a build flag.

Should the Python scripts also be installed? This could be achieved with install(PROGRAMS files ...) or install(DIRECTORY ...)

Also closes #1.