Skip to content

Commit 298bde6

Browse files
committed
cmake, add _USE_MATH_DEFINES compile definition for Microsoft Visual C++ compiler
1 parent fd68a09 commit 298bde6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ if(MSVC)
1212
set(CMAKE_CXX_FLAGS "/EHsc /Wall")
1313
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 1)
1414
set(CMAKE_CXX_FLAGS_RELEASE "/O2")
15+
add_compile_definitions(_USE_MATH_DEFINES)
1516
else()
1617
set(CMAKE_CXX_FLAGS "-Wall")
1718
set(CMAKE_CXX_FLAGS_DEBUG "-g")

0 commit comments

Comments
 (0)