summaryrefslogtreecommitdiffhomepage
path: root/eigen/cmake/FindStandardMathLibrary.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-03-03 21:09:10 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-03-03 21:10:13 +0100
commitf0238cfb6997c4acfc2bd200de7295f3fa36968f (patch)
treeb215183760e4f615b9c1dabc1f116383b72a1b55 /eigen/cmake/FindStandardMathLibrary.cmake
parent543edd372a5193d04b3de9f23c176ab439e51b31 (diff)
don't index Eigen
Diffstat (limited to 'eigen/cmake/FindStandardMathLibrary.cmake')
-rw-r--r--eigen/cmake/FindStandardMathLibrary.cmake64
1 files changed, 0 insertions, 64 deletions
diff --git a/eigen/cmake/FindStandardMathLibrary.cmake b/eigen/cmake/FindStandardMathLibrary.cmake
deleted file mode 100644
index 711b0e4..0000000
--- a/eigen/cmake/FindStandardMathLibrary.cmake
+++ /dev/null
@@ -1,64 +0,0 @@
-# - Try to find how to link to the standard math library, if anything at all is needed to do.
-# On most platforms this is automatic, but for example it's not automatic on QNX.
-#
-# Once done this will define
-#
-# STANDARD_MATH_LIBRARY_FOUND - we found how to successfully link to the standard math library
-# STANDARD_MATH_LIBRARY - the name of the standard library that one has to link to.
-# -- this will be left empty if it's automatic (most platforms).
-# -- this will be set to "m" on platforms where one must explicitly
-# pass the "-lm" linker flag.
-#
-# Copyright (c) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>
-# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
-
-
-include(CheckCXXSourceCompiles)
-
-# a little test program for c++ math functions.
-# notice the std:: is required on some platforms such as QNX
-
-set(find_standard_math_library_test_program
-"#include<cmath>
-int main() { std::sin(0.0); std::log(0.0f); }")
-
-# first try compiling/linking the test program without any linker flags
-
-set(CMAKE_REQUIRED_FLAGS "")
-set(CMAKE_REQUIRED_LIBRARIES "")
-CHECK_CXX_SOURCE_COMPILES(
- "${find_standard_math_library_test_program}"
- standard_math_library_linked_to_automatically
-)
-
-if(standard_math_library_linked_to_automatically)
-
- # the test program linked successfully without any linker flag.
- set(STANDARD_MATH_LIBRARY "")
- set(STANDARD_MATH_LIBRARY_FOUND TRUE)
-
-else()
-
- # the test program did not link successfully without any linker flag.
- # This is a very uncommon case that so far we only saw on QNX. The next try is the
- # standard name 'm' for the standard math library.
-
- set(CMAKE_REQUIRED_LIBRARIES "m")
- CHECK_CXX_SOURCE_COMPILES(
- "${find_standard_math_library_test_program}"
- standard_math_library_linked_to_as_m)
-
- if(standard_math_library_linked_to_as_m)
-
- # the test program linked successfully when linking to the 'm' library
- set(STANDARD_MATH_LIBRARY "m")
- set(STANDARD_MATH_LIBRARY_FOUND TRUE)
-
- else()
-
- # the test program still doesn't link successfully
- set(STANDARD_MATH_LIBRARY_FOUND FALSE)
-
- endif()
-
-endif()