Setup: Valgrind Setup

Valgrind scripts for linux added
leak-logfile output in build directory
This commit is contained in:
Andreas Stallinger
2014-04-02 17:58:13 +02:00
parent 195e7bb574
commit 6afd52a3d2
4 changed files with 29 additions and 0 deletions
+10
View File
@@ -18,10 +18,20 @@ endif()
# Settings ---------------------------------------------------------------------
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
if (UNIX)
ADD_DEFINITIONS(
-std=c++11 # Or -std=c++0x
# Other flags
)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE})
else ()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
+1
View File
@@ -6,6 +6,7 @@
* QT 5.2.1
* CxxTest 4.3
* Valgrind 3.9.0(linux, macOS)
##### Environment Variables
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# Determine path to script
MY_PATH=`dirname "$0"`
cd $MY_PATH/..
# Build and run target
make -C build/Debug "$1" && valgrind --tool=memcheck --leak-check=yes --log-file=build/Debug/"$1".leaklog bin/Debug/"$1"
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# Determine path to script
MY_PATH=`dirname "$0"`
cd $MY_PATH/..
# Build and run target
make -C build/Release "$1" && valgrind --tool=memcheck --leak-check=yes --log-file=build/Release/"$1".leaklog bin/Release/"$1"