From 2b48e716b39be50ed165526e689fe8fd1ef3a45c Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 21 Jan 2008 20:57:23 -0500 Subject: [PATCH] ENH: Cleanup chrpath feature by not displaying exe format or placing non-advanced options in cache. --- Modules/CMakeDetermineCompilerId.cmake | 6 ++---- Modules/CMakeFindBinUtils.cmake | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index c831928ac..d684fb830 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -41,9 +41,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) # if the format is unknown after all files have been checked, put "Unknown" in the cache IF(NOT CMAKE_EXECUTABLE_FORMAT) - SET(CMAKE_EXECUTABLE_FORMAT "Unknown" CACHE STRING "Executable file format") - ELSE(NOT CMAKE_EXECUTABLE_FORMAT) - MESSAGE(STATUS "The executable file format is ${CMAKE_EXECUTABLE_FORMAT}") + SET(CMAKE_EXECUTABLE_FORMAT "Unknown" CACHE INTERNAL "Executable file format") ENDIF(NOT CMAKE_EXECUTABLE_FORMAT) # Display the final identification result. @@ -200,7 +198,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) # ELF files start with 0x7f"ELF" IF("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46") - SET(CMAKE_EXECUTABLE_FORMAT "ELF" CACHE STRING "Executable file format") + SET(CMAKE_EXECUTABLE_FORMAT "ELF" CACHE INTERNAL "Executable file format") ENDIF("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46") # # COFF (.exe) files start with "MZ" diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 16750e39a..60d7dae7e 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -85,5 +85,5 @@ IF("${CMAKE_EXECUTABLE_FORMAT}" STREQUAL "ELF" AND NOT CMAKE_CROSSCOMPILING) FIND_PROGRAM(CMAKE_CHRPATH chrpath PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) FIND_PROGRAM(CMAKE_CHRPATH chrpath) - MARK_AS_ADVANCED(CMAKE_CHRPATH) + MARK_AS_ADVANCED(CMAKE_CHRPATH CMAKE_USE_CHRPATH) ENDIF("${CMAKE_EXECUTABLE_FORMAT}" STREQUAL "ELF" AND NOT CMAKE_CROSSCOMPILING)