summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-06-27 19:23:01 (GMT)
committerBrad King <brad.king@kitware.com>2018-06-27 19:24:22 (GMT)
commit826bf5c45451900869ca681768d8f291311c75ca (patch)
tree41f177e95244a63328b678399f1e6719e7e5ba82 /Modules
parentef5e2e8a62982ebccf4883fc7a01cdb66f8ca183 (diff)
downloadCMake-826bf5c45451900869ca681768d8f291311c75ca.zip
CMake-826bf5c45451900869ca681768d8f291311c75ca.tar.gz
CMake-826bf5c45451900869ca681768d8f291311c75ca.tar.bz2
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
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindOpenMP.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index 329ace1..df0bbc4 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -126,7 +126,7 @@ set(OpenMP_C_CXX_TEST_SOURCE
#include <omp.h>
int main() {
#ifdef _OPENMP
- int n = omp_get_max_threads();
+ omp_get_max_threads();
return 0;
#else
breaks_on_purpose