Code Monkey home page Code Monkey logo

cdb's Introduction

Build Status codecov

Installation

From PPA

sudo add-apt-repository ppa:nbelakovski/cdb
sudo apt-get update
sudo apt-get install cdb

From source

git clone https://github.com/nbelakovski/cdb.git
cd cdb
mkdir build
cd build
cmake ..
make
sudo make install

This will install just two files, /usr/bin/cdb and /usr/share/cmake/cdb/cdbConfig.cmake

Usage

In a CMakeLists.txt file, add

find_package(cdb)

and then call the break function anywhere you want to stop executation and examine the environment

break()

You can see an example in the test/ folder.

break() will take all of the cmake variables active in the current context and pass them to the cdb program which will let you examine them. Exiting from that examination will continue the cmake process.

To list all variables currently known, type dump

) dump
CMAKE_AR=/usr/bin/ar
CMAKE_AUTOMOC_COMPILER_PREDEFINES=ON
CMAKE_AUTOMOC_MACRO_NAMES=Q_OBJECT
CMAKE_BASE_NAME=g++
...

To get the value of a particular variable, use ${var}

) ${CMAKE_AR}
/usr/bin/ar
) ${CMAKE_ARC}
CMAKE_ARC not found

Notes

This is a pretty basic debugger. All it can do is show you some CMake variables, get some target properties*, and help you evaluate some if statements*.

It will need a pretty sincere overhaul to work more closely with CMake internals if it will ever get to the point where you'll be able to set variables, step through execution, etc.

* Coming in a future release

cdb's People

Contributors

nbelakovski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

fucora

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.