Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intel oneapi support #348

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ include(GenerateExportHeader)
set(WriterCompilerDetectionHeaderFound NOTFOUND)
# This module is only available with CMake >=3.1, so check whether it could be found
# BUT in CMake 3.1 this module doesn't recognize AppleClang as compiler, so just use it as of CMake 3.2
#[[ deprecated CMake module
if (${CMAKE_VERSION} VERSION_GREATER "3.2")
include(WriteCompilerDetectionHeader OPTIONAL RESULT_VARIABLE WriterCompilerDetectionHeaderFound)
endif()
]]

if (${CMAKE_VERSION} VERSION_GREATER "3.9")
include(CheckIPOSupported OPTIONAL RESULT_VARIABLE CheckIPOSupportedFound)
Expand Down
13 changes: 11 additions & 2 deletions cmake/CompileOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ if (MSVC)
)
endif ()

# GCC and Clang compiler options
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND NOT MSVC)
# GCC, Clang and IntelLLVM compiler options
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR
"${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR
"${CMAKE_CXX_COMPILER_ID}" MATCHES "IntelLLVM" AND NOT MSVC)
set(DEFAULT_COMPILE_OPTIONS_PRIVATE ${DEFAULT_COMPILE_OPTIONS_PRIVATE}
#-fno-exceptions # since we use stl and stl is intended to use exceptions, exceptions should not be disabled

Expand Down Expand Up @@ -145,6 +147,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCH

# -Wreturn-stack-address # gives false positives
>

$<$<CXX_COMPILER_ID:IntelLLVM>:
-Wmaybe-uninitialized
-Wno-unknown-pragmas
-Wpedantic
-Wreturn-local-addr
>
)
set(DEFAULT_COMPILE_OPTIONS_PUBLIC ${DEFAULT_COMPILE_OPTIONS_PUBLIC}
$<$<PLATFORM_ID:Darwin>:
Expand Down
Loading