Browse Source

cmake: do not link libm for MSVC.

hl_urbicide
Andrey Akhmichin 2 years ago
parent
commit
2363a8ff21
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
  1. 4
      CMakeLists.txt

4
CMakeLists.txt

@ -115,7 +115,9 @@ endif() @@ -115,7 +115,9 @@ endif()
check_include_file("tgmath.h" HAVE_TGMATH_H)
if(HAVE_TGMATH_H)
set(CMAKE_REQUIRED_LIBRARIES "m")
if(NOT MSVC)
set(CMAKE_REQUIRED_LIBRARIES "m")
endif()
check_c_source_compiles("#include <tgmath.h>
const float val = 2, val2 = 3;
int main(){ return (int)(-asin(val) + cos(val2)); }" HAVE_VALID_TGMATH_H )

Loading…
Cancel
Save