Skip to content

Modern CMake #413

@Shillaker

Description

@Shillaker

The CMake files in this project and its submodules are not up to scratch with modern CMake practices (as outlined here and here).

A to-do list of low-hanging fruit:

  • Remove all use of global functions like include_directories and link_directories
  • Add PUBLIC and PRIVATE to target properties and linking (using PRIVATE as default)
  • Remove use of source file globbing
  • Look for and avoid direct modification of CMAKE_CXX_FLAGS
  • Add aliases for Faasm/ Faabric libraries with faasm:: and faabric::
  • Remove spurious variables like LIB_FILES and HEADERS, instead list things directly in add_library where possible
  • Make sure we install all dependencies under CMAKE_INSTALL_PREFIX
  • Instead of target_link_directories separately in faabric_lib, add a link to CMAKE_INSTALL_PREFIX/include
  • Consider using a CMake linter like cmake-lint or polysquare-cmake-linter

The sgx directory is a law unto itself and can be excluded from this tidy-up for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions