diff options
author | Павел Мацула <dev.plvlml@gmail.com> | 2020-09-19 16:13:16 +0000 |
---|---|---|
committer | Павел Мацула <dev.plvlml@gmail.com> | 2020-09-19 16:13:16 +0000 |
commit | 38e4a673947a8188dec18b74092ae42d8b5eccf6 (patch) | |
tree | a51eb9cbe04ec9245925cc10b58b81e399c22546 /cmake | |
parent | c4b99f78c7baaab08ef2765618df885a138f9396 (diff) |
Fix using FindStandardMathLibrary.cmake with -Wall (-Wunused-value) added to CMAKE_CXX_FLAG
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindStandardMathLibrary.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/FindStandardMathLibrary.cmake b/cmake/FindStandardMathLibrary.cmake index 711b0e4b4..fc4728a82 100644 --- a/cmake/FindStandardMathLibrary.cmake +++ b/cmake/FindStandardMathLibrary.cmake @@ -17,10 +17,11 @@ include(CheckCXXSourceCompiles) # a little test program for c++ math functions. # notice the std:: is required on some platforms such as QNX +# notice the (void) is required if -Wall (-Wunused-value) is added to CMAKE_CXX_FLAG set(find_standard_math_library_test_program "#include<cmath> -int main() { std::sin(0.0); std::log(0.0f); }") +int main() { (void)std::sin(0.0); (void)std::log(0.0f); }") # first try compiling/linking the test program without any linker flags |