srcML / srcSlice

Lightweight tool for slicing
34 stars 16 forks source link

Test make target won't link #34

Closed rudiejd closed 2 months ago

rudiejd commented 2 years ago

The test binary won't link since srcml is not included in the path. Fixing this would probably require modifying the CMake script to require a developer installation of srcML or having srcML as another dependency like srcSAX. Below is the error when trying to make:

[ 61%] Linking CXX executable ../bin/srcslice
[ 61%] Built target srcslice
[ 66%] Building CXX object test/CMakeFiles/testsrcslice.dir/srcslicetest.cpp.o
/home/jd/git/srcSlice/test/srcslicetest.cpp:1:10: fatal error: srcml.h: No such file or directory
    1 | #include <srcml.h>
      |          ^~~~~~~~~
compilation terminated.
make[2]: *** [test/CMakeFiles/testsrcslice.dir/build.make:76: test/CMakeFiles/testsrcslice.dir/srcslicetest.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:252: test/CMakeFiles/testsrcslice.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
EndermanSUPREME commented 2 months ago

Hi! While modifying the CMake script is a possibility, srcSlice is a srcML tool meaning srcSlice does depend on srcML libraries. srcSlice also takes in srcML output files as a parameter in the command.

For running srcSlice first you will create a srcML output file by running:

  1. srcml [input file] -o [output file] --position 2.) ./srcslice [output file].

If you install srcML onto your local machine and try building srcSlice again you shouldn't run into any issues!

You can acquire a download from: