Files
blis/config/generic/make_defs.cmake
Eleni Vlachopoulou 75a4d2f72f CMake: Adding new portable CMake system.
- A completely new system, made to be closer to Make system.

AMD-Internal: [CPUPL-2748]
Change-Id: I83232786406cdc4f0a0950fb6ac8f551e5968529
2023-11-09 15:49:45 +05:30

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()