Skip to content

Commit

Permalink
Define _USE_MATH_DEFINES for MSVC when alpaka is found
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Oct 31, 2022
1 parent b36e20c commit 31afba6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE "Release")
endif()

if (MSVC)
# FIXME(bgruber): alpaka uses M_PI, so we need to make it available on MSVC. This may be fixed in alpaka 1.0.0.
target_compile_definitions(llama INTERFACE _USE_MATH_DEFINES)
endif()

# tests
option(BUILD_TESTING "" OFF)
include(CTest)
Expand Down

0 comments on commit 31afba6

Please sign in to comment.