Permalink
Browse files

Merge pull request #8 from insomniacslk/cmake

Merging branch Cmake into master
  • Loading branch information...
insomniacslk committed Mar 8, 2016
2 parents 501283c + ea77508 commit ffa9d3c306fb772e2c95963a94cdc386b0126206
View
@@ -1,4 +1,3 @@
*.o
.*.swp
*.pyc
*.so
View
@@ -1,6 +1,6 @@
[submodule "dependencies/jsoncpp"]
path = dependencies/jsoncpp
path = external/jsoncpp
url = https://github.com/open-source-parsers/jsoncpp.git
[submodule "dependencies/libtins"]
path = dependencies/libtins
path = external/libtins
url = https://github.com/mfontanini/libtins.git
View
@@ -1,8 +1,19 @@
language: cpp
script: make
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then .travis/install_dependencies_linux.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then .travis/install_dependencies_osx.sh ; fi
- mkdir build
- cd build
- cmake ..
script: make VERBOSE=1
after_script:
- ./dublin-traceroute
sudo: required
dist: trusty
os:
- linux
@@ -12,6 +23,11 @@ compiler:
- clang
- gcc
matrix:
exclude:
- os: osx
compiler: gcc
addons:
apt:
sources:
@@ -22,6 +38,8 @@ addons:
- llvm-3.6-dev
- clang-3.6
- libpcap-dev
- jsoncpp
- libtins
coverity_scan:
# GitHub project metadata
@@ -37,7 +55,11 @@ addons:
# build_command_prepend: ./configure
# The command that will be added as an argument to "cov-build" to compile your project for analysis,
build_command: make
build_command:
- mkdir build
- cd build
- cmake ..
- make
# Pattern to match selecting branches that will run analysis. We recommend leaving this set to 'coverity_scan'.
# Take care in resource usage, and consider the build frequency allowances per
@@ -47,6 +69,7 @@ addons:
install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" = "clang++" ]; then export CXX="clang++-3.6"; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$CXX" = "g++" ]; then export CXXFLAGS="-stdlib=libstdc++"; fi
env:
global:
@@ -0,0 +1,19 @@
#!/bin/bash
# install libtins
git clone https://github.com/mfontanini/libtins.git
cd libtins
mkdir build
cd build
cmake ..
make
sudo make install
# install jsoncpp
git clone https://github.com/open-source-parsers/jsoncpp.git
cd jsoncpp
mkdir build
cd build
cmake .. -DBUILD_SHARED_LIBS=on
make
sudo make install
@@ -0,0 +1,6 @@
#!/bin/sh
brew update
brew install --HEAD libtins
brew uninstall json-c
brew install jsoncpp
View
@@ -0,0 +1,33 @@
cmake_minimum_required (VERSION 2.8)
project (dublin-traceroute)
set (dublin-traceroute_VERSION_MAJOR_1)
set (dublin-traceroute_VERSION_MINOR_0)
include_directories("${PROJECT_SOURCE_DIR}/include")
add_library(dublintraceroute SHARED
src/common.cc
src/dublin_traceroute.cc
src/hop.cc
src/traceroute_results.cc
)
find_package (Threads)
add_executable(dublin-traceroute src/main.cc)
target_link_libraries (dublin-traceroute ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(dublin-traceroute dublintraceroute)
target_link_libraries(dublintraceroute tins)
target_link_libraries(dublintraceroute jsoncpp)
add_dependencies(dublin-traceroute dublintraceroute)
set_property(TARGET dublintraceroute PROPERTY CXX_STANDARD 11)
set_property(TARGET dublin-traceroute PROPERTY CXX_STANDARD 11)
install(TARGETS dublin-traceroute dublintraceroute
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
)
install(DIRECTORY include/dublintraceroute DESTINATION include)
View
@@ -1,7 +1,4 @@
cmake
a recent enough C++11 compiler (gcc >= 4.6 or clang >= 3.3)
libpcap-dev
libtins >= 3 (or use the one provided here)
python-dev
python-pygraphviz
python-tabulate
libtins >= 3.3
View
173 Makefile

This file was deleted.

Oops, something went wrong.
Submodule jsoncpp deleted from beae99
Submodule libtins deleted from 5d4131
@@ -82,7 +82,8 @@ due.
Dublin Traceroute is written in C++11 on top of a beautiful network packet sniffing and
crafting library, [libtins](https://libtins.github.io).
Dublin Traceroute also features a Python extension on top of the C++ core if you
prefer.
prefer. The bindings now live in a separate repository, see
[python-dublin-traceroute](https://github.com/insomniacslk/python-dublin-traceroute) .
See the [examples](examples.md) to see Dublin Traceroute at work.
@@ -133,17 +134,18 @@ git clone https://github.com/insomniacslk/dublin-traceroute.git
source code, but in short you need:
* cmake
* gcc >= 4.6 or clang >= 3.3
* gcc >= 4.7 or clang >= 3.3
* libpcap-dev
* libtins >= 3 (or use the one provided by Dublin Traceroute)
* python-dev (if you want to build the Python extension)
* python-pygraphviz (to plot graphs from the Python extension)
* python-tabulate (to print the traceroute output to the console)
* libtins >= 3.3
* jsoncpp
* Build it
```bash
cd dublin-traceroute
mkdir build
cd build
cmake ..
make
```
Oops, something went wrong.

0 comments on commit ffa9d3c

Please sign in to comment.