Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b63a0c5
Fix -Wextra warnings
stefanatwork Jun 9, 2026
bfdcf9d
Add -Wdouble-promotion, -Wextra-semi, -Wundefined-inline fixes; updat…
stefanatwork Jun 9, 2026
99ed174
Fix remaining tutorial warnings for GCC and Clang
stefanatwork Jun 9, 2026
0ce622d
Add -Werror to SYCL build and fix warnings
stefanatwork Jun 9, 2026
aeb1ca1
Removed __extension__, disabled warning for anonymous structs
stefanatwork Jun 15, 2026
e1f6a6c
Enable /W4 /WX on MSVC and suppress intentional-pattern warnings
stefanatwork Jun 16, 2026
288bb0c
Fix MSVC /W4 warnings in common library and kernels
stefanatwork Jun 16, 2026
4931c78
Fix MSVC /W4 warnings in tutorials
stefanatwork Jun 16, 2026
fbefc0a
Fix dpcpp.cmake to recognise icx-cl as the ICX compiler on Windows
stefanatwork Jun 16, 2026
eecccf3
Fix SYCL/ICX warnings in tutorial SYCL device code
stefanatwork Jun 16, 2026
7376304
Fix -Warith-conversion incompatibility with GCC < 10 on Rocky Linux 8
Copilot Jun 15, 2026
ebcf1c9
Fix shift-overflow warning for CPU_FEATURE_BIT_AVX512VL
stefanatwork Jun 17, 2026
76e9f86
Fix fill() using stale member vertices instead of locals
stefanatwork Jun 17, 2026
f3c3de5
Fix update() in quadv.h using member v3 instead of local lv3
stefanatwork Jun 17, 2026
0706568
Fix imgui CMakeLists: always apply FLAGS_LOWEST, gate warning flag to…
stefanatwork Jun 17, 2026
ffbec7a
Fix sign-compare warning in user_geometry_device.cpp
stefanatwork Jun 17, 2026
bd8ae3b
Fix -Wundefined-internal in minimal_sycl.cpp
stefanatwork Jun 17, 2026
0aaac5a
Fix -Wdeprecated-declarations from SYCL runtime headers in device pass
stefanatwork Jun 17, 2026
45b4bdf
cmake: treat Intel SYCL runtime headers as system headers on Windows
stefanatwork Jun 17, 2026
e70a932
Merge branch 'master' into fix-all-warnings
stefanatwork Aug 3, 2026
502e5a3
Addressed review comments
stefanatwork Aug 3, 2026
b5fb1ef
Removed misleading and superfluous #if
stefanatwork Aug 3, 2026
4b2c035
Fixed MSVC warnings in the internal scheduler
stefanatwork Aug 3, 2026
3df80f5
Excluded builders directory from gitignore (#615)
stefanatwork Aug 4, 2026
82badf2
AVX 10.2 and APX support (#592)
stefanatwork Aug 4, 2026
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ kernels/hash.h
include/embree4/rtcore_config.h
build
build*
!builders
out
37 changes: 33 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ ENDIF()
IF (EMBREE_ARM)
SET_PROPERTY(CACHE EMBREE_MAX_ISA PROPERTY STRINGS NONE NEON NEON2X)
ELSE()
SET_PROPERTY(CACHE EMBREE_MAX_ISA PROPERTY STRINGS NONE SSE2 SSE4.2 AVX AVX2 AVX512 DEFAULT)
SET_PROPERTY(CACHE EMBREE_MAX_ISA PROPERTY STRINGS NONE SSE2 SSE4.2 AVX AVX2 AVX512 APX DEFAULT)
ENDIF()

IF (EMBREE_MAX_ISA STREQUAL "NONE")
Expand All @@ -380,18 +380,21 @@ IF (EMBREE_MAX_ISA STREQUAL "NONE")
OPTION(EMBREE_ISA_NEON2X "Enables NEON ISA double pumped." OFF)
ENDIF()
ELSE()
TRY_COMPILE(COMPILER_SUPPORTS_AVX "${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp" COMPILE_DEFINITIONS ${FLAGS_AVX})
TRY_COMPILE(COMPILER_SUPPORTS_AVX2 "${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp" COMPILE_DEFINITIONS ${FLAGS_AVX2})
TRY_COMPILE(COMPILER_SUPPORTS_AVX512 "${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp" COMPILE_DEFINITIONS ${FLAGS_AVX512})
TRY_COMPILE(COMPILER_SUPPORTS_AVX "${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp" COMPILE_DEFINITIONS ${FLAGS_AVX})
TRY_COMPILE(COMPILER_SUPPORTS_AVX2 "${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp" COMPILE_DEFINITIONS ${FLAGS_AVX2})
TRY_COMPILE(COMPILER_SUPPORTS_AVX512 "${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp" COMPILE_DEFINITIONS ${FLAGS_AVX512})
TRY_COMPILE(COMPILER_SUPPORTS_APX "${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/common/cmake/check_isa.cpp" COMPILE_DEFINITIONS ${FLAGS_APX})

OPTION(EMBREE_ISA_SSE2 "Enables SSE2 ISA." ON)
OPTION(EMBREE_ISA_SSE42 "Enables SSE4.2 ISA." ON)
OPTION(EMBREE_ISA_AVX "Enables AVX ISA." ${COMPILER_SUPPORTS_AVX})
OPTION(EMBREE_ISA_AVX2 "Enables AVX2 ISA." ${COMPILER_SUPPORTS_AVX2})
IF (APPLE)
OPTION(EMBREE_ISA_AVX512 "Enables AVX512 ISA." OFF)
OPTION(EMBREE_ISA_APX "Enables APX ISA." OFF)
ELSE()
OPTION(EMBREE_ISA_AVX512 "Enables AVX512 ISA." ${COMPILER_SUPPORTS_AVX512})
OPTION(EMBREE_ISA_APX "Enables APX ISA." ${COMPILER_SUPPORTS_APX})
ENDIF()
# Don't use OPTION, but still set them to OFF, so that embree-config.cmake is consisten with its definitions
SET(EMBREE_ISA_NEON OFF)
Expand All @@ -406,13 +409,15 @@ ELSEIF (EMBREE_MAX_ISA STREQUAL "DEFAULT")
UNSET(EMBREE_ISA_AVX CACHE)
UNSET(EMBREE_ISA_AVX2 CACHE)
UNSET(EMBREE_ISA_AVX512 CACHE)
UNSET(EMBREE_ISA_APX CACHE)
SET(EMBREE_ISA_NEON OFF)
SET(EMBREE_ISA_NEON2X OFF)
SET(EMBREE_ISA_SSE2 OFF)
SET(EMBREE_ISA_SSE42 OFF)
SET(EMBREE_ISA_AVX OFF)
SET(EMBREE_ISA_AVX2 OFF)
SET(EMBREE_ISA_AVX512 OFF)
SET(EMBREE_ISA_APX OFF)
MESSAGE(STATUS "Detecting default ISA...")
INCLUDE(check_isa_default)
CHECK_ISA_DEFAULT(EMBREE_ISA_DEFAULT)
Expand All @@ -427,6 +432,7 @@ ELSE()
UNSET(EMBREE_ISA_AVX CACHE)
UNSET(EMBREE_ISA_AVX2 CACHE)
UNSET(EMBREE_ISA_AVX512 CACHE)
UNSET(EMBREE_ISA_APX CACHE)

IF(EMBREE_MAX_ISA STREQUAL "NEON")
SET(ISA 1)
Expand All @@ -444,6 +450,8 @@ ELSE()
SET(ISA 5)
ELSEIF(EMBREE_MAX_ISA STREQUAL "AVX512SKX") # just for compatibility
SET(ISA 5)
ELSEIF(EMBREE_MAX_ISA STREQUAL "APX")
SET(ISA 6)
ELSE()
MESSAGE(FATAL_ERROR "Unsupported ISA specified: " ${EMBREE_MAX_ISA})
ENDIF()
Expand All @@ -455,6 +463,7 @@ ELSE()
SET(EMBREE_ISA_AVX OFF)
SET(EMBREE_ISA_AVX2 OFF)
SET(EMBREE_ISA_AVX512 OFF)
SET(EMBREE_ISA_APX OFF)

IF (EMBREE_ARM)
IF (ISA GREATER 0)
Expand All @@ -479,6 +488,9 @@ ELSE()
IF (ISA GREATER 4)
SET(EMBREE_ISA_AVX512 ON)
ENDIF ()
IF (ISA GREATER 5)
SET(EMBREE_ISA_APX ON)
ENDIF ()
ENDIF()
ENDIF()

Expand Down Expand Up @@ -511,6 +523,9 @@ IF (APPLE AND EMBREE_STATIC_LIB)
IF (EMBREE_ISA_AVX512)
MATH(EXPR NUMISA "${NUMISA}+1")
ENDIF()
IF (EMBREE_ISA_APX)
MATH(EXPR NUMISA "${NUMISA}+1")
ENDIF()

IF (NUMISA GREATER 1)
IF (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
Expand All @@ -530,6 +545,7 @@ SET(SSE42 1)
SET(AVX 2)
SET(AVX2 3)
SET(AVX512 4)
SET(APX 5)

UNSET(FLAGS_LOWEST)
SET(ISA_LOWEST -1)
Expand Down Expand Up @@ -612,6 +628,19 @@ IF (EMBREE_ISA_AVX512)
ENDIF()
ENDIF ()

IF (EMBREE_ISA_APX)
ADD_DEFINITIONS(-DEMBREE_TARGET_APX)
IF (NOT EMBREE_ARM)
# APX support in ISPC?
# LIST(APPEND ISPC_TARGETS "")
ENDIF()
IF(NOT FLAGS_LOWEST)
SET(ISA_LOWEST ${APX})
SET(ISA_LOWEST_AVX ${APX})
SET(FLAGS_LOWEST ${FLAGS_APX})
ENDIF()
ENDIF ()

IF (ISA_LOWEST EQUAL -1)
MESSAGE(FATAL_ERROR "You have to enable at least one ISA!")
ENDIF()
Expand Down
4 changes: 2 additions & 2 deletions common/algorithms/parallel_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ namespace embree
if (k0 > r1) break;
Index k1 = k0+nused[i];
Index src = begin+(i+0)*(end-begin)/taskCount+nused[i];
for (Index i=max(r0,k0); i<min(r1,k1); i++) {
Index isrc = src-i+k0-1;
for (Index j=max(r0,k0); j<min(r1,k1); j++) {
Index isrc = src-j+k0-1;
assert(dst >= begin && dst < end);
assert(isrc >= begin && isrc < end);
data[dst++] = data[isrc];
Expand Down
12 changes: 6 additions & 6 deletions common/algorithms/parallel_for_for.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@ namespace embree
__forceinline void init ( const size_t numArrays, const SizeFunc& getSize, const size_t minStepSize )
{
/* first calculate total number of elements */
size_t N = 0;
size_t num = 0;
for (size_t i=0; i<numArrays; i++) {
N += getSize(i);
num += getSize(i);
}
this->N = N;
this->N = num;

/* calculate number of tasks to use */
const size_t numThreads = TaskScheduler::threadCount();
const size_t numBlocks = (N+minStepSize-1)/minStepSize;
const size_t numBlocks = (num+minStepSize-1)/minStepSize;
taskCount = max(size_t(1),min(numThreads,numBlocks,size_t(ParallelForForState::MAX_TASKS)));

/* calculate start (i,j) for each task */
size_t taskIndex = 0;
i0[taskIndex] = 0;
j0[taskIndex] = 0;
size_t k0 = (++taskIndex)*N/taskCount;
size_t k0 = (++taskIndex)*num/taskCount;
for (size_t i=0, k=0; taskIndex < taskCount; i++)
{
assert(i<numArrays);
Expand All @@ -66,7 +66,7 @@ namespace embree
i0[taskIndex] = i;
j0[taskIndex] = j += k0-k;
k=k0;
k0 = (++taskIndex)*N/taskCount;
k0 = (++taskIndex)*num/taskCount;
}
k+=M-j;
}
Expand Down
2 changes: 1 addition & 1 deletion common/algorithms/parallel_partition.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace embree
template<typename T, typename V, typename Vi, typename IsLeft, typename Reduction_T, typename Reduction_V>
class __aligned(64) parallel_partition_task
{
ALIGNED_CLASS_(64);
ALIGNED_CLASS_(64)
private:

static const size_t MAX_TASKS = 64;
Expand Down
20 changes: 10 additions & 10 deletions common/algorithms/parallel_sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ namespace embree
private:

void tbbRadixIteration0(const Key shift,
const Ty* __restrict const src,
const Ty* __restrict const pSrc,
Ty* __restrict const dst,
const size_t threadIndex, const size_t threadCount)
{
Expand All @@ -321,16 +321,16 @@ namespace embree
#endif
for (size_t i=startID; i<endID; i++) {
#if defined(__64BIT__)
const size_t index = ((size_t)(Key)src[i] >> (size_t)shift) & (size_t)mask;
const size_t index = ((size_t)(Key)pSrc[i] >> (size_t)shift) & (size_t)mask;
#else
const Key index = ((Key)src[i] >> shift) & mask;
const Key index = ((Key)pSrc[i] >> shift) & mask;
#endif
count[index]++;
}
}

void tbbRadixIteration1(const Key shift,
const Ty* __restrict const src,
const Ty* __restrict const pSrc,
Ty* __restrict const dst,
const size_t threadIndex, const size_t threadCount)
{
Expand Down Expand Up @@ -381,23 +381,23 @@ namespace embree
#pragma nounroll
#endif
for (size_t i=startID; i<endID; i++) {
const Ty elt = src[i];
const Ty elt = pSrc[i];
#if defined(__64BIT__)
const size_t index = ((size_t)(Key)src[i] >> (size_t)shift) & (size_t)mask;
const size_t index = ((size_t)(Key)pSrc[i] >> (size_t)shift) & (size_t)mask;
#else
const size_t index = ((Key)src[i] >> shift) & mask;
const size_t index = ((Key)pSrc[i] >> shift) & mask;
#endif
dst[offset[index]++] = elt;
}
}

void tbbRadixIteration(const Key shift, const bool last,
const Ty* __restrict src, Ty* __restrict dst,
const Ty* __restrict pSrc, Ty* __restrict dst,
const size_t numTasks)
{
affinity_partitioner ap;
parallel_for_affinity(numTasks,[&] (size_t taskIndex) { tbbRadixIteration0(shift,src,dst,taskIndex,numTasks); },ap);
parallel_for_affinity(numTasks,[&] (size_t taskIndex) { tbbRadixIteration1(shift,src,dst,taskIndex,numTasks); },ap);
parallel_for_affinity(numTasks,[&] (size_t taskIndex) { tbbRadixIteration0(shift,pSrc,dst,taskIndex,numTasks); },ap);
parallel_for_affinity(numTasks,[&] (size_t taskIndex) { tbbRadixIteration1(shift,pSrc,dst,taskIndex,numTasks); },ap);
}

void tbbRadixSort(const size_t numTasks)
Expand Down
5 changes: 4 additions & 1 deletion common/cmake/check_isa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
// limitations under the License. //
// ======================================================================== //

#if \
// Require APX and 10.2 if both are available, otherwise require the highest available ISA
#if defined(__APX_F__) && ((defined(__AVX10_VER__) && (__AVX10_VER__ >= 2)) || defined(__AVX10_2__))
char const *info_isa = "ISA" ":" "APX";
#elif \
defined(__AVX512F__) && defined(__AVX512CD__) && \
defined(__AVX512DQ__) && defined(__AVX512BW__) && defined(__AVX512VL__)
char const *info_isa = "ISA" ":" "AVX512";
Expand Down
17 changes: 17 additions & 0 deletions common/cmake/clang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ ELSE ()
_SET_IF_EMPTY(FLAGS_AVX "-mavx")
_SET_IF_EMPTY(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
_SET_IF_EMPTY(FLAGS_AVX512 "-march=skx")
_SET_IF_EMPTY(FLAGS_APX "-march=novalake")
ENDIF ()

IF (WIN32)
Expand Down Expand Up @@ -88,7 +89,23 @@ ELSE()

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") # enables extra warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic") # enables pedantic warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") # disables warnings for unused function parameters
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-function-type") # disables warnings for intentional function pointer casts
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-copy") # disables deprecated copy warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wundef") # warn about undefined preprocessor identifiers
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow") # warn about shadowed variables
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wfloat-equal") # warn about floating point equality checks
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-align") # disable: intentional aligned loads in SIMD code
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-float-equal") # disable: intentional exact-zero checks in normalize_safe
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-shadow") # disable: pervasive in vector class constructors
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nested-anon-types") # disable: anonymous types in unions for SIMD
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-anonymous-struct") # disable: anonymous structs in unions for SIMD
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare") # disable: int/size_t comparisons in template code
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++17-attribute-extensions") # disable: [[fallthrough]] etc in C++11 mode
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") # treat all warnings as errors
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat char as signed on all processors, including ARM
IF (NOT APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # enables support for more secure position independent execution
Expand Down
25 changes: 21 additions & 4 deletions common/cmake/dpcpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ _SET_IF_EMPTY(FLAGS_SSE42 "-msse4.2")
_SET_IF_EMPTY(FLAGS_AVX "-mavx")
_SET_IF_EMPTY(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
_SET_IF_EMPTY(FLAGS_AVX512 "-march=skx")
_SET_IF_EMPTY(FLAGS_APX "-march=novalake")

IF (NOT WIN32)
OPTION(EMBREE_IGNORE_CMAKE_CXX_FLAGS "When enabled Embree ignores default CMAKE_CXX_FLAGS." ON)
Expand All @@ -24,7 +25,7 @@ GET_FILENAME_COMPONENT(SYCL_COMPILER_DIR ${CMAKE_CXX_COMPILER} PATH)
GET_FILENAME_COMPONENT(SYCL_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
IF (NOT SYCL_COMPILER_NAME STREQUAL "clang++")
SET(SYCL_ONEAPI TRUE)
IF (SYCL_COMPILER_NAME STREQUAL "icx" OR SYCL_COMPILER_NAME STREQUAL "icpx")
IF (SYCL_COMPILER_NAME STREQUAL "icx" OR SYCL_COMPILER_NAME STREQUAL "icpx" OR SYCL_COMPILER_NAME STREQUAL "icx-cl")
SET(SYCL_ONEAPI_ICX TRUE)
ELSE()
SET(SYCL_ONEAPI_ICX FALSE)
Expand Down Expand Up @@ -144,10 +145,19 @@ IF (EMBREE_SYCL_SUPPORT)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pessimizing-move") # disabled: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]

IF (SYCL_ONEAPI_ICX AND WIN32)
IF (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 2024.0)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I\"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl\" -I\"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl/sycl\"") # disable warning from SYCL header
IF (SYCL_COMPILER_NAME STREQUAL "icx-cl")
# icx-cl is MSVC-compatible: use -imsvc (clang-cl equivalent of -isystem)
IF (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 2024.0)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -imsvc \"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl\" -imsvc \"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl/sycl\"") # treat Intel SYCL runtime headers as system headers (suppresses their internal warnings)
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -imsvc \"${SYCL_COMPILER_DIR}/../include/sycl\" -imsvc \"${SYCL_COMPILER_DIR}/../include/\"") # treat Intel SYCL runtime headers as system headers (suppresses their internal warnings)
ELSE()
# icx/icpx on Windows: GCC-compatible frontend, use -isystem
IF (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 2024.0)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl\" -isystem \"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl/sycl\"") # treat Intel SYCL runtime headers as system headers (suppresses their internal warnings)
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${SYCL_COMPILER_DIR}/../include/sycl\" -isystem \"${SYCL_COMPILER_DIR}/../include/\"") # treat Intel SYCL runtime headers as system headers (suppresses their internal warnings)
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I\"${SYCL_COMPILER_DIR}/../include/sycl\" -I\"${SYCL_COMPILER_DIR}/../include/\"") # disable warning from SYCL header
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qstd=c++17")
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
Expand Down Expand Up @@ -220,7 +230,14 @@ ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat char as signed on all processors, including ARM
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") # enables extra warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") # disables warnings for unused function parameters
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-function-type") # disables warnings for intentional function pointer casts
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-function-type-mismatch") # disables warnings for intentional function pointer casts
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare") # disable: int/size_t comparisons in template code
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers") # disable: intentional partial struct init with zero fill
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") # treat all warnings as errors
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffp-model=precise") # makes dpcpp compiler compatible with clang++
ENDIF()

Expand Down
5 changes: 5 additions & 0 deletions common/cmake/embree-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ SET(EMBREE_ISA_SSE42 @EMBREE_ISA_SSE42@)
SET(EMBREE_ISA_AVX @EMBREE_ISA_AVX@)
SET(EMBREE_ISA_AVX2 @EMBREE_ISA_AVX2@)
SET(EMBREE_ISA_AVX512 @EMBREE_ISA_AVX512@)
SET(EMBREE_ISA_APX @EMBREE_ISA_APX@)
SET(EMBREE_ISA_AVX512SKX @EMBREE_ISA_AVX512@) # just for compatibility
SET(EMBREE_ISA_NEON @EMBREE_ISA_NEON@)
SET(EMBREE_ISA_NEON2X @EMBREE_ISA_NEON2X@)
Expand Down Expand Up @@ -85,6 +86,10 @@ IF (EMBREE_STATIC_LIB)
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx512-targets.cmake")
ENDIF()

IF (EMBREE_ISA_APX)
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_apx-targets.cmake")
ENDIF()

ENDIF()

IF (EMBREE_SYCL_SUPPORT)
Expand Down
Loading