Add Makefiles enabeling memory-analyzer and tests
This commit is contained in:
parent
46ca388ab9
commit
767a3858a7
|
@ -139,6 +139,8 @@ set_target_properties(
|
||||||
json-symtab-language
|
json-symtab-language
|
||||||
langapi
|
langapi
|
||||||
linking
|
linking
|
||||||
|
memory-analyzer
|
||||||
|
memory-analyzer-lib
|
||||||
pointer-analysis
|
pointer-analysis
|
||||||
solvers
|
solvers
|
||||||
symtab2gb
|
symtab2gb
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
default: clean tests.log
|
||||||
|
|
||||||
|
clean:
|
||||||
|
find -name '*.exe' -execdir $(RM) '{}' \;
|
||||||
|
find -name '*.out' -execdir $(RM) '{}' \;
|
||||||
|
$(RM) tests.log
|
||||||
|
|
||||||
|
test:
|
||||||
|
-@ln -s goto-cc ../../src/goto-cc/goto-gcc
|
||||||
|
@../test.pl -p -c ../compile_example.sh
|
||||||
|
|
||||||
|
tests.log: ../test.pl
|
||||||
|
-@ln -s goto-cc ../../src/goto-cc/goto-gcc
|
||||||
|
@../test.pl -p -c ../compile_example.sh
|
||||||
|
|
||||||
|
show:
|
||||||
|
@for dir in *; do \
|
||||||
|
if [ -d "$$dir" ]; then \
|
||||||
|
vim -o "$$dir/*.c" "$$dir/*.out"; \
|
||||||
|
fi; \
|
||||||
|
done;
|
|
@ -104,4 +104,5 @@ add_subdirectory(goto-instrument)
|
||||||
add_subdirectory(goto-analyzer)
|
add_subdirectory(goto-analyzer)
|
||||||
add_subdirectory(goto-diff)
|
add_subdirectory(goto-diff)
|
||||||
add_subdirectory(goto-harness)
|
add_subdirectory(goto-harness)
|
||||||
|
add_subdirectory(memory-analyzer)
|
||||||
add_subdirectory(symtab2gb)
|
add_subdirectory(symtab2gb)
|
||||||
|
|
|
@ -17,6 +17,7 @@ DIRS = analyses \
|
||||||
json-symtab-language \
|
json-symtab-language \
|
||||||
langapi \
|
langapi \
|
||||||
linking \
|
linking \
|
||||||
|
memory-analyzer \
|
||||||
pointer-analysis \
|
pointer-analysis \
|
||||||
solvers \
|
solvers \
|
||||||
symtab2gb \
|
symtab2gb \
|
||||||
|
@ -30,6 +31,7 @@ all: cbmc.dir \
|
||||||
goto-diff.dir \
|
goto-diff.dir \
|
||||||
goto-instrument.dir \
|
goto-instrument.dir \
|
||||||
goto-harness.dir \
|
goto-harness.dir \
|
||||||
|
memory-analyzer.dir \
|
||||||
symtab2gb.dir \
|
symtab2gb.dir \
|
||||||
# Empty last line
|
# Empty last line
|
||||||
|
|
||||||
|
@ -72,6 +74,8 @@ goto-diff.dir: languages goto-programs.dir pointer-analysis.dir \
|
||||||
|
|
||||||
goto-cc.dir: languages goto-programs.dir linking.dir
|
goto-cc.dir: languages goto-programs.dir linking.dir
|
||||||
|
|
||||||
|
memory-analyzer.dir: util.dir goto-programs.dir ansi-c.dir
|
||||||
|
|
||||||
symtab2gb.dir: util.dir goto-programs.dir json-symtab-language.dir
|
symtab2gb.dir: util.dir goto-programs.dir json-symtab-language.dir
|
||||||
|
|
||||||
# building for a particular directory
|
# building for a particular directory
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Library
|
||||||
|
file(GLOB_RECURSE sources "*.cpp" "*.h")
|
||||||
|
list(REMOVE_ITEM sources
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/memory-analyzer_main.cpp
|
||||||
|
)
|
||||||
|
add_library(memory-analyzer-lib ${sources})
|
||||||
|
|
||||||
|
generic_includes(memory-analyzer-lib)
|
||||||
|
|
||||||
|
target_link_libraries(memory-analyzer-lib
|
||||||
|
ansi-c
|
||||||
|
goto-programs
|
||||||
|
util
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Executable
|
||||||
|
add_executable(memory-analyzer memory_analyzer_main.cpp)
|
||||||
|
target_link_libraries(memory-analyzer memory-analyzer-lib)
|
|
@ -0,0 +1,37 @@
|
||||||
|
SRC = analyze_symbol.cpp\
|
||||||
|
gdb_api.cpp \
|
||||||
|
memory_analyzer_main.cpp \
|
||||||
|
memory_analyzer_parse_options.cpp
|
||||||
|
# Empty last line
|
||||||
|
|
||||||
|
INCLUDES= -I ..
|
||||||
|
|
||||||
|
LIBS = \
|
||||||
|
../ansi-c/ansi-c$(LIBEXT) \
|
||||||
|
../goto-programs/goto-programs$(LIBEXT) \
|
||||||
|
../linking/linking$(LIBEXT) \
|
||||||
|
../util/util$(LIBEXT) \
|
||||||
|
../big-int/big-int$(LIBEXT) \
|
||||||
|
../langapi/langapi$(LIBEXT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CLEANFILES = memory-analyzer$(EXEEXT)
|
||||||
|
|
||||||
|
include ../config.inc
|
||||||
|
include ../common
|
||||||
|
|
||||||
|
all: memory-analyzer$(EXEEXT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
memory-analyzer$(EXEEXT): $(OBJ)
|
||||||
|
$(LINKBIN)
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: memory-analyser-mac-signed
|
||||||
|
|
||||||
|
memory-analyser-mac-signed: memory-analyzer$(EXEEXT)
|
||||||
|
codesign -v -s $(OSX_IDENTITY) memory-analyzer$(EXEEXT)
|
|
@ -1,3 +1,4 @@
|
||||||
|
ansi-c
|
||||||
goto-programs
|
goto-programs
|
||||||
util
|
util
|
||||||
sys
|
sys
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
|
||||||
|
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" OR
|
||||||
|
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU"
|
||||||
|
)
|
||||||
|
# private is overwritten in the gdb_api test cases
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-keyword-macro")
|
||||||
|
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
|
# This would be the place to enable warnings for Windows builds, although
|
||||||
|
# config.inc doesn't seem to do that currently
|
||||||
|
endif()
|
||||||
|
|
||||||
file(GLOB_RECURSE sources "*.cpp" "*.h")
|
file(GLOB_RECURSE sources "*.cpp" "*.h")
|
||||||
|
|
||||||
file(GLOB_RECURSE testing_utils "testing-utils/*.cpp" "testing-utils/*.h")
|
file(GLOB_RECURSE testing_utils "testing-utils/*.cpp" "testing-utils/*.h")
|
||||||
|
|
Loading…
Reference in New Issue