diff --git a/CMakeLists.txt b/CMakeLists.txt index 098c145..ec97876 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,12 @@ endif() add_subdirectory(core) add_subdirectory(coro) add_subdirectory(graph) -add_subdirectory(sarif) + +option(GAP_ENABLE_SARIF "Enable SARIF support" OFF) + +if (${GAP_ENABLE_SARIF}) + add_subdirectory(sarif) +endif() option(GAP_ENABLE_MLIR "Enable MLIR support" OFF) @@ -168,7 +173,10 @@ if (GAP_INSTALL) install_gap_target(gap-settings core) install_gap_target(gap-coro coro) install_gap_target(gap-graph graph) - install_gap_target(gap-sarif sarif) + + if (${GAP_ENABLE_SARIF}) + install_gap_target(gap-sarif sarif) + endif() if (${GAP_ENABLE_MLIR}) install_gap_target(gap-mlir mlir) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ed69d20..e39f24a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -34,7 +34,10 @@ endfunction() add_subdirectory(core) add_subdirectory(coro) add_subdirectory(graph) -add_subdirectory(sarif) + +if (${GAP_ENABLE_SARIF}) + add_subdirectory(sarif) +endif() if (${GAP_ENABLE_MLIR}) add_subdirectory(mlir) diff --git a/test/sarif/CMakeLists.txt b/test/sarif/CMakeLists.txt index fe0b48c..fd7492e 100644 --- a/test/sarif/CMakeLists.txt +++ b/test/sarif/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright 2024, Trail of Bits, Inc. All rights reserved. add_gap_test(test-gap-sarif - sarif.cpp + definitions.cpp ) target_link_libraries(test-gap-sarif