cmake_minimum_required(VERSION 3.1)
+set(LYX_IPO_SUPPORTED FALSE)
if (POLICY CMP0069)
- if (LYX_DEBUG)
- cmake_policy(SET CMP0069 OLD)
- else()
+ if (NOT LYX_DEBUG)
cmake_policy(SET CMP0069 NEW)
+ include(CheckIPOSupported)
+ check_ipo_supported(RESULT LYX_IPO_SUPPORTED)
endif()
endif()
set(HUNSPELL_INCLUDE_DIR ${SRCDIR} CACHE STRING "Hunspell include dir" FORCE)
set(HUNSPELL_FOUND CACHE STRING "Hunspell found" FORCE)
-set_target_properties(hunspell PROPERTIES FOLDER "3rd_party")
+set_target_properties(hunspell PROPERTIES
+ FOLDER "3rd_party"
+ INTERPROCEDURAL_OPTIMIZATION ${LYX_IPO_SUPPORTED})
project ( libiconv C )
cmake_minimum_required(VERSION 3.1)
+set(LYX_IPO_SUPPORTED FALSE)
if (POLICY CMP0069)
- cmake_policy(SET CMP0069 NEW)
+ if (NOT LYX_DEBUG)
+ cmake_policy(SET CMP0069 NEW)
+ include(CheckIPOSupported)
+ check_ipo_supported(RESULT LYX_IPO_SUPPORTED)
+ endif()
endif()
set(CMAKE_MODULE_PATH .)
set(ICONV_LIBRARY iconv CACHE STRING "libiconv library" FORCE)
set(ICONV_FOUND iconv CACHE STRING "libiconv found" FORCE)
-set_target_properties(iconv PROPERTIES FOLDER "3rd_party")
+set_target_properties(iconv PROPERTIES
+ FOLDER "3rd_party"
+ INTERPROCEDURAL_OPTIMIZATION ${LYX_IPO_SUPPORTED})
cmake_minimum_required(VERSION 3.1)
+set(LYX_IPO_SUPPORTED FALSE)
if (POLICY CMP0069)
- if (LYX_DEBUG)
- cmake_policy(SET CMP0069 OLD)
- else()
+ if (NOT LYX_DEBUG)
cmake_policy(SET CMP0069 NEW)
+ include(CheckIPOSupported)
+ check_ipo_supported(RESULT LYX_IPO_SUPPORTED)
endif()
endif()
set(MYTHESLIB_INCLUDE_DIR ${SRCDIR} CACHE STRING "Mytheslib include dir" FORCE)
set(MYTHESLIB_FOUND CACHE STRING "Mytheslib found" FORCE )
-set_target_properties(mytheslibstatic PROPERTIES FOLDER "3rd_party")
+set_target_properties(mytheslibstatic PROPERTIES
+ FOLDER "3rd_party"
+ INTERPROCEDURAL_OPTIMIZATION ${LYX_IPO_SUPPORTED})
cmake_minimum_required(VERSION 3.1)
+set(LYX_IPO_SUPPORTED FALSE)
if (POLICY CMP0069)
- cmake_policy(SET CMP0069 NEW)
+ if (NOT LYX_DEBUG)
+ cmake_policy(SET CMP0069 NEW)
+ include(CheckIPOSupported)
+ check_ipo_supported(RESULT LYX_IPO_SUPPORTED)
+ endif()
endif()
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
set(ZLIB_INCLUDE_DIR ${SRCDIR} CACHE STRING "Zlib include dir" FORCE)
set(ZLIB_FOUND CACHE STRING "Zlib found" FORCE )
-set_target_properties(zlibstatic PROPERTIES FOLDER "3rd_party")
+set_target_properties(zlibstatic PROPERTIES
+ FOLDER "3rd_party"
+ INTERPROCEDURAL_OPTIMIZATION ${LYX_IPO_SUPPORTED})
endif()
endif()
# Enable LTO if supported and not debugging
+ set(LYX_IPO_SUPPORTED FALSE)
if (POLICY CMP0069)
- if (LYX_DEBUG)
- cmake_policy(SET CMP0069 OLD)
- else()
+ if (NOT LYX_DEBUG)
cmake_policy(SET CMP0069 NEW)
+ include(CheckIPOSupported)
+ check_ipo_supported(RESULT LYX_IPO_SUPPORTED)
endif()
endif()
endif()
add_dependencies(${_lyx} lyx_version)
-set_target_properties(${_lyx} PROPERTIES FOLDER "applications/LyX")
-
+set_target_properties(${_lyx} PROPERTIES
+ FOLDER "applications/LyX"
+ INTERPROCEDURAL_OPTIMIZATION ${LYX_IPO_SUPPORTED})
lyx_add_gcc_pch(${_lyx})
target_link_libraries(${_lyx}
lyx_const_touched_files(_allinone_linked LINKED_sources)
add_executable(${_tex2lyx} ${_allinone_files} ${_allinone_linked_files} ${FILE_RC})
endif()
-set_target_properties(${_tex2lyx} PROPERTIES FOLDER "applications/TeX2LyX")
+set_target_properties(${_tex2lyx} PROPERTIES
+ FOLDER "applications/TeX2LyX"
+ INTERPROCEDURAL_OPTIMIZATION ${LYX_IPO_SUPPORTED})
target_link_libraries(${_tex2lyx}
support