aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2020-10-24 15:22:21 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2020-10-24 15:22:21 +0200
commitecb7bc9514b12051d050299234b2a74ac76b5a8e (patch)
treecc42d4490fcf698abf2fb53cd30dce6a4525ae3f /cmake
parent09f595a269b43896b4de400447a2e253fc87d4d3 (diff)
Bug #2036 make sure find_standard_math_library_test_program actually compiles (and is guaranteed to call math functions)
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindStandardMathLibrary.cmake6
1 files changed, 2 insertions, 4 deletions
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<cmath>
-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