Skip to content
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