Skip to content
Avinal Kumar edited this page Jul 29, 2021 · 12 revisions

Welcome to the fossology wiki!

The GSoC Blog

https://gsoc.avinal.space

Working branch

https://github.com/avinal/fossology/tree/avinal/feat/cmake-buildsystem

Working Discussion and issue

Test the new system (only GCC with make and ninja tested for now)

  1. Install CMake if you haven't already (minimum 3.10 required)
    sudo apt install CMake # for Debian based systems
  1. check out this branch (avinal/feat/cmake-buildsystem) inside fossology repo
    git checkout avinal/feat/cmake-buildsystem
  1. Run the following commands in succession
    mkdir build && cd build
    cmake .. # default on most systems is make
    make -j<no-of-parallel-process> # default is zero

or with ninja

    mkdir build && cd build
    cmake .. -GNinja
    ninja -j<no-of-parallel-process> # default is 10
  1. Or you can directly run the following command to build and install
    mkdir build && cd build
    cmake .. # default on most systems is make
    make install -j<no-of-parallel-process> # default is zero

or with ninja

    mkdir build && cd build
    cmake .. -GNinja
    ninja install -j<no-of-parallel-process> # default depends on system (10+ generally)

NOTE: The targets will be installed in the /usr/local directory. To change that please change this line https://github.com/avinal/fossology/blob/ef82e6d6522e941441e3873b9b35acb1847d1da2/cmake/SetDefaults.cmake#L63 to your preferred installation directory.

  1. Some targets are not built by default, you can manually trigger their build by running make ,target-name> or ninja <target-name>. You can list all the targets by running make help or ninja -t targets.

  2. For packaging run make package or ninja package or simply cpack will do the job.

  3. Testing configurations are not built by default. please use -DTESTING=ON flag at configure time. Prefer testing inside a particular agent itself, overall testing is not implemented yet.

  4. You can also use CMake EXtension for VS Code for seamlessly populating and building targets. Can also use gitpod.io for quick setup

What is Working

  • Builds all the agents except ninka, demomode, example_wc_agent, regexscan, I have added the initial configuration for them but haven't updated with the latest progress.
  • Installs a working FOSSology instance
  • Both Unix Makefiles and Ninja generators are tested and working
  • You can use parallel build jobs to build faster (approx 100% faster)
  • Each agent can be separately built and installed. Single targets can also be compiled
  • Packaging is working (WIP)

Known bugs

  • Coverage builds may or may not work for all agents
  • Symbolic links are not included in the packages
  • There are some redundant files being installed
Clone this wiki locally