From 826bf5c45451900869ca681768d8f291311c75ca Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 27 Jun 2018 15:23:01 -0400 Subject: [PATCH] FindOpenMP: Avoid warning in check code The test code added by commit v3.12.0-rc1~411^2~1 (FindOpenMP: Verify in test source that OMP library is linked, 2018-03-01) leaves an unused variable warning. This breaks the check with `-Werror`. Remove the variable and leave just the function call, which should still check that the OMP library is linked. Fixes: #18102 --- Modules/FindOpenMP.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index 329ace10c1..df0bbc433d 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -126,7 +126,7 @@ set(OpenMP_C_CXX_TEST_SOURCE #include int main() { #ifdef _OPENMP - int n = omp_get_max_threads(); + omp_get_max_threads(); return 0; #else breaks_on_purpose