diff options
author | Brad King <brad.king@kitware.com> | 2015-04-02 17:16:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-09 18:21:00 (GMT) |
commit | d8126d3784c149f1738865cc239a34fdd29ec442 (patch) | |
tree | 74728e509fb0a30a8b08d50c45dae535965324ac | |
parent | af61d6cb60a38069fb82f54bd7f2eb2b798bf4dc (diff) | |
download | CMake-d8126d3784c149f1738865cc239a34fdd29ec442.zip CMake-d8126d3784c149f1738865cc239a34fdd29ec442.tar.gz CMake-d8126d3784c149f1738865cc239a34fdd29ec442.tar.bz2 |
liblzma: Disable XL compiler optimizations
Somehow the XL compiler optimizations create incorrect behavior in
liblzma and lead to crashes or truncated output during compression.
-rw-r--r-- | Utilities/cmliblzma/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Utilities/cmliblzma/CMakeLists.txt b/Utilities/cmliblzma/CMakeLists.txt index d991438..991c699 100644 --- a/Utilities/cmliblzma/CMakeLists.txt +++ b/Utilities/cmliblzma/CMakeLists.txt @@ -211,4 +211,10 @@ ENDIF() ADD_LIBRARY(cmliblzma ${LZMA_SRCS}) +IF(CMAKE_C_COMPILER_ID STREQUAL "XL") + # Disable the XL compiler optimizer because it causes crashes + # and other bad behavior in liblzma code. + SET_PROPERTY(TARGET cmliblzma PROPERTY COMPILE_FLAGS "-qnooptimize") +ENDIF() + INSTALL(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmliblzma) |