Skip to content

A simple tool to deal with circular dependencies in C/C++.

Notifications You must be signed in to change notification settings

nelimee/circinc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

circinc

A simple tool to deal with circular dependencies in C/C++.

Installation

Follow the steps below:

  1. Clone this git repository
git clone https://github.com/nelimeee/circinc.git
  1. Execute the cppan tool or edit the CMakeList.txt to link the dependencies. See sections cppan and Requirements for more explanations on the step.

  2. Compile the tool

mkdir build 
cd build
cmake ..
make
  1. (Optional) Add the generated executable to your path.

Requirements

The circinc tool needs

  1. A C++11 compiler
  2. CMake >= 3.2
  3. The following libraries:
    1. boost::wave
    2. boost::program_options
    3. boost::filesystem
    4. boost::graph
    5. boost::bimap

If you don't have cppan on your machine, you need to edit the CMakeList.txt to link by yourself all these libraries.

cppan

The C++ Archive Network tool is used to manage libraries. All the documentation is available on the previous link.

To update the libraries, just type:

cd circinc_directory
cppan

Usage

Command line options

You can list all the available options with --help :

circinc --help
Allowed options:

Generic options:
  -h [ --help ]                         Produce help message.
  -v [ --version ]                      Output the version and exit.

Configuration:
  -I [ --include-directory ] arg (=[current directory])
                                        Directories that will be searched for 
                                        user #included files.
  --sysinclude-directory arg (=[current directory])
                                        Directories that will be searched for 
                                        system #included files.

Examples

Output the version and exit.

circinc -v
CircInc 0.1 build with: 
        boost::wave 2.3.2
        boost::program_options 2
        boost::filesystem 3
        boost::graph Last version available

Search for circular #includes in a project.

circinc -I [project_path]/src \                          # Add src/ in the search path
        --include-directories [personnal_headers] \      # Add [personnal_header] in the search path
        --sysinclude-directories usr/include/c++/7.2.0 \ # Add usr/include/c++/7.2.0 in the system search path
        [project_path]/main.cpp                          # Entry point of the project

About

A simple tool to deal with circular dependencies in C/C++.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published