mirror of
https://github.com/amd/blis.git
synced 2026-05-12 10:05:38 +00:00
- A completely new system, made to be closer to Make system. AMD-Internal: [CPUPL-2748] Change-Id: I83232786406cdc4f0a0950fb6ac8f551e5968529
41 lines
1.1 KiB
CMake
41 lines
1.1 KiB
CMake
##Copyright (C) 2023, Advanced Micro Devices, Inc ##
|
|
|
|
if(NOT WIN32)
|
|
if(NOT (DEBUG_TYPE STREQUAL "off"))
|
|
set(CDBGFLAGS -g)
|
|
endif()
|
|
|
|
if(DEBUG_TYPE STREQUAL "noopt")
|
|
set(COPTFLAGS -O0)
|
|
else() # off or opt
|
|
set(COPTFLAGS -O3)
|
|
endif()
|
|
endif()
|
|
|
|
# Flags specific to optimized kernels.
|
|
if(MSVC)
|
|
set(CKOPTFLAGS ${COPTFLAGS})
|
|
else()
|
|
set(CKOPTFLAGS ${COPTFLAGS} -O3)
|
|
endif()
|
|
|
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|
# Placeholder in case we want to add gcc-specific flags.
|
|
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "icc")
|
|
# Placeholder in case we want to add icc-specific flags.
|
|
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
# Placeholder in case we want to add clang-specific flags.
|
|
else()
|
|
message(FATAL_ERROR "gcc, icc, or clang is required for this configuration.")
|
|
endif()
|
|
|
|
# Flags specific to reference kernels.
|
|
set(CROPTFLAGS ${CKOPTFLAGS})
|
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|
set(CRVECFLAGS ${CKVECFLAGS})
|
|
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
set(CRVECFLAGS ${CKVECFLAGS})
|
|
else()
|
|
set(CRVECFLAGS ${CKVECFLAGS})
|
|
endif()
|