Skip to main content

A c/c++ cli

Project description


A cli tool for c/c++ development.


First, you should clone [google/googletest] and install CMake in your local machine.


$ pip install clic

How to use

After googletest installed, you need to export a environment GTEST_PATH in your bash config file (e.g .bashrc, .zshrc, etc).

$ clic mycpp
$ cd mycpp

$ tree -L 1
├── CMakeLists.txt
├── build
├── lib
├── solution.h
└── test.cpp

2 directories, 3 files

$ cd build
$ cmake .. && make
$ ./mycpp

❯ ./mycpp
Running main() from ~/mycpp/lib/googletest/googletest/src/
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from test
[ RUN      ] test.INIT
Hello mycpp
[       OK ] test.INIT (0 ms)
[----------] 1 test from test (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 1 test.

If you don't want to export the GTEST_PATH environment, you can specify the path in the same command as follows:

$ GTEST_PATH=/path/to/cloned/googletest clic my-new-app
$ cd my-new-app

Now, Enjoy your simple c/c++ project. 😉

In the test.cpp file, you can write your tests.

#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "solution.h"

#include <iostream>

TEST(test, INIT) {
    /* write your test */

and in the solution.h file you can write your solution.

#ifndef MY_SOLUTION__
#define MY_SOLUTION__

class Solution {
    /* write your solution */

#endif /* ifndef MY_SOLUTION__ */

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for clic, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size clic-0.1.3-py3-none-any.whl (5.4 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page