Skip to content

Commit bfbceff

Browse files
committed
Fix compilation error when Vc and date.h are both included
1 parent 95d06fa commit bfbceff

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

core/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
if (GDX_AVX2)
4848
set_target_properties(Vc::Vc PROPERTIES
49-
INTERFACE_COMPILE_DEFINITIONS Vc_IMPL=AVX2
49+
INTERFACE_COMPILE_DEFINITIONS "Vc_IMPL=AVX2;Vc_NO_STD_FUNCTIONS"
5050
)
5151
if (MSVC)
5252
set_target_properties(Vc::Vc PROPERTIES
@@ -60,16 +60,16 @@
6060
else ()
6161
if (MSVC)
6262
set_target_properties(Vc::Vc PROPERTIES
63-
INTERFACE_COMPILE_DEFINITIONS Vc_IMPL=SSE2
63+
INTERFACE_COMPILE_DEFINITIONS "Vc_IMPL=SSE2;Vc_NO_STD_FUNCTIONS"
6464
)
6565
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
6666
set_target_properties(Vc::Vc PROPERTIES
67-
INTERFACE_COMPILE_DEFINITIONS Vc_IMPL=Scalar
67+
INTERFACE_COMPILE_DEFINITIONS "Vc_IMPL=Scalar;Vc_NO_STD_FUNCTIONS"
6868
)
6969
else ()
7070
set_target_properties(Vc::Vc PROPERTIES
7171
INTERFACE_COMPILE_OPTIONS -msse4.2
72-
INTERFACE_COMPILE_DEFINITIONS Vc_IMPL=SSE4_2
72+
INTERFACE_COMPILE_DEFINITIONS "Vc_IMPL=SSE4_2;Vc_NO_STD_FUNCTIONS"
7373
)
7474
endif ()
7575
endif ()

core/include/gdx/denseraster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class DenseRaster
234234
if (auto nod = nodata(); nod.has_value() && !std::isnan(*nod)) {
235235
if constexpr (simd_supported()) {
236236
simd::for_each(begin(), end(), [nodata = *nod](auto& value) {
237-
value(std::isnan(value)) = nodata;
237+
value(Vc::isnan(value)) = nodata;
238238
});
239239
} else {
240240
std::transform(begin(), end(), begin(), [nodata = *nod](T value) {

0 commit comments

Comments
 (0)