From 8e6f6155c0e973dada7f2635c48974c426b84ecf Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Fri, 13 Jul 2007 10:29:36 -0400 Subject: [PATCH] BUG: the SET( ... CACHE INTERNAL) didn't work as expected, since the variable is already added to the cache inside cmTryRunCommand.cxx, so the value used here was ignored. Additionally the INTERNAL made it internal, which shouldn't be done when cross compiling, since here the user is required to edit this variable manually e.g. using ccmake. Alex --- Modules/CheckCSourceRuns.cmake | 2 -- Modules/CheckCXXSourceRuns.cmake | 2 -- 2 files changed, 4 deletions(-) diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake index 555b352b8..045fa7ee7 100644 --- a/Modules/CheckCSourceRuns.cmake +++ b/Modules/CheckCSourceRuns.cmake @@ -47,7 +47,6 @@ MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR) # if the return value was 0 then it worked SET(result_var ${${VAR}}) IF("${result_var}" EQUAL 0) - SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}") MESSAGE(STATUS "Performing Test ${VAR} - Success") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n" @@ -56,7 +55,6 @@ MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR) "Source file was:\n${SOURCE}\n") ELSE("${result_var}" EQUAL 0) MESSAGE(STATUS "Performing Test ${VAR} - Failed") - SET(${VAR} "" CACHE INTERNAL "Test ${VAR}") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing C SOURCE FILE Test ${VAR} failed with the following output:\n" "${OUTPUT}\n" diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake index f117977d0..920a5543f 100644 --- a/Modules/CheckCXXSourceRuns.cmake +++ b/Modules/CheckCXXSourceRuns.cmake @@ -48,7 +48,6 @@ MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR) # if the return value was 0 then it worked SET(result_var ${${VAR}}) IF("${result_var}" EQUAL 0) - SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}") MESSAGE(STATUS "Performing Test ${VAR} - Success") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n" @@ -57,7 +56,6 @@ MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR) "Source file was:\n${SOURCE}\n") ELSE("${result_var}" EQUAL 0) MESSAGE(STATUS "Performing Test ${VAR} - Failed") - SET(${VAR} "" CACHE INTERNAL "Test ${VAR}") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n" "${OUTPUT}\n"