From 235bf2547c40e9aba71ff289384be1ac8856f213 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Wed, 27 Oct 2004 10:45:07 -0400 Subject: [PATCH] BUG: Check for the variable first time --- Modules/TestCXXAcceptsFlag.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/TestCXXAcceptsFlag.cmake b/Modules/TestCXXAcceptsFlag.cmake index 9b2f3246f..c7bb5b23c 100644 --- a/Modules/TestCXXAcceptsFlag.cmake +++ b/Modules/TestCXXAcceptsFlag.cmake @@ -7,7 +7,7 @@ # MACRO(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE) - IF(DEFINED ${VARIABLE}) + IF(NOT DEFINED ${VARIABLE}) MESSAGE(STATUS "Checking to see if CXX compiler acepts flag ${FLAGS}") TRY_COMPILE(${VARIABLE} ${CMAKE_BINARY_DIR} @@ -25,5 +25,5 @@ MACRO(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE) "Determining if the CXX compiler accepts the flag ${FLAGS} failed with " "the following output:\n${OUTPUT}\n\n") ENDIF(${VARIABLE}) - ENDIF(DEFINED ${VARIABLE}) + ENDIF(NOT DEFINED ${VARIABLE}) ENDMACRO(CHECK_CXX_ACCEPTS_FLAG)