Skip to content

Commit

Permalink
Merge pull request #221 from nasa/220-cffi_exclude-for-kmc-compilation
Browse files Browse the repository at this point in the history
KMC_CFFI_EXCLUDE Test Patch
  • Loading branch information
dccutrig authored Jan 23, 2024
2 parents 1a8a46f + 8d8c7ba commit 009cc19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ option(TEST_ENC "Tests - Encryption" OFF)

OPTION(KMC_MDB_RH "KMC-MDB-RedHat-Integration-Testing" OFF) #Disabled by default, enable with: -DKMC_MDB_RH=ON
OPTION(KMC_MDB_DB "KMC-MDB-Debian-Integration-Testing" OFF) #Disabled by default, enable with: -DKMC_MDB_DB=ON
OPTION(KMC_CFFI_EXCLUDE "KMC-Exclude-Problematic-CFFI-Code" OFF) #Disabled by default, enable with: -DKMC_CFFI_EXCLUDE=ON

#
# Build Flag Logic
Expand All @@ -59,10 +60,12 @@ endif()

IF(KMC_MDB_RH)
ADD_DEFINITIONS(-DKMC_MDB_RH)
ADD_DEFINITIONS(-DKMC_CFFI_EXCLUDE)
ENDIF(KMC_MDB_RH)

IF(KMC_MDB_DB)
ADD_DEFINITIONS(-DKMC_MDB_DB)
ADD_DEFINITIONS(-DKMC_CFFI_EXCLUDE)
ENDIF(KMC_MDB_DB)

if(SYSTEM_INSTALL)
Expand Down
2 changes: 2 additions & 0 deletions include/crypto_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
#include "common_types.h"
#else // Assume build outside of NOS3/cFS infrastructure
#include <stdint.h>
#ifndef KMC_CFFI_EXCLUDE // Exclude libraries that CFFI parser can’t process
#include <stdio.h>
#include <stdlib.h>
#endif
#endif

/*
** Definitions
Expand Down
2 changes: 1 addition & 1 deletion support/scripts/build_kmc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source $SCRIPT_DIR/env.sh

cmake $BASE_DIR -DCODECOV=1 -DDEBUG=1 -DCRYPTO_KMC=1 -DKEY_KMC=1 -DMC_DISABLED=1 -DSA_MARIADB=1 -DTEST=1 -DTEST_ENC=1 && make && make test
cmake $BASE_DIR -DCODECOV=1 -DDEBUG=1 -DCRYPTO_KMC=1 -DKEY_KMC=1 -DMC_DISABLED=1 -DSA_MARIADB=1 -DTEST=1 -DTEST_ENC=1 -DKMC_CFFI_EXCLUDE=1 && make && make test

0 comments on commit 009cc19

Please sign in to comment.