BIKE and Picnic enablement for cygwin (#1001)

* BIKE and Picnic enablement for cygwin

* no doxygen support for cygwin
This commit is contained in:
Michael Baentsch 2021-05-18 06:17:05 +00:00 committed by GitHub
parent 530d7059b2
commit 92e6418b35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 5 deletions

View File

@ -146,8 +146,9 @@ add_subdirectory(src)
if(NOT OQS_BUILD_ONLY_LIB)
add_subdirectory(tests)
find_package(Doxygen)
if(DOXYGEN_FOUND)
if (NOT CYGWIN)
find_package(Doxygen)
if(DOXYGEN_FOUND)
set(DOXYFILE ${PROJECT_SOURCE_DIR}/docs/.Doxyfile)
add_custom_target(
gen_docs
@ -155,6 +156,7 @@ if(NOT OQS_BUILD_ONLY_LIB)
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate API documentation with Doxygen."
USES_TERMINAL)
endif()
endif()
if(NOT WIN32)

View File

@ -11,6 +11,13 @@ branches:
environment:
matrix:
- BUILD_SHARED: ON
COMPILER: cygwin
- BUILD_SHARED: OFF
COMPILER: cygwin
- BUILD_SHARED: ON
OQS_USE_OPENSSL: ON
COMPILER: cygwin
- BUILD_SHARED: OFF
COMPILER: msvc2019
- BUILD_SHARED: OFF
@ -37,13 +44,15 @@ build_script:
before_test:
- cmd: |-
SET "PATH=C:\Python37;C:\Python37\Scripts;%PATH%"
SET "PATH=C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%"
pip.exe install pytest pytest-xdist
test_script:
- cmd: |-
cd %APPVEYOR_BUILD_FOLDER%
set PATH=%cd%\build\bin;%PATH% && if not exist tmp (mkdir tmp) && python -m pytest --numprocesses=auto --verbose --ignore=tests/test_code_conventions.py --junitxml=build\test-results\pytest\test-results.xml
set PATH=%APPVEYOR_BUILD_FOLDER%\build\bin;c:\cygwin64\bin;%PATH%
if not exist tmp (mkdir tmp)
python -m pytest --numprocesses=auto -vv --maxfail=10 --ignore=tests/test_code_conventions.py --junitxml=build\test-results\pytest\test-results.xml
after_test:
- ps: |-

View File

@ -1,4 +1,9 @@
@echo off
IF %COMPILER%==cygwin (
@echo on
SET "PATH=C:\cywin64\bin;c:\cygwin64;%PATH%"
c:\cygwin64\bin\bash.exe -lc "setup-x86_64.exe -qnNdO -R C:/cygwin64 -l C:/cygwin/var/cache/setup -P openssl -P libssl-devel -P ninja -P cmake -P gcc && cd ${APPVEYOR_BUILD_FOLDER} && openssl version && cygcheck -c && pwd && mkdir build && cd build && cmake .. -GNinja -DCMAKE_C_COMPILER=gcc -DOQS_DIST_BUILD=ON -DOQS_ENABLE_SIG_SPHINCS=OFF -DOQS_ENABLE_SIG_RAINBOW=OFF -DBUILD_SHARED_LIBS=%BUILD_SHARED% -DOQS_USE_OPENSSL=%OQS_USE_OPENSSL% && ninja "
)
IF %COMPILER%==msys2 (
@echo on
SET "PATH=C:\msys64\mingw64\bin;%PATH%"

View File

@ -16,7 +16,8 @@ set(SRCS additional/decode.c
additional/aes_ctr_prf.c
additional/error.c)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
if ( (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") OR
(CMAKE_HOST_SYSTEM_NAME STREQUAL "CYGWIN") )
set(SRCS ${SRCS} additional/sampling_portable.c
additional/secure_decode_portable.c)
set(CPP_DEFS PORTABLE)

View File

@ -41,6 +41,11 @@ static inline uint64_t ATTR_CONST bswap64(uint64_t x) {
}
#endif
#if defined(__CYGWIN__)
#include <endian.h>
#define HAVE_HOSTSWAP
#endif
/* Linux / GLIBC */
#if defined(__linux__) || defined(__GLIBC__)
#include <endian.h>