Skip to content

Instantly share code, notes, and snippets.

View bchretien's full-sized avatar
😺
I may be slow to respond.

Benjamin Chrétien bchretien

😺
I may be slow to respond.
  • France
View GitHub Profile
@bchretien
bchretien / CMakeLists.txt
Created September 14, 2014 16:33
CMake support for simpleSeparateCompilation
# CMake support for 0_Simple/simpleSeparateCompilation
# sample of the CUDA SDK.
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
FIND_PACKAGE(CUDA 5.0 REQUIRED)
SET(CUDA_SEPARABLE_COMPILATION ON)
SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-rdc=true")
SET(CUDA_VERBOSE_BUILD ON)
--- io/src/lzf_image_io.cpp 2014-09-08 03:03:01.925540518 -0400
+++ io/src/lzf_image_io.cpp 2014-09-08 03:10:55.382514407 -0400
@@ -198,7 +198,7 @@
catch (std::exception& e)
{}
- boost::property_tree::xml_writer_settings<char> settings ('\t', 1);
+ boost::property_tree::xml_writer_settings<std::string> settings = boost::property_tree::xml_writer_make_settings<std::string>('\t', 1);
pt.put (tag, parameter);
write_xml (filename, pt, std::locale (), settings);
#!/bin/sh
# Find libraries (and packages) that link to a library matching a given pattern.
# First argument: library folder (e.g. /opt/ros/hydro/lib)
# Second argument: library dependency (or pattern)
for lib in $(find $1 -name \*.so) ; do
res=`ldd -v $lib | grep $2`
if [ ! -z "$res" ]; then
echo "$res"
echo "`pacman -Qo $lib`"
fi
#!/usr/bin/env python2
import subprocess
import re
pkg_list = subprocess.check_output(['pacman','-Qii'])
pkg_list = re.split("\n\n", pkg_list)[:-1]
# List of dictionaries containing, for each package, its name and what it provides
pkg_info = list()
#!/bin/sh
# First argument: library folder (e.g. /opt/ros/hydro/lib)
# Second argument: mangled symbol (e.g. _ZN14openni_wrapper12OpenNIDevice15getSerialNumberEv)
for lib in $(find $1 -name \*.so) ; do
res=`nm -D $lib | grep $2 | grep -v " U "`
if [ ! -z "$res" ]; then
echo "$lib: $res"
fi
done