mod_tile icon indicating copy to clipboard operation
mod_tile copied to clipboard

CMake build support

Open hummeltech opened this issue 2 years ago • 0 comments

This adds CMake build system support to mod_tile.

  • Added macOS building & testing support
  • Added FreeBSD building & testing support
  • Integrated mod_tile.so tests from GitHub Actions into CMake/CTest configuration
    • Also added a test for /dirty and /status
    • They can now easily be run locally with ctest:
      $ ctest -T test
      Test project /__w/mod_tile/mod_tile/build
            Start  1: gen_tile_test
       1/11 Test  #1: gen_tile_test ....................   Passed    2.20 sec
            Start  2: create_dirs
       2/11 Test  #2: create_dirs ......................   Passed    0.00 sec
            Start  3: start_renderd
       3/11 Test  #3: start_renderd ....................   Passed    0.11 sec
            Start  4: start_httpd
       4/11 Test  #4: start_httpd ......................   Passed    0.04 sec
            Start  5: download_tile
       5/11 Test  #5: download_tile ....................   Passed    0.21 sec
            Start  6: check_tile
       6/11 Test  #6: check_tile .......................   Passed    0.00 sec
            Start  7: dirty_tile
       7/11 Test  #7: dirty_tile .......................   Passed   10.02 sec
            Start  8: remove_tile
       8/11 Test  #8: remove_tile ......................   Passed    0.00 sec
            Start  9: stop_renderd
       9/11 Test  #9: stop_renderd .....................   Passed    0.01 sec
            Start 10: stop_httpd
      10/11 Test #10: stop_httpd .......................   Passed    0.01 sec
            Start 11: clear_dirs
      11/11 Test #11: clear_dirs .......................   Passed    0.01 sec
      
      100% tests passed, 0 tests failed out of 11
      
      Total Test time (real) =  12.61 sec
      
  • Coverage is now also supported when using CMake/CTest & gcc/g++
    • It can also easily be run locally with ctest (when built with CFLAGS/CXXFLAGS=--coverage):
      $ ctest -T coverage
      Performing coverage
         Processing coverage (each . represents one file):
          ..............................................
         Accumulating results (each . represents one file):
          ....................
              Covered LOC:         2653
              Not covered LOC:     3769
              Total LOC:           6422
              Percentage Coverage: 41.31%
      
  • LLVM (clang) building & testing support has also been added
    • Supported on all Linux distributions, as well as FreeBSD & macOS

hummeltech avatar Jun 01 '22 00:06 hummeltech