cmake: reduce port includes

TESTING:

```
./autogen.sh && ./configure --enable-reproducible-build --prefix=$PWD/ac_repro && make install
cmake -B b2 -DWOLFSSL_REPRODUCIBLE_BUILD=yes -DCMAKE_INSTALL_PREFIX:PATH=$PWD/cmake_repro && cmake --build b2 && cmake --install b2
diff -rq ac_repro cmake_repro
```
This commit is contained in:
elms
2021-10-29 16:42:15 -07:00
parent 6ff1e0b037
commit 37eec1ed19

View File

@@ -1662,24 +1662,23 @@ include(GNUInstallDirs)
set(HEADER_EXCLUDE set(HEADER_EXCLUDE
"internal.h" "internal.h"
"pic32mz-crypt.h" "cyassl/ctaocrypt/port"
"ti-hash.h" "wolfssl/wolfcrypt/port/nrf51.h"
"ti-ccm.h" "wolfssl/wolfcrypt/port/arm"
"nrf51.h" "wolfssl/wolfcrypt/port/cypress"
"ksdk_port.h" "wolfssl/wolfcrypt/port/Espressif"
"dcp_port.h" "wolfssl/wolfcrypt/port/iotsafe"
"xil-sha3.h" "wolfssl/wolfcrypt/port/nxp"
"caam_driver.h" "wolfssl/wolfcrypt/port/pic"
"wolfcaam.h" "wolfssl/wolfcrypt/port/Renesas"
"wolfcaam_sha.h" "wolfssl/wolfcrypt/port/silabs"
"stm32.h" "wolfssl/wolfcrypt/port/st"
"stsafe.h" "wolfssl/wolfcrypt/port/ti"
"esp32-cry.h" "wolfssl/wolfcrypt/port/xilinx"
"cryptoCell.h"
"renesas-tsip-crypt.h"
"psoc6_crypto.h"
) )
# TODO: add support for the various ports
# For distro build don't install options.h. # For distro build don't install options.h.
# It depends on the architecture and conflicts with Multi-Arch. # It depends on the architecture and conflicts with Multi-Arch.
if(BUILD_DISTRO) if(BUILD_DISTRO)
@@ -1689,29 +1688,23 @@ endif()
if(NOT BUILD_CRYPTOAUTHLIB) if(NOT BUILD_CRYPTOAUTHLIB)
list(APPEND HEADER_EXCLUDE list(APPEND HEADER_EXCLUDE
"wolfssl/wolfcrypt/port/atmel/atmel.h") "wolfssl/wolfcrypt/port/atmel")
endif() endif()
if(NOT BUILD_AFALG) if(NOT BUILD_AFALG)
list(APPEND HEADER_EXCLUDE list(APPEND HEADER_EXCLUDE
"wolfssl/wolfcrypt/port/af_alg/afalg_hash.h" "wolfssl/wolfcrypt/port/af_alg")
"wolfssl/wolfcrypt/port/af_alg/wc_afalg.h")
endif() endif()
if(NOT BUILD_KCAPI) if(NOT BUILD_KCAPI)
list(APPEND HEADER_EXCLUDE list(APPEND HEADER_EXCLUDE
"wolfssl/wolfcrypt/port/kcapi/wc_kcapi.h" "wolfssl/wolfcrypt/port/kcapi"
"wolfssl/wolfcrypt/port/kcapi/kcapi_hash.h"
"wolfssl/wolfcrypt/port/kcapi/kcapi_hmac.h"
"wolfssl/wolfcrypt/port/kcapi/kcapi_ecc.h"
"wolfssl/wolfcrypt/port/kcapi/kcapi_rsa.h"
"wolfssl/wolfcrypt/port/kcapi/kcapi_dh.h"
) )
endif() endif()
if(NOT BUILD_DEVCRYPTO) if(NOT BUILD_DEVCRYPTO)
list(APPEND HEADER_EXCLUDE list(APPEND HEADER_EXCLUDE
"wolfssl/wolfcrypt/port/devcrypto/wc_devcrypto.h") "wolfssl/wolfcrypt/port/devcrypto")
endif() endif()
if(NOT BUILD_ASYNCCRYPT) if(NOT BUILD_ASYNCCRYPT)
@@ -1726,27 +1719,38 @@ if(NOT BUILD_PKCS11)
) )
endif() endif()
if(NOT BUILD_CAVIUM) if(NOT BUILD_CAVIUM AND NOT BUILD_OCTEON_SYNC)
list(APPEND HEADER_EXCLUDE list(APPEND HEADER_EXCLUDE
"wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h") "wolfssl/wolfcrypt/port/cavium")
endif() else()
if(NOT BUILD_CAVIUM)
list(APPEND HEADER_EXCLUDE
"wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h")
endif()
if(NOT BUILD_OCTEON_SYNC) if(NOT BUILD_OCTEON_SYNC)
list(APPEND HEADER_EXCLUDE list(APPEND HEADER_EXCLUDE
"wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h" "wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h"
) )
endif()
endif() endif()
if(NOT BUILD_INTEL_QA)
list(APPEND HEADER_EXCLUDE
"wolfssl/wolfcrypt/port/intel/quickassist.h"
"wolfssl/wolfcrypt/port/intel/quickassist_mem.h"
)
endif()
if(NOT BUILD_INTEL_QA_SYNC) if(NOT BUILD_INTEL_QA AND NOT BUILD_INTEL_QA_SYNC)
list(APPEND HEADER_EXCLUDE list(APPEND HEADER_EXCLUDE
"wolfssl/wolfcrypt/port/intel/quickassist_sync.h") "wolfssl/wolfcrypt/port/intel")
else()
if(NOT BUILD_INTEL_QA)
list(APPEND HEADER_EXCLUDE
"wolfssl/wolfcrypt/port/intel/quickassist.h"
"wolfssl/wolfcrypt/port/intel/quickassist_mem.h"
)
endif()
if(NOT BUILD_INTEL_QA_SYNC)
list(APPEND HEADER_EXCLUDE
"wolfssl/wolfcrypt/port/intel/quickassist_sync.h")
endif()
endif() endif()
if(NOT BUILD_SP) if(NOT BUILD_SP)
@@ -1767,11 +1771,7 @@ endif()
if(NOT BUILD_QNXCAAM) if(NOT BUILD_QNXCAAM)
list(APPEND HEADER_EXCLUDE list(APPEND HEADER_EXCLUDE
"wolfssl/wolfcrypt/port/caam/wolfcaam.h" "wolfssl/wolfcrypt/port/caam"
"wolfssl/wolfcrypt/port/caam/wolfcaam_sha.h"
"wolfssl/wolfcrypt/port/caam/wolfcaam_ecdsa.h"
"wolfssl/wolfcrypt/port/caam/wolfcaam_cmac.h"
"wolfssl/wolfcrypt/port/caam/wolfcaam_qnx.h"
) )
endif() endif()