Giter Club home page Giter Club logo

acme-build-tool's Introduction

acme-build-tool

CMake-based build and package mgmnt tool for more effective c/c++ devel workflow and collab

acme-build-tool's People

Contributors

tamaskenez avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

acme-build-tool's Issues

add #acme namespace macro

//#acme namespace |<namespaces-with-double_colons>| { <C++ code> }
//#acme namespace |<namespaces-with-double_colons>| { | }

Example:

    //#acme namespace foo.bar { class Foo; }

expands to

    namespace foo { namespace bar { class Foo; }}

and

    //#acme namespace foo::bar {

expands to

    namespace foo { namespace bar {

and if foo.bar has the namespace alias foobar defined in the acme_find_package call, then

    //#acme namespace foobar }

expands to

    }}

add ad-hoc namespace alias

with acme_find_package you can specify an ALIAS (and also a source NAMESPACE).
For legacy packages we need to define multiple NAMESPACES-ALIASES either in acme_find_package or better, acme_namespace_alias

support superproject (acme_find_package - related)

When including multiple acme project in a superproject, it's a crucial problem with the traditional build system that the install step is performed after all subproject has been built. So if foo depends on bar, it won't find bar (or an outdated version) when foo is building since bar has not been installed yet.

We need to

  • add INTERFACE_INCLUDE_DIRECTORIES, INTERFACE_COMPILE_DEFINITIONS, INTERFACE_LINK_LIBRARIES target properties to the library targets to help dependent projects to use them while they are not installed
  • those properties will refer to the source tree and not the install location
  • acme_find_package should look for a target with the same name and use that if exists
  • because of the acme include header structure (dep projects always use #include "full/package/name/header.h" the whole feature can be supported only if
    • the dependent package's location in the superproject's dir is package path (company/foo/bar)
    • or we install it into a dot-separated dir below: company.foo.bar and rewrite the includes to use the dotted path (while processing the source files)
    • so when installing the public headers of a project we can also need to decide where to install them, into include/foo/bar or include/foo.bar. This could be determined automatically or by a variable (ACME_PUBLIC_HEADER_INSTALL_PREFIX=[FLAT|HIERARCHY]). The acme_find_package should be prepared for both and rewrite includes if needed.
  • The include paths rewrites could be spared by providing a include path generator macro (CMake also supports this by directory property IMPLICIT_DEPENDS_INCLUDE_TRANSFORM)

acme_add_files save list to file

This is useful when we add files by globbing. Also a use case:

  • during development, glob and save file list
  • at a point instead of glob, load the files. This should also be supported by acme_add_files

allow all cases (upper, original) in find package prefixes

FIND_PACKAGE_HANDLE_STANDARD_ARGS makes upper case prefixes so its very common that for a package to have XXX_FOUND + Xxx_FOUND + Xxx_INCLUDE_DIRS, and also Xxx_FOUND + XXX_INCLUDE_DIRS
just check for both upper and original case, use both, warn if ambiguous

remove installed files during build

projects (libraries) built withing superproject may be used by other subprojects during the build before they are installed
We need to delete installed files during the build to prevent finding them instead of the most current headers

finalize how to mark/handle public headers

In an ACME project's CMakeLists.txt we need to

  • decide which headers (or other files) we need to install into include/
  • where to install them below : there or into some subdir
  • what include paths should be added to access the public files
    • when building the project
    • or when this project is a library in a superproject and the dependent project needs to access the public headers from the source tree (because the install step has not been done yet)

Current situation:

    add_public_header(<file> [DESTINATION <destdir> ...)

Suggestion 1.

    add_public_headers(
        [FILES <file> [<file> ...] [RELATIVE <dir>]]
        [GLOB|GLOB_RECURSE] <glob-expr> [RELATIVE dir]]
        [TAGGED RELATIVE dir]

If you omit RELATIVE then it defaults to the top-level dir of the corresponding file set.
Relative file paths will be interpreted relative to current source dir.
By default the files tagged as //#acme public header are interpreted relative to the current source dir, so for example a file ${CMAKE_CURRENT_SOURCE_DIR}/foo.h will be installed into include//foo.h.
With the TAGGED form you can override the RELATIVE property (base dir) of the tagged files.
The hierarchy will be kept below the RELATIVE dirs (base dirs)
The base dirs will be added to the include_directories.

Use cases:

  • Add files tagged as //#acme public header (keeping their hierarchy)
    • relative to CMAKE_CURRENT_SOURCE_DIR (will be installed to include/)
    • or from CMAKE_CURRENT_SOURCE_DIR/include (will be installed to include/)
  • Add non-tagged (generated) files from CMAKE_CURRENT_BINARY_DIR (or its subfolder), install to include/
  • Add files from (specified by exact filenames or globbing, relative to a prefix in source tree, installed to include//rel-to-prefix/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.