improve Windows crosscompile handling (#1236)

This commit is contained in:
Michael Baentsch 2022-06-29 07:40:32 +02:00 committed by GitHub
parent c0db3d9ce3
commit 7d7fd33879
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -9,7 +9,11 @@ if(NOT COMPILE_RESULT)
message(FATAL_ERROR "Could not compile .CMake/detect_gcc_clang_intrinsics.c" ${COMPILE_OUTPUT})
endif()
if(NOT RUN_RESULT EQUAL 0)
message(FATAL_ERROR ".CMake/detect_gcc_clang_intrinsics.c returned exit code: " ${RUN_RESULT})
if(CMAKE_CROSSCOMPILING)
message(STATUS "Detecting language features in cross-compiling mode impossible. Setting all CPU features OFF.")
else()
message(FATAL_ERROR ".CMake/detect_gcc_clang_intrinsics.c returned exit code: " ${RUN_RESULT})
endif()
endif()
foreach(CPU_EXTENSION ${RUN_OUTPUT})
if (NOT DEFINED OQS_USE_${CPU_EXTENSION}_INSTRUCTIONS)

View File

@ -11,6 +11,13 @@ endif()
if(POLICY CMP0063)
cmake_policy(SET CMP0063 NEW)
endif()
if(POLICY CMP0066)
cmake_policy(SET CMP0066 NEW)
endif()
if(POLICY CMP0067)
cmake_policy(SET CMP0067 NEW)
endif()
project(liboqs C ASM)