#=========================================================================
# Copyright (C) 2019 Intel Corporation
#
# Licensed under the Apache License,  Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 	http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law  or agreed  to  in  writing,  software
# distributed under  the License  is  distributed  on  an  "AS IS"  BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the  specific  language  governing  permissions  and
# limitations under the License.
#=========================================================================

#
# Intel® Cryptography Primitives Library
#

if (UNIX)
  if (${ARCH} MATCHES "ia32")
    set(CMAKE_ASM_NASM_OBJECT_FORMAT elf32)
  else()
    set(CMAKE_ASM_NASM_OBJECT_FORMAT elf64)
  endif()
else() # Windows
  if (${ARCH} MATCHES "ia32")
    set(CMAKE_ASM_NASM_OBJECT_FORMAT win32) # MS extended COFF for Win32
  else()
    set(CMAKE_ASM_NASM_OBJECT_FORMAT win64)
  endif()
endif()

# Enable debug info
set(CMAKE_ASM_NASM_DEBUG_OPTIONS -g -DIPPCP_NASM_DEBUG)


set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <INCLUDES> <FLAGS> <DEFINES> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
set(CMAKE_ASM_NASM_FLAGS_INIT "${LIBRARY_DEFINES}")
