Skip to content
Merged
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
24 changes: 17 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,31 @@ endif(NOT CMAKE_BUILD_TYPE)

if ( CMAKE_C_COMPILER_ID MATCHES "MSVC" )
# using Visual Studio C++
message(STATUS "INFO: detected MSVC: will not link math lib m")
set(MATHLIB "")

add_definitions("/D_CRT_SECURE_NO_WARNINGS")

set(MSVC_DISABLED_WARNINGS_LIST
"C4996"
)
endif()

else()
if(PFFFT_DISABLE_LINK_WITH_M)
# The math library is only required on Unix
if(NOT WIN32 AND NOT APPLE)
find_library(MATH_LIBRARY m)
if(MATH_LIBRARY)
if(PFFFT_DISABLE_LINK_WITH_M)
set(MATHLIB "")
message(STATUS "INFO: will not link math lib m as it is disabled")
else()
message(STATUS "INFO: detected Unix and found library: ${CMAKE_C_COMPILER_ID} will link math lib m")
set(MATHLIB ${MATH_LIBRARY})
endif()
else()
message(STATUS "INFO: detected NO MSVC: ${CMAKE_C_COMPILER_ID}: will link math lib m")
set(MATHLIB "m")
set(MATHLIB "")
message(WARNING "Could not find math lib m")
endif()
else()
set(MATHLIB "")
message(STATUS "INFO: will not link math lib m, no need for this target")
endif()

set(STDCXXLIB "")
Expand Down
Loading