mirror of
https://github.com/lifting-bits/sleigh
synced 2026-06-21 13:56:12 +00:00
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e371046481 | |||
| e69a0323b7 | |||
| cf4a096a7f | |||
| a149784982 | |||
| 593ef2d5f3 | |||
| 3703123e79 | |||
| e8383e673b | |||
| eb22b705d9 | |||
| 264204577d | |||
| 521a606fa9 | |||
| 13392ebf97 | |||
| 4662552d17 | |||
| e4558db017 | |||
| b15f26bac8 | |||
| 274058b4d9 | |||
| b8e35dc652 | |||
| 72c58bc7e3 | |||
| 96b58968a7 | |||
| f152f04095 | |||
| 759fe7ff76 | |||
| 3ba6dd5a3e | |||
| dbc3dbd15f | |||
| 893c97711f | |||
| a66b0abf26 | |||
| f8f4b7e550 | |||
| a3dd5d5ca1 | |||
| d4e2eb5aa2 | |||
| cb86cb0c22 | |||
| f395ce311a | |||
| 8dfe626001 | |||
| 901efbb17e | |||
| c44e6ad2ab | |||
| 6ed111cc3b |
+18
-17
@@ -18,13 +18,14 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
build_type: [RelWithDebInfo, Debug]
|
||||
release: [stable, HEAD]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Git User for Applying Patches
|
||||
# See this thread for more details https://github.community/t/github-actions-bot-email-address/17204/5
|
||||
@@ -35,6 +36,7 @@ jobs:
|
||||
- name: Install Linux system dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
clang \
|
||||
rpm \
|
||||
@@ -43,21 +45,20 @@ jobs:
|
||||
graphviz
|
||||
|
||||
# Minimum supported CMake version testing
|
||||
curl -L "https://github.com/Kitware/CMake/releases/download/v3.21.0/cmake-3.21.0-linux-$(uname -m).sh" -o /tmp/cmake-install.sh
|
||||
curl -L "https://github.com/Kitware/CMake/releases/download/v3.15.0/cmake-3.15.0-Linux-$(uname -m).sh" -o /tmp/cmake-install.sh
|
||||
mkdir -p "${HOME}/.local"
|
||||
bash /tmp/cmake-install.sh --skip-license --exclude-subdir "--prefix=${HOME}/.local"
|
||||
|
||||
# Use Homebrew for latest build tool version for use in CI
|
||||
brew install \
|
||||
ccache \
|
||||
ninja
|
||||
ccache
|
||||
|
||||
- name: Install macOS system dependencies
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
echo "MACOSX_DEPLOYMENT_TARGET=10.15" >> ${GITHUB_ENV}
|
||||
brew install \
|
||||
ccache \
|
||||
ninja \
|
||||
cmake \
|
||||
doxygen \
|
||||
graphviz
|
||||
@@ -71,7 +72,7 @@ jobs:
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
|
||||
- name: Update the cache (ccache)
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: "${{ github.workspace }}/ccache"
|
||||
key: ${{ steps.cache_key.outputs.VALUE }}_ccache_${{ steps.cache_key.outputs.timestamp }}
|
||||
@@ -99,9 +100,6 @@ jobs:
|
||||
cmake \
|
||||
-S . \
|
||||
-B build \
|
||||
-G Ninja \
|
||||
-DCMAKE_C_COMPILER=clang \
|
||||
-DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
@@ -115,6 +113,7 @@ jobs:
|
||||
run: |
|
||||
cmake \
|
||||
--build build \
|
||||
-j 2 \
|
||||
-v
|
||||
|
||||
- name: Run the tests
|
||||
@@ -125,6 +124,7 @@ jobs:
|
||||
run: |
|
||||
cmake \
|
||||
--build build \
|
||||
-j 2 \
|
||||
--target sleighexample_runner
|
||||
|
||||
- name: Run the install target
|
||||
@@ -136,13 +136,14 @@ jobs:
|
||||
working-directory: tests/find_package
|
||||
run: |
|
||||
cmake -B build -S . -Dsleigh_DIR=${{ github.workspace }}/install/lib/cmake/sleigh
|
||||
cmake --build build
|
||||
cmake --build build -j 2
|
||||
./build/sleigh_test
|
||||
|
||||
- name: Create the packages
|
||||
run: |
|
||||
cmake \
|
||||
--build build \
|
||||
-j 2 \
|
||||
--target package
|
||||
|
||||
- name: Test the DEB package
|
||||
@@ -155,7 +156,7 @@ jobs:
|
||||
-B find_package_build
|
||||
|
||||
cmake \
|
||||
--build find_package_build --verbose
|
||||
--build find_package_build -j 2 --verbose
|
||||
|
||||
- name: Locate the packages (RelWithDebInfo only)
|
||||
if: matrix.build_type == 'RelWithDebInfo'
|
||||
@@ -178,41 +179,41 @@ jobs:
|
||||
# DEB Package
|
||||
- name: Upload the DEB package artifact (RelWithDebInfo only)
|
||||
if: matrix.build_type == 'RelWithDebInfo' && runner.os == 'Linux'
|
||||
uses: actions/upload-artifact@v2.3.1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.package_locations.outputs.DEB_PACKAGE_NAME }}
|
||||
path: ${{ steps.package_locations.outputs.DEB_PACKAGE_PATH }}
|
||||
|
||||
- name: Release DEB package artifact (RelWithDebInfo only)
|
||||
uses: softprops/action-gh-release@v0.1.14
|
||||
if: matrix.build_type == 'RelWithDebInfo' && runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/')
|
||||
if: matrix.build_type == 'RelWithDebInfo' && runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/') && matrix.release == 'stable'
|
||||
with:
|
||||
files: ${{ steps.package_locations.outputs.DEB_PACKAGE_PATH }}
|
||||
|
||||
# RPM Package
|
||||
- name: Upload the RPM package artifact (RelWithDebInfo only)
|
||||
if: matrix.build_type == 'RelWithDebInfo' && runner.os == 'Linux'
|
||||
uses: actions/upload-artifact@v2.3.1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.package_locations.outputs.RPM_PACKAGE_NAME }}
|
||||
path: ${{ steps.package_locations.outputs.RPM_PACKAGE_PATH }}
|
||||
- name: Release RPM package artifact (RelWithDebInfo only)
|
||||
uses: softprops/action-gh-release@v0.1.14
|
||||
if: matrix.build_type == 'RelWithDebInfo' && runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/')
|
||||
if: matrix.build_type == 'RelWithDebInfo' && runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/') && matrix.release == 'stable'
|
||||
with:
|
||||
files: ${{ steps.package_locations.outputs.RPM_PACKAGE_PATH }}
|
||||
|
||||
# TGZ Package
|
||||
- name: Upload the TGZ package artifact (RelWithDebInfo only)
|
||||
if: matrix.build_type == 'RelWithDebInfo'
|
||||
uses: actions/upload-artifact@v2.3.1
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.package_locations.outputs.TGZ_PACKAGE_NAME }}
|
||||
path: ${{ steps.package_locations.outputs.TGZ_PACKAGE_PATH }}
|
||||
|
||||
- name: Release TGZ package artifact (RelWithDebInfo only)
|
||||
uses: softprops/action-gh-release@v0.1.14
|
||||
if: matrix.build_type == 'RelWithDebInfo' && startsWith(github.ref, 'refs/tags/')
|
||||
if: matrix.build_type == 'RelWithDebInfo' && startsWith(github.ref, 'refs/tags/') && matrix.release == 'stable'
|
||||
with:
|
||||
files: ${{ steps.package_locations.outputs.TGZ_PACKAGE_PATH }}
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/setup-python@v3
|
||||
with:
|
||||
# Use oldest supported version for maximum script compatibility
|
||||
python-version: '3.7'
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
|
||||
- name: Create PR
|
||||
if: steps.head_update.outputs.did_update
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
title: Update Ghidra HEAD to commit ${{ steps.head_update.outputs.short_sha }}
|
||||
commit-message: Bump Ghidra HEAD commit ${{ steps.head_update.outputs.short_sha }}
|
||||
|
||||
+35
-16
@@ -6,7 +6,7 @@
|
||||
# the LICENSE file found in the root directory of this source tree.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.21.0)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
# Sets "library_root" variable for decompiler cpp root directory
|
||||
# Sets "ghidra_version" for numeric version number
|
||||
@@ -133,6 +133,11 @@ set(sleigh_deccore_source_list
|
||||
"${library_root}/opbehavior.cc"
|
||||
"${library_root}/paramid.cc"
|
||||
)
|
||||
if("${sleigh_GHIDRA_RELEASE_TYPE}" STREQUAL "HEAD")
|
||||
list(APPEND sleigh_deccore_source_list
|
||||
"${library_root}/unionresolve.cc"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(sleigh_extra_source_list
|
||||
"${library_root}/callgraph.cc"
|
||||
@@ -191,7 +196,7 @@ add_library(sleigh_settings INTERFACE)
|
||||
add_library(sleigh::sleigh_settings ALIAS sleigh_settings)
|
||||
|
||||
target_compile_features(sleigh_settings INTERFACE
|
||||
cxx_std_17
|
||||
cxx_std_11
|
||||
)
|
||||
|
||||
set(sleigh_SPEC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/sleigh/specfiles/")
|
||||
@@ -315,9 +320,16 @@ if(sleigh_ENABLE_TESTS)
|
||||
)
|
||||
|
||||
add_test(
|
||||
NAME ghidra_test_dbg
|
||||
NAME ghidra_unittest_dbg
|
||||
COMMAND ghidra_test_dbg -sleighpath "${CMAKE_CURRENT_BINARY_DIR}" unittests
|
||||
)
|
||||
|
||||
add_test(
|
||||
NAME ghidra_datatest_dbg
|
||||
COMMAND ghidra_test_dbg -sleighpath "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
-path "${ghidrasource_SOURCE_DIR}/Ghidra/Features/Decompiler/src/decompile/datatests"
|
||||
datatests
|
||||
)
|
||||
endif()
|
||||
|
||||
#
|
||||
@@ -454,7 +466,7 @@ if(sleigh_ENABLE_DOCUMENTATION)
|
||||
set(documentation_output "${CMAKE_CURRENT_BINARY_DIR}/doc")
|
||||
# Always run this target because we have no source file tracking for incremental builds
|
||||
add_custom_target(sleigh_documentation
|
||||
COMMAND "${CMAKE_COMMAND}" -E rm -rf "${library_root}/../doc" "${documentation_output}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove_directory "${library_root}/../doc" "${documentation_output}"
|
||||
COMMAND Doxygen::doxygen Doxyfile
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${library_root}/../doc" "${documentation_output}"
|
||||
COMMENT "sleigh: Generating the Doxygen documentation"
|
||||
@@ -494,17 +506,23 @@ include(cmake/modules/sleighCompile.cmake)
|
||||
# Example: '<ghidra_source_prefix>/Ghidra/Processors/8051/data/languages/mx51.slaspec'
|
||||
foreach(spec_file ${spec_file_list})
|
||||
# Get 'mx51'
|
||||
cmake_path(GET spec_file STEM LAST_ONLY spec_name)
|
||||
get_filename_component(spec_name "${spec_file}" NAME_WLE)
|
||||
|
||||
# Get '<ghidra_source_prefix>/Ghidra/Processors/8051/data/languages'
|
||||
cmake_path(GET spec_file PARENT_PATH spec_dir)
|
||||
get_filename_component(spec_dir "${spec_file}" DIRECTORY)
|
||||
|
||||
# Get '8051/data/languages'
|
||||
cmake_path(RELATIVE_PATH spec_dir
|
||||
BASE_DIRECTORY "${ghidrasource_SOURCE_DIR}/${spec_files_dir_prefix}"
|
||||
OUTPUT_VARIABLE spec_proc_dir
|
||||
file(RELATIVE_PATH spec_proc_dir
|
||||
"${ghidrasource_SOURCE_DIR}/${spec_files_dir_prefix}"
|
||||
"${spec_dir}"
|
||||
)
|
||||
|
||||
# Add relative spec processor directory for later processing
|
||||
list(APPEND spec_dirs ${spec_proc_dir})
|
||||
|
||||
# Get '8051'
|
||||
cmake_path(GET spec_proc_dir PARENT_PATH proc_name)
|
||||
cmake_path(GET proc_name PARENT_PATH proc_name)
|
||||
get_filename_component(proc_name "${spec_proc_dir}" DIRECTORY)
|
||||
get_filename_component(proc_name "${proc_name}" DIRECTORY)
|
||||
|
||||
set(spec_build_log "${spec_files_build_log_dir}/${spec_name}_build.log")
|
||||
# Combine back again for the build directory output like
|
||||
@@ -513,15 +531,13 @@ foreach(spec_file ${spec_file_list})
|
||||
# '<build_prefix>/Ghidra/Processors/8051/data/languages/mx51.sla'
|
||||
set(spec_out "${spec_out_dir}/${spec_name}.sla")
|
||||
|
||||
# Add relative spec processor directory for later processing
|
||||
list(APPEND spec_dirs "${spec_proc_dir}")
|
||||
|
||||
string(REPLACE "." "_" spec_target_name ${spec_name})
|
||||
set(spec_target "sleigh_spec_${spec_target_name}")
|
||||
|
||||
# Compile the sla file
|
||||
sleigh_compile(
|
||||
TARGET "${spec_target}"
|
||||
COMPILER "$<TARGET_FILE:sleigh::sleigh_opt>"
|
||||
SLASPEC "${spec_file}"
|
||||
LOG_FILE "${spec_build_log}"
|
||||
OUT_FILE "${spec_out}"
|
||||
@@ -537,8 +553,11 @@ list(REMOVE_DUPLICATES spec_dirs)
|
||||
foreach(spec_dir ${spec_dirs})
|
||||
set(spec_src_dir "${ghidrasource_SOURCE_DIR}/${spec_files_dir_prefix}/${spec_dir}")
|
||||
set(spec_out_dir "${spec_files_root_dir}/${spec_dir}")
|
||||
cmake_path(GET spec_dir PARENT_PATH proc_name)
|
||||
cmake_path(GET proc_name PARENT_PATH proc_name)
|
||||
|
||||
# Get the processor directory name
|
||||
get_filename_component(proc_name "${spec_dir}" DIRECTORY)
|
||||
get_filename_component(proc_name "${proc_name}" DIRECTORY)
|
||||
|
||||
# Copy all other files from the slaspec source directory:
|
||||
# '<ghidra_source_prefix>/Ghidra/Processors/8051/data/languages'
|
||||
# NOTE: This only copies the directory once, so you will need to remove the
|
||||
|
||||
@@ -11,6 +11,7 @@ cmake_minimum_required(VERSION 3.15)
|
||||
# Takes the following required arguments:
|
||||
#
|
||||
# TARGET: Named CMake target for performing sleigh compilation
|
||||
# COMPILER: Path to sleigh compiler executable
|
||||
# SLASPEC: Path to slaspec file
|
||||
# LOG_FILE: File to write logs
|
||||
# OUT_FILE: Compiled sleigh output file (should be in build directory somewhere)
|
||||
@@ -20,7 +21,7 @@ cmake_minimum_required(VERSION 3.15)
|
||||
# rebuild the sleigh file then you must delete the OUT_FILE
|
||||
function(sleigh_compile)
|
||||
set(options)
|
||||
set(oneValueArgs TARGET SLASPEC LOG_FILE OUT_FILE)
|
||||
set(oneValueArgs TARGET COMPILER SLASPEC LOG_FILE OUT_FILE)
|
||||
set(multiValueArgs)
|
||||
cmake_parse_arguments(parsed
|
||||
"${options}"
|
||||
@@ -54,7 +55,7 @@ function(sleigh_compile)
|
||||
MAIN_DEPENDENCY "${spec_file}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${spec_out_dir}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${spec_build_log_dir}"
|
||||
COMMAND "$<TARGET_FILE:sleigh::sleigh_opt>" ${spec_file} "${spec_out}" > "${spec_build_log}" 2>&1
|
||||
COMMAND "${parsed_COMPILER}" ${spec_file} "${spec_out}" > "${spec_build_log}" 2>&1
|
||||
WORKING_DIRECTORY "${spec_dir}"
|
||||
COMMENT "sleigh: Compiling the '${spec_name}' spec file (logs written in '${spec_build_log}')"
|
||||
BYPRODUCTS "${spec_build_log}"
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
From 031d9830abe8517540389672fd22dc479e46d696 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Kilmer <eric.d.kilmer@gmail.com>
|
||||
Date: Sun, 13 Feb 2022 12:59:42 -0500
|
||||
Subject: [PATCH] Small improvements to C++ decompiler testing from CLI
|
||||
|
||||
* Fixes argument parsing to accept more than one option for specifying
|
||||
paths.
|
||||
|
||||
* Return a non-zero exit code (clamped to max value 255, even if more
|
||||
than 255 tests fail) indicating number of failed tests. This is
|
||||
helpful when running in a script (like in CI) to detect failures
|
||||
instead of detecting failures through manual visual inspection of
|
||||
output text.
|
||||
---
|
||||
.../Decompiler/src/decompile/cpp/test.cc | 42 ++++++++++++++-----
|
||||
.../Decompiler/src/decompile/cpp/test.hh | 2 +-
|
||||
.../src/decompile/cpp/testfunction.cc | 3 +-
|
||||
.../src/decompile/cpp/testfunction.hh | 2 +-
|
||||
4 files changed, 36 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc
|
||||
index e81f2564a..ebc049c29 100644
|
||||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc
|
||||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include "test.hh"
|
||||
+
|
||||
+#include <algorithm>
|
||||
+
|
||||
#include "libdecomp.hh"
|
||||
|
||||
vector<UnitTest *> UnitTest::tests;
|
||||
@@ -21,7 +24,8 @@ vector<UnitTest *> UnitTest::tests;
|
||||
/// Run all the tests unless a non-empty set of names is passed in.
|
||||
/// In which case, only the named tests in the set are run.
|
||||
/// \param testNames is the set of names
|
||||
-void UnitTest::run(set<string> &testNames)
|
||||
+/// \return number of failed tests
|
||||
+int UnitTest::run(set<string> &testNames)
|
||||
|
||||
{
|
||||
int total = 0;
|
||||
@@ -42,6 +46,7 @@ void UnitTest::run(set<string> &testNames)
|
||||
}
|
||||
std::cerr << "==============================" << std::endl;
|
||||
std::cerr << passed << "/" << total << " tests passed." << std::endl;
|
||||
+ return total - passed;
|
||||
}
|
||||
|
||||
/// Create list of the absolute path of all tests to be run
|
||||
@@ -85,7 +90,7 @@ int main(int argc, char **argv) {
|
||||
set<string> dataTestNames;
|
||||
string dirname("../datatests");
|
||||
string sleighdirname("../../../../../../..");
|
||||
- if (argc > 0) {
|
||||
+ while (argc > 0) {
|
||||
string command(argv[0]);
|
||||
if (command == "-path") {
|
||||
dirname = argv[1];
|
||||
@@ -109,30 +114,47 @@ int main(int argc, char **argv) {
|
||||
argv += 1;
|
||||
argc -= 1;
|
||||
}
|
||||
- }
|
||||
- if (argc > 0) {
|
||||
- string command(argv[0]);
|
||||
- if (command == "unittests") {
|
||||
+ else if (command == "unittests") {
|
||||
runUnitTests = true;
|
||||
runDataTests = false; // Run only unit tests
|
||||
unitTestNames.insert(argv + 1,argv + argc);
|
||||
+ break;
|
||||
}
|
||||
else if (command == "datatests") {
|
||||
runUnitTests = false; // Run only data-tests
|
||||
runDataTests = true;
|
||||
dataTestNames.insert(argv + 1,argv + argc);
|
||||
+ break;
|
||||
}
|
||||
else {
|
||||
- cout << "USAGE: ghidra_test [-path <datatestdir>] [[unittests|datatests] [testname1 testname2 ...]]" << endl;
|
||||
+ cout << "USAGE: ghidra_test [-usesleighenv] [-sleighpath <sleighdir>] [-path <datatestdir>] [[unittests|datatests] [testname1 testname2 ...]]" << endl;
|
||||
+ return -1;
|
||||
}
|
||||
}
|
||||
startDecompilerLibrary(sleighdirname.c_str());
|
||||
- if (runUnitTests)
|
||||
- UnitTest::run(unitTestNames);
|
||||
+
|
||||
+ // Keep track of failed tests as return code to indicate failures, clamped at
|
||||
+ // max 255 value
|
||||
+ int failedTests = 0;
|
||||
+ if (runUnitTests) {
|
||||
+ int errors = UnitTest::run(unitTestNames);
|
||||
+ // Clamp at 255 max return code
|
||||
+ failedTests = std::min(
|
||||
+ failedTests +
|
||||
+ (errors < 0 ? 255 : std::min(errors, 255)),
|
||||
+ 255);
|
||||
+ }
|
||||
if (runDataTests) {
|
||||
vector<string> testFiles;
|
||||
gatherDataTests(dirname,dataTestNames,testFiles);
|
||||
cout << endl << endl;
|
||||
- FunctionTestCollection::runTestFiles(testFiles,cout);
|
||||
+ int errors = FunctionTestCollection::runTestFiles(testFiles,cout);
|
||||
+ // Clamp at 255 max return code
|
||||
+ failedTests = std::min(
|
||||
+ failedTests +
|
||||
+ (errors < 0 ? 255 : std::min(errors, 255)),
|
||||
+ 255);
|
||||
}
|
||||
+
|
||||
+ return failedTests;
|
||||
}
|
||||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/test.hh b/Ghidra/Features/Decompiler/src/decompile/cpp/test.hh
|
||||
index 8b762c5b1..a138f511d 100644
|
||||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/test.hh
|
||||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/test.hh
|
||||
@@ -54,7 +54,7 @@ struct UnitTest {
|
||||
tests.push_back(this);
|
||||
}
|
||||
|
||||
- static void run(std::set<std::string> &testNames); ///< Run all the instantiated tests
|
||||
+ static int run(std::set<std::string> &testNames); ///< Run all the instantiated tests
|
||||
};
|
||||
|
||||
|
||||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.cc
|
||||
index 66f8d3fa2..c136a964b 100644
|
||||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.cc
|
||||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.cc
|
||||
@@ -304,7 +304,7 @@ void FunctionTestCollection::runTests(list<string> &lateStream)
|
||||
/// Run through all XML files in the given list, processing each in turn.
|
||||
/// \param testFiles is the given list of test files
|
||||
/// \param s is the output stream to print results to
|
||||
-void FunctionTestCollection::runTestFiles(const vector<string> &testFiles,ostream &s)
|
||||
+int FunctionTestCollection::runTestFiles(const vector<string> &testFiles,ostream &s)
|
||||
|
||||
{
|
||||
int4 totalTestsApplied = 0;
|
||||
@@ -344,4 +344,5 @@ void FunctionTestCollection::runTestFiles(const vector<string> &testFiles,ostrea
|
||||
if (iter == failures.end()) break;
|
||||
}
|
||||
}
|
||||
+ return totalTestsApplied - totalTestsSucceeded;
|
||||
}
|
||||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.hh b/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.hh
|
||||
index 52125b401..46abd6bce 100644
|
||||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.hh
|
||||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.hh
|
||||
@@ -91,7 +91,7 @@ class FunctionTestCollection {
|
||||
void restoreXml(DocumentStorage &store,const Element *el); ///< Load tests from a \<decompilertest> tag.
|
||||
void restoreXmlOldForm(DocumentStorage &store,const Element *el); ///< Load tests from \<binaryimage> tag.
|
||||
void runTests(list<string> &lateStream); ///< Run the script and perform the tests
|
||||
- static void runTestFiles(const vector<string> &testFiles,ostream &s); ///< Run tests for each listed file
|
||||
+ static int runTestFiles(const vector<string> &testFiles,ostream &s); ///< Run tests for each listed file
|
||||
};
|
||||
|
||||
#endif
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
From d0b7efa848938b880332a729629c31a724dbf855 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Kilmer <eric.d.kilmer@gmail.com>
|
||||
Date: Mon, 1 Nov 2021 17:10:18 -0400
|
||||
Subject: [PATCH] Fix arg parsing in sleigh C++ test runner
|
||||
|
||||
---
|
||||
Ghidra/Features/Decompiler/src/decompile/cpp/test.cc | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc
|
||||
index e81f2564a..7c5557158 100644
|
||||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc
|
||||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc
|
||||
@@ -85,7 +85,7 @@ int main(int argc, char **argv) {
|
||||
set<string> dataTestNames;
|
||||
string dirname("../datatests");
|
||||
string sleighdirname("../../../../../../..");
|
||||
- if (argc > 0) {
|
||||
+ while (argc > 0) {
|
||||
string command(argv[0]);
|
||||
if (command == "-path") {
|
||||
dirname = argv[1];
|
||||
@@ -109,21 +109,23 @@ int main(int argc, char **argv) {
|
||||
argv += 1;
|
||||
argc -= 1;
|
||||
}
|
||||
- }
|
||||
- if (argc > 0) {
|
||||
- string command(argv[0]);
|
||||
- if (command == "unittests") {
|
||||
+ else if (command == "unittests") {
|
||||
runUnitTests = true;
|
||||
runDataTests = false; // Run only unit tests
|
||||
unitTestNames.insert(argv + 1,argv + argc);
|
||||
+ argv += 1;
|
||||
+ argc -=1;
|
||||
}
|
||||
else if (command == "datatests") {
|
||||
runUnitTests = false; // Run only data-tests
|
||||
runDataTests = true;
|
||||
dataTestNames.insert(argv + 1,argv + argc);
|
||||
+ argv += 1;
|
||||
+ argc -=1;
|
||||
}
|
||||
else {
|
||||
cout << "USAGE: ghidra_test [-path <datatestdir>] [[unittests|datatests] [testname1 testname2 ...]]" << endl;
|
||||
+ return -1;
|
||||
}
|
||||
}
|
||||
startDecompilerLibrary(sleighdirname.c_str());
|
||||
--
|
||||
2.33.1
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
From 031d9830abe8517540389672fd22dc479e46d696 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Kilmer <eric.d.kilmer@gmail.com>
|
||||
Date: Sun, 13 Feb 2022 12:59:42 -0500
|
||||
Subject: [PATCH] Small improvements to C++ decompiler testing from CLI
|
||||
|
||||
* Fixes argument parsing to accept more than one option for specifying
|
||||
paths.
|
||||
|
||||
* Return a non-zero exit code (clamped to max value 255, even if more
|
||||
than 255 tests fail) indicating number of failed tests. This is
|
||||
helpful when running in a script (like in CI) to detect failures
|
||||
instead of detecting failures through manual visual inspection of
|
||||
output text.
|
||||
---
|
||||
.../Decompiler/src/decompile/cpp/test.cc | 42 ++++++++++++++-----
|
||||
.../Decompiler/src/decompile/cpp/test.hh | 2 +-
|
||||
.../src/decompile/cpp/testfunction.cc | 3 +-
|
||||
.../src/decompile/cpp/testfunction.hh | 2 +-
|
||||
4 files changed, 36 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc
|
||||
index e81f2564a..ebc049c29 100644
|
||||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc
|
||||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include "test.hh"
|
||||
+
|
||||
+#include <algorithm>
|
||||
+
|
||||
#include "libdecomp.hh"
|
||||
|
||||
vector<UnitTest *> UnitTest::tests;
|
||||
@@ -21,7 +24,8 @@ vector<UnitTest *> UnitTest::tests;
|
||||
/// Run all the tests unless a non-empty set of names is passed in.
|
||||
/// In which case, only the named tests in the set are run.
|
||||
/// \param testNames is the set of names
|
||||
-void UnitTest::run(set<string> &testNames)
|
||||
+/// \return number of failed tests
|
||||
+int UnitTest::run(set<string> &testNames)
|
||||
|
||||
{
|
||||
int total = 0;
|
||||
@@ -42,6 +46,7 @@ void UnitTest::run(set<string> &testNames)
|
||||
}
|
||||
std::cerr << "==============================" << std::endl;
|
||||
std::cerr << passed << "/" << total << " tests passed." << std::endl;
|
||||
+ return total - passed;
|
||||
}
|
||||
|
||||
/// Create list of the absolute path of all tests to be run
|
||||
@@ -85,7 +90,7 @@ int main(int argc, char **argv) {
|
||||
set<string> dataTestNames;
|
||||
string dirname("../datatests");
|
||||
string sleighdirname("../../../../../../..");
|
||||
- if (argc > 0) {
|
||||
+ while (argc > 0) {
|
||||
string command(argv[0]);
|
||||
if (command == "-path") {
|
||||
dirname = argv[1];
|
||||
@@ -109,30 +114,47 @@ int main(int argc, char **argv) {
|
||||
argv += 1;
|
||||
argc -= 1;
|
||||
}
|
||||
- }
|
||||
- if (argc > 0) {
|
||||
- string command(argv[0]);
|
||||
- if (command == "unittests") {
|
||||
+ else if (command == "unittests") {
|
||||
runUnitTests = true;
|
||||
runDataTests = false; // Run only unit tests
|
||||
unitTestNames.insert(argv + 1,argv + argc);
|
||||
+ break;
|
||||
}
|
||||
else if (command == "datatests") {
|
||||
runUnitTests = false; // Run only data-tests
|
||||
runDataTests = true;
|
||||
dataTestNames.insert(argv + 1,argv + argc);
|
||||
+ break;
|
||||
}
|
||||
else {
|
||||
- cout << "USAGE: ghidra_test [-path <datatestdir>] [[unittests|datatests] [testname1 testname2 ...]]" << endl;
|
||||
+ cout << "USAGE: ghidra_test [-usesleighenv] [-sleighpath <sleighdir>] [-path <datatestdir>] [[unittests|datatests] [testname1 testname2 ...]]" << endl;
|
||||
+ return -1;
|
||||
}
|
||||
}
|
||||
startDecompilerLibrary(sleighdirname.c_str());
|
||||
- if (runUnitTests)
|
||||
- UnitTest::run(unitTestNames);
|
||||
+
|
||||
+ // Keep track of failed tests as return code to indicate failures, clamped at
|
||||
+ // max 255 value
|
||||
+ int failedTests = 0;
|
||||
+ if (runUnitTests) {
|
||||
+ int errors = UnitTest::run(unitTestNames);
|
||||
+ // Clamp at 255 max return code
|
||||
+ failedTests = std::min(
|
||||
+ failedTests +
|
||||
+ (errors < 0 ? 255 : std::min(errors, 255)),
|
||||
+ 255);
|
||||
+ }
|
||||
if (runDataTests) {
|
||||
vector<string> testFiles;
|
||||
gatherDataTests(dirname,dataTestNames,testFiles);
|
||||
cout << endl << endl;
|
||||
- FunctionTestCollection::runTestFiles(testFiles,cout);
|
||||
+ int errors = FunctionTestCollection::runTestFiles(testFiles,cout);
|
||||
+ // Clamp at 255 max return code
|
||||
+ failedTests = std::min(
|
||||
+ failedTests +
|
||||
+ (errors < 0 ? 255 : std::min(errors, 255)),
|
||||
+ 255);
|
||||
}
|
||||
+
|
||||
+ return failedTests;
|
||||
}
|
||||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/test.hh b/Ghidra/Features/Decompiler/src/decompile/cpp/test.hh
|
||||
index 8b762c5b1..a138f511d 100644
|
||||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/test.hh
|
||||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/test.hh
|
||||
@@ -54,7 +54,7 @@ struct UnitTest {
|
||||
tests.push_back(this);
|
||||
}
|
||||
|
||||
- static void run(std::set<std::string> &testNames); ///< Run all the instantiated tests
|
||||
+ static int run(std::set<std::string> &testNames); ///< Run all the instantiated tests
|
||||
};
|
||||
|
||||
|
||||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.cc
|
||||
index 66f8d3fa2..c136a964b 100644
|
||||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.cc
|
||||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.cc
|
||||
@@ -304,7 +304,7 @@ void FunctionTestCollection::runTests(list<string> &lateStream)
|
||||
/// Run through all XML files in the given list, processing each in turn.
|
||||
/// \param testFiles is the given list of test files
|
||||
/// \param s is the output stream to print results to
|
||||
-void FunctionTestCollection::runTestFiles(const vector<string> &testFiles,ostream &s)
|
||||
+int FunctionTestCollection::runTestFiles(const vector<string> &testFiles,ostream &s)
|
||||
|
||||
{
|
||||
int4 totalTestsApplied = 0;
|
||||
@@ -344,4 +344,5 @@ void FunctionTestCollection::runTestFiles(const vector<string> &testFiles,ostrea
|
||||
if (iter == failures.end()) break;
|
||||
}
|
||||
}
|
||||
+ return totalTestsApplied - totalTestsSucceeded;
|
||||
}
|
||||
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.hh b/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.hh
|
||||
index 52125b401..46abd6bce 100644
|
||||
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.hh
|
||||
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.hh
|
||||
@@ -91,7 +91,7 @@ class FunctionTestCollection {
|
||||
void restoreXml(DocumentStorage &store,const Element *el); ///< Load tests from a \<decompilertest> tag.
|
||||
void restoreXmlOldForm(DocumentStorage &store,const Element *el); ///< Load tests from \<binaryimage> tag.
|
||||
void runTests(list<string> &lateStream); ///< Run the script and perform the tests
|
||||
- static void runTestFiles(const vector<string> &testFiles,ostream &s); ///< Run tests for each listed file
|
||||
+ static int runTestFiles(const vector<string> &testFiles,ostream &s); ///< Run tests for each listed file
|
||||
};
|
||||
|
||||
#endif
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -5,8 +5,6 @@ set(spec_file_list
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/68000/data/languages/68030.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/68000/data/languages/68040.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/68000/data/languages/coldfire.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/6805/data/languages/6805.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/6805/data/languages/6809.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/8048/data/languages/8048.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/8051/data/languages/80251.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/8051/data/languages/80390.slaspec"
|
||||
@@ -57,6 +55,9 @@ set(spec_file_list
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/HCS12/data/languages/HCS12.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/JVM/data/languages/JVM.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/M8C/data/languages/m8c.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/MC6800/data/languages/6805.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/MC6800/data/languages/6809.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/MC6800/data/languages/H6309.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/MCS96/data/languages/MCS96.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/MIPS/data/languages/mips32R6be.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/MIPS/data/languages/mips32R6le.slaspec"
|
||||
|
||||
@@ -5,8 +5,6 @@ set(spec_file_list
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/68000/data/languages/68030.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/68000/data/languages/68040.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/68000/data/languages/coldfire.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/6805/data/languages/6805.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/6805/data/languages/6809.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/8048/data/languages/8048.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/8051/data/languages/80251.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/8051/data/languages/80390.slaspec"
|
||||
@@ -57,6 +55,9 @@ set(spec_file_list
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/HCS12/data/languages/HCS12.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/JVM/data/languages/JVM.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/M8C/data/languages/m8c.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/MC6800/data/languages/6805.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/MC6800/data/languages/6809.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/MC6800/data/languages/H6309.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/MCS96/data/languages/MCS96.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/MIPS/data/languages/mips32R6be.slaspec"
|
||||
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/MIPS/data/languages/mips32R6le.slaspec"
|
||||
|
||||
@@ -10,12 +10,13 @@ set_property(CACHE sleigh_GHIDRA_RELEASE_TYPE PROPERTY STRINGS "stable" "HEAD")
|
||||
# **** Setup pinned git info ****
|
||||
|
||||
# Ghidra pinned stable version commit
|
||||
set(ghidra_version "10.1.2")
|
||||
set(ghidra_git_tag "63bb30ac8bee0e3ff34c9812d751edcfdc70dbe4")
|
||||
set(ghidra_version "10.1.3")
|
||||
set(ghidra_git_tag "Ghidra_10.1.3_build")
|
||||
set(ghidra_shallow TRUE)
|
||||
# pinned stable patches list
|
||||
set(ghidra_patches
|
||||
PATCH_COMMAND git am --ignore-space-change --ignore-whitespace --no-gpg-sign
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/patches/stable/0001-Fix-arg-parsing-in-sleigh-C-test-runner.patch"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/patches/stable/0001-Small-improvements-to-C-decompiler-testing-from-CLI.patch"
|
||||
)
|
||||
|
||||
# Ghidra pinned commits used for pinning last known working HEAD commit
|
||||
@@ -24,17 +25,19 @@ if("${sleigh_GHIDRA_RELEASE_TYPE}" STREQUAL HEAD)
|
||||
# TODO: CMake only likes numeric characters in the version string....
|
||||
set(ghidra_head_version "10.2")
|
||||
set(ghidra_version "${ghidra_head_version}")
|
||||
set(ghidra_head_git_tag "3eb03b1608b24aaae1cd1d5c86a5df36270ac54d")
|
||||
set(ghidra_head_git_tag "9c04807c8cbf3516ea4ff8c4321bc18d38f27661")
|
||||
set(ghidra_git_tag "${ghidra_head_git_tag}")
|
||||
set(ghidra_shallow FALSE)
|
||||
set(ghidra_patches
|
||||
PATCH_COMMAND git am --ignore-space-change --ignore-whitespace --no-gpg-sign
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/patches/stable/0001-Fix-arg-parsing-in-sleigh-C-test-runner.patch"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/patches/HEAD/0001-Small-improvements-to-C-decompiler-testing-from-CLI.patch"
|
||||
)
|
||||
string(SUBSTRING "${ghidra_git_tag}" 0 7 ghidra_short_commit)
|
||||
else()
|
||||
set(ghidra_short_commit "${ghidra_git_tag}")
|
||||
endif()
|
||||
|
||||
string(SUBSTRING "${ghidra_git_tag}" 0 7 ghidra_short_commit)
|
||||
|
||||
message(STATUS "Using Ghidra version ${ghidra_version} at commit ${ghidra_short_commit}")
|
||||
message(STATUS "Using Ghidra version ${ghidra_version} at git ref ${ghidra_short_commit}")
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
@@ -46,6 +49,7 @@ FetchContent_Declare(GhidraSource
|
||||
GIT_REPOSITORY https://github.com/NationalSecurityAgency/ghidra
|
||||
GIT_TAG ${ghidra_git_tag}
|
||||
GIT_PROGRESS TRUE
|
||||
GIT_SHALLOW ${ghidra_shallow}
|
||||
${ghidra_patches}
|
||||
)
|
||||
FetchContent_MakeAvailable(GhidraSource)
|
||||
|
||||
+12
-8
@@ -32,21 +32,25 @@ configure_file(
|
||||
@ONLY
|
||||
)
|
||||
|
||||
set(sleigh_support_source_list
|
||||
add_library(support
|
||||
Support.cpp
|
||||
${POST_CONFIGURE_FILE}
|
||||
"${POST_CONFIGURE_FILE}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/GhidraVersion.cpp"
|
||||
)
|
||||
|
||||
add_library(support
|
||||
${sleigh_support_source_list}
|
||||
)
|
||||
# Need to explicitly add this dependency because BYPRODUCTS doesn't work under
|
||||
# CMake 3.16 with GNU Makefiles
|
||||
add_dependencies(support check_git)
|
||||
|
||||
add_library(sleigh::support ALIAS support)
|
||||
|
||||
target_link_libraries(support PUBLIC
|
||||
sleigh::sleigh_settings
|
||||
target_compile_features(support PUBLIC
|
||||
cxx_std_17
|
||||
)
|
||||
|
||||
set_target_properties(support PROPERTIES
|
||||
INTERFACE_POSITION_INDEPENDENT_CODE ON
|
||||
)
|
||||
|
||||
target_include_directories(support PRIVATE
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
|
||||
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/support>"
|
||||
|
||||
@@ -18,4 +18,5 @@ add_executable(sleigh_test
|
||||
target_link_libraries(sleigh_test PRIVATE
|
||||
sleigh::sla
|
||||
sleigh::decomp
|
||||
sleigh::support
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user