Skip to content

Commit

Permalink
moved goal injector main executable
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelsamenezes committed Jun 25, 2024
1 parent 02dff8b commit 451eb07
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
5 changes: 0 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
add_subdirectory(goal-injector)

add_executable(instrumentator main.cpp)
target_include_directories(instrumentator
PRIVATE ${CLANG_INCLUDE_DIRS}
)
target_link_libraries(instrumentator PUBLIC frontend clangTooling clangAST clangIndex)
6 changes: 6 additions & 0 deletions src/goal-injector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ target_include_directories(frontend
)
set_target_properties(frontend PROPERTIES COMPILE_FLAGS "-fno-rtti")
target_link_libraries(frontend clangTooling clangAST clangIndex fmt::fmt)

add_executable(instrumentator main.cpp)
target_include_directories(instrumentator
PRIVATE ${CLANG_INCLUDE_DIRS}
)
target_link_libraries(instrumentator PUBLIC frontend clangTooling clangAST clangIndex)
11 changes: 11 additions & 0 deletions src/goal-injector/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <goal-injector/goal-injector.h>
#include <fstream>
#include <iostream>

int main(int argc, char **argv) {
if (argc != 2)
std::cerr << "./injector <input.c> <output.c>\n";
const std::ifstream input(argv[1]);
GoalInjector::RunGoalInjectorA(input, argv[2]);
return 0;
}
11 changes: 0 additions & 11 deletions src/main.cpp

This file was deleted.

0 comments on commit 451eb07

Please sign in to comment.