All: Re-enable LTO for zlib and libpng
Jeffrey Pfau jeffrey@endrift.com
Mon, 31 Aug 2015 22:24:17 -0700
1 files changed,
0 insertions(+),
6 deletions(-)
jump to
M
CMakeLists.txt
→
CMakeLists.txt
@@ -372,8 +372,6 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libmagickwand${MAGICKWAND_DEB_VERSION}")
endif() if(WANT_ZLIB AND NOT USE_ZLIB) - set(CMAKE_C_FLAGS_RELEASE_OLD "${CMAKE_C_FLAGS_RELEASE}") - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-lto") add_subdirectory(${CMAKE_SOURCE_DIR}/src/third-party/zlib zlib) set_property(TARGET zlibstatic PROPERTY INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR}/zlib;${CMAKE_SOURCE_DIR}/src/third-party/zlib) set_property(TARGET zlib PROPERTY EXCLUDE_FROM_ALL ON)@@ -382,7 +380,6 @@ set_property(TARGET minigzip PROPERTY EXCLUDE_FROM_ALL ON)
set(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/third-party/zlib ${CMAKE_BINARY_DIR}/zlib) set(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/third-party/zlib ${CMAKE_BINARY_DIR}/zlib) set(ZLIB_LIBRARY zlibstatic) - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_OLD}") list(APPEND DEPENDENCY_LIB zlibstatic) set(USE_ZLIB ON) endif()@@ -399,12 +396,9 @@ set(PNG_STATIC ON CACHE BOOL "" FORCE)
set(PNG_SHARED OFF CACHE BOOL "" FORCE) set(PNG_TESTS OFF CACHE BOOL "" FORCE) set(SKIP_INSTALL_ALL ON) - set(CMAKE_C_FLAGS_RELEASE_OLD "${CMAKE_C_FLAGS_RELEASE}") - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-lto") add_subdirectory(${CMAKE_SOURCE_DIR}/src/third-party/libpng libpng) set_property(TARGET png16_static PROPERTY INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR}/libpng;${CMAKE_SOURCE_DIR}/src/third-party/libpng;${ZLIB_INCLUDE_DIRS}) set(PNG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/third-party/libpng ${CMAKE_BINARY_DIR}/libpng) - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_OLD}") list(APPEND DEPENDENCY_LIB png16_static) set(USE_PNG ON) endif()