-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sarif: gate SARIF behind a VCPKG feature
- Loading branch information
Showing
7 changed files
with
63 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
# Copyright (c) 2024-present, Trail of Bits, Inc. All rights reserved. | ||
|
||
find_package(nlohmann_json CONFIG REQUIRED) | ||
if (GAP_ENABLE_SARIF) | ||
find_package(nlohmann_json CONFIG REQUIRED) | ||
|
||
add_headers(sarif GAP_SARIF_HEADERS | ||
sarif.hpp | ||
) | ||
add_headers(sarif GAP_SARIF_HEADERS | ||
sarif.hpp | ||
) | ||
|
||
add_sources(sarif GAP_SARIF_SOURCES | ||
sarif.cpp | ||
) | ||
add_sources(sarif GAP_SARIF_SOURCES | ||
sarif.cpp | ||
) | ||
|
||
add_gap_static_library(gap-sarif "${GAP_SARIF_HEADERS}" "${GAP_SARIF_SOURCES}") | ||
target_link_libraries(gap-sarif PUBLIC nlohmann_json::nlohmann_json) | ||
add_gap_static_library(gap-sarif "${GAP_SARIF_HEADERS}" "${GAP_SARIF_SOURCES}") | ||
target_link_libraries(gap-sarif PUBLIC nlohmann_json::nlohmann_json) | ||
target_compile_definitions(gap-sarif PUBLIC GAP_ENABLE_SARIF=1) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
# Copyright 2024, Trail of Bits, Inc. All rights reserved. | ||
|
||
add_gap_test(test-gap-sarif | ||
definitions.cpp | ||
) | ||
if (GAP_ENABLE_SARIF) | ||
add_gap_test(test-gap-sarif | ||
sarif.cpp | ||
) | ||
|
||
target_link_libraries(test-gap-sarif | ||
PUBLIC | ||
gap-sarif | ||
) | ||
target_link_libraries(test-gap-sarif | ||
PUBLIC | ||
gap-sarif | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters