diff options
author | Brad King <brad.king@kitware.com> | 2008-02-27 21:26:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-02-27 21:26:35 (GMT) |
commit | 4c137bad6b663ff342064c293a49fecf03498207 (patch) | |
tree | e12f64e2c7056c860cf62508c482bfc86f9222e3 /Source/CMakeLists.txt | |
parent | 69ad23a6e73e7eda68b79b4711723190e7bdcdcd (diff) | |
download | CMake-4c137bad6b663ff342064c293a49fecf03498207.zip CMake-4c137bad6b663ff342064c293a49fecf03498207.tar.gz CMake-4c137bad6b663ff342064c293a49fecf03498207.tar.bz2 |
ENH: Add ELF file parsing
- Enabled when system provides elf.h
- Introduce cmELF class to parse ELF files
- Use in cmSystemTools::GuessLibrarySOName to really get soname
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r-- | Source/CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 987e908..39c0731 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1,3 +1,11 @@ +# Check if we can build support for ELF parsing. +CHECK_INCLUDE_FILE("elf.h" HAVE_ELF_H) +IF(HAVE_ELF_H) + SET(CMAKE_USE_ELF_PARSER 1) +ELSE(HAVE_ELF_H) + SET(CMAKE_USE_ELF_PARSER) +ENDIF(HAVE_ELF_H) + # configure the .h file CONFIGURE_FILE( "${CMake_SOURCE_DIR}/Source/cmConfigure.cmake.h.in" @@ -75,6 +83,12 @@ IF(CMAKE_REGENERATE_YACCLEX) ENDIF(FLEX_EXECUTABLE) ENDIF(CMAKE_REGENERATE_YACCLEX) + +# Check if we can build the ELF parser. +IF(CMAKE_USE_ELF_PARSER) + SET(ELF_SRCS cmELF.h cmELF.cxx) +ENDIF(CMAKE_USE_ELF_PARSER) + # # Sources for CMakeLib # @@ -123,6 +137,7 @@ SET(SRCS cmDocumentVariables.cxx cmDynamicLoader.cxx cmDynamicLoader.h + ${ELF_SRCS} cmExprLexer.cxx cmExprParser.cxx cmExprParserHelper.cxx |