From 8f1103c0fd5e51cbbfc6f66ada72fbead53297d6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 13 Jul 2016 11:01:01 -0400 Subject: FindOpenMP: Cleanup all variables unconditionally --- Modules/FindOpenMP.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index c8f716e..768db12 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -186,7 +186,6 @@ if(CMAKE_CXX_COMPILER_LOADED) list(APPEND _OPENMP_REQUIRED_VARS OpenMP_CXX_FLAGS) unset(OpenMP_CXX_FLAG_CANDIDATES) - unset(OpenMP_CXX_TEST_SOURCE) endif() # check Fortran compiler @@ -220,7 +219,6 @@ if(CMAKE_Fortran_COMPILER_LOADED) list(APPEND _OPENMP_REQUIRED_VARS OpenMP_Fortran_FLAGS) unset(OpenMP_Fortran_FLAG_CANDIDATES) - unset(OpenMP_Fortran_TEST_SOURCE) endif() set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) @@ -237,3 +235,7 @@ if(_OPENMP_REQUIRED_VARS) else() message(SEND_ERROR "FindOpenMP requires C or CXX language to be enabled") endif() + +unset(OpenMP_C_TEST_SOURCE) +unset(OpenMP_CXX_TEST_SOURCE) +unset(OpenMP_Fortran_TEST_SOURCE) -- cgit v0.12