From ec5c8bc0c93d30da8909d01978c7803ec7c91305 Mon Sep 17 00:00:00 2001 From: jianyuzh Date: Wed, 24 Jan 2024 16:34:41 +0800 Subject: [PATCH] fix conflict --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f70a3904f..7c3a82b7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -504,6 +504,13 @@ function(get_flags CCID CCVER) if (CCVER VERSION_GREATER_EQUAL 8.1.0) set(CXX_FLAGS ${CXX_FLAGS} -Wextra-semi) endif() + elseif (CCID MATCHES "Intel") + if (NOT LLAMA_SYCL) + # enable max optimization level when using Intel compiler + set(C_FLAGS -ipo -O3 -static -fp-model=fast -flto -fno-stack-protector) + set(CXX_FLAGS -ipo -O3 -static -fp-model=fast -flto -fno-stack-protector) + add_link_options(-fuse-ld=lld -static-intel) + endif() endif() set(GF_C_FLAGS ${C_FLAGS} PARENT_SCOPE)