From ecb7bc9514b12051d050299234b2a74ac76b5a8e Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Sat, 24 Oct 2020 15:22:21 +0200 Subject: Bug #2036 make sure find_standard_math_library_test_program actually compiles (and is guaranteed to call math functions) --- cmake/FindStandardMathLibrary.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cmake') diff --git a/cmake/FindStandardMathLibrary.cmake b/cmake/FindStandardMathLibrary.cmake index b174cbb4f..1d1e5b3a9 100644 --- a/cmake/FindStandardMathLibrary.cmake +++ b/cmake/FindStandardMathLibrary.cmake @@ -24,10 +24,8 @@ include(CheckCXXSourceCompiles) set(find_standard_math_library_test_program " #include -int main(int argc, char **argv) { - (void)std::sin(argc)); - (void)std::log(argc)); - return 0; +int main(int argc, char **){ + return int(std::sin(double(argc)) + std::log(double(argc))); }") # first try compiling/linking the test program without any linker flags -- cgit v1.2.3