aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordario mambro <dario.mambro@gmail.com>2020-12-24 17:06:03 +0100
committerdario mambro <dario.mambro@gmail.com>2020-12-24 17:06:03 +0100
commit00ba746dacda897031a62a54b2e50c6be9d6320b (patch)
treee3c96f5b7be0b71df7aa1cff01bb90133836d9b2
parent776abf7ae79e9a43972b9d86dfe2cce2962a7897 (diff)
downloadpffft-00ba746dacda897031a62a54b2e50c6be9d6320b.tar.gz
added cmake option to fix building with MSVC using clangCL
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 11dad3b..7856b75 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,7 @@ option(USE_BENCH_POCKET "use PocketFFT in fft benchmark? - if exists in subdir"
option(USE_DEBUG_ASAN "use GCC's address sanitizer?" OFF)
+option(DISABLE_LINK_WITH_M "Disables linking with m library to build with clangCL from MSVC" OFF)
# C90 requires the gcc extensions for function attributes like always_inline
# C99 provides the function attributes: no gcc extensions required
@@ -95,8 +96,11 @@ if ( CMAKE_C_COMPILER_ID MATCHES "MSVC" )
)
else()
- message(STATUS "INFO: detected NO MSVC: ${CMAKE_C_COMPILER_ID}: will link math lib m")
- set(MATHLIB "m")
+ if(DISABLE_LINK_WITH_M)
+ else()
+ message(STATUS "INFO: detected NO MSVC: ${CMAKE_C_COMPILER_ID}: will link math lib m")
+ set(MATHLIB "m")
+ endif()
endif()
set( SIMD_FLOAT_HDRS simd/pf_float.h simd/pf_sse1_float.h simd/pf_altivec_float.h simd/pf_neon_float.h simd/pf_scalar_float.h )