+13
−0
+1
−0
+1
−1
cmake/tpl/FindTPLPNG.cmake
0 → 100644
+13
−0
Loading
Squash branch 'libpng' into 'master' * Fixes unused parameter compiler warnings in FileType_PNG * Fixes unused PRIVATE module variable in FileType_PNG Description: The module private variable `emesg` was only used when TPL_ENABLE_PNG was enabled. If Futility was built without PNG this variable was not used, however, we still output an exception from the module. This modifies that one exception mesg to first use `emesg` so that we avoid the "Unused PRIVATE module variable" warning. * Completes initial implementation of FileType_PNG Description: The initial implementation provides the PNGFileType derived type with essentially 4 methods for use in client code: 1. init() Initializes the object 2. writeImageData() writes a png file from RGB data 3. readImageData() reads a PNG and makes an array of RGB data 4. clear() destroys the object Because it extends BaseFileType it must also provide implementations for fopen, fclose, and fdelete. All the above are unit tested. The initial implementation only supports reading/writing 8-bit RGB png files from From fortran integer arrays. This has not been tested for portability, but works for gcc-8.5.0 and libpng-1.6.39 VERA-dev Issue # - 5408 * Implements most of FileType_PNG and unit test Description: This commit implements most of the capability of FileType_PNG. It implements everything but readImageData. The implemented routines are unit tested. Test passes except for testReadImageData because it is not implemented. Only tested on gcc-8.5.0. Portability testing will come later. VERA-dev Issue # - 5408 * Adds a fortran unit test for libpng compatability Description: This commit defines a new unit test, testTPLPNGf. It is equivalent to testTPLPNG.c but written in Fortran. This test, tests specifically the ability to call the necessary C interfaces to use libpng directly from Fortran. It produces an output file outputf.png that should be identical to output.png VERA-dev Issue # - 5408 * Creates module and test for PNGFileType class Description: This commit creates a couple new files to interface with libpng and modifies the build system to process these. Specifically it: - Creates the FileType_PNG module for PNGFileType. This inherits from the BaseFileType. The class API and C interfaces are preliminary. It is a stub class for the moment. - Creates a stub unit test for the new class. Test purposely fails. - New source file and test always build (regardless of succesffuly finding libpng) VERA-dev Issue # - 5408 * Adds unit test for testing usability of libpng Description: This commit adds one unit test, testTPLPNG, that is a simple C program that writes a png image using the libpng API. When this test fails to build or run successfully, it indicates a problem with the libpng found during configure and how Futility intends to use libpng. VERA-dev Issue # - 5408 * Defines a TPL for libpng in build system Description This commit does the following: - Creates a tribits find module for libpng - Adds messaging about libpng during configure - Defines preprocessor symbol FUTILITY_HAVE_PNG when tpl is found - Defines an optional dependency for Futility on libpng VERA-dev Issue # - 5408 Adds support for reading/writing png data https://code.ornl.gov/vera/vera-dev/-/issues/5408 **Developer Checklist:** - [x] Have you done a self-review after creating the merge request? - [x] Have you filled in the Merge Request information (title, description) thoroughly? - [x] Have you updated the relevant tickets (if this MR is linked to any VERA-dev tickets)? - [x] Have you addressed all suggested feedback and commented on it to let the reviewer know? (Do not resolve discussions that the reviewer started) **Reviewer Checklist:** - [x] Have you confirmed all discussions were adequately addressed and resolved them all? - [x] Does it conform to formatting guidelines? - [x] Are there adequate and clear comments? - [x] Is the design clean and sensible? - [x] Are the changes optimal/efficient? - [x] Were sufficient DBC checks added? - [x] Are there unit tests? (if necessary) - [x] Is the MR description clear, including a link to the VERA-Dev issue if appropriate? **PSM Checklist** - [x] Have you confirmed that all discussions were addressed, or that follow-on issues have been created for them? - [x] Have you confirmed sufficient testing was conducted? - [x] Does this impact other repositories? - [x] Does the MR have an adequate description? - [x] If the MR has multiple commits, did you set the MR to squash merge? See merge request https://code.ornl.gov/futility/Futility/-/merge_requests/416