Skip to content

Commit

Permalink
cmake: enable to turn off sarif component
Browse files Browse the repository at this point in the history
  • Loading branch information
xlauko committed Aug 1, 2024
1 parent e5136e8 commit 1bbed88
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/sarif/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1bbed88

Please sign in to comment.