]> git.lyx.org Git - lyx.git/blobdiff - CMakeLists.txt
Remove unneeded std::move
[lyx.git] / CMakeLists.txt
index 965f22f3c54427cb0008287e4246193f95223887..e8c3c32c94fa9fcbd4f3e0112ca32f40820214fc 100644 (file)
@@ -81,6 +81,18 @@ if(NOT help AND NOT HELP)
       message(FATAL_ERROR "Exiting")
     endif()
   endif()
+  # Enable LTO if supported
+  if (POLICY CMP0069)
+    cmake_policy(SET CMP0069 NEW)
+    include(CheckIPOSupported)
+    check_ipo_supported(RESULT result OUTPUT reason LANGUAGES CXX)
+    if(result)
+      message(STATUS "Setting IPO True")
+      set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
+    else()
+      message(STATUS "Not setting IPO , result = ${result}, reason = ${reason}")
+    endif()
+  endif()
 endif()
 
 if(UNIX)
@@ -143,6 +155,7 @@ LYX_OPTION(ASAN             "Use address sanitizer" OFF ALL)
 LYX_COMBO(USE_FILEDIALOG    "Use native or QT file dialog" QT NATIVE)
 LYX_COMBO(USE_QT            "Use Qt version as frontend" AUTO QT4 QT5)
 #LYX_OPTION(3RDPARTY_BUILD   "Build 3rdparty libs" OFF ALL)
+LYX_OPTION(DISABLE_CALLSTACK_PRINTING "do not print a callstack when crashing" OFF ALL)
 LYX_OPTION(EXTERNAL_Z       "OFF := Build 3rdparty lib zlib" ON ALL)
 LYX_OPTION(EXTERNAL_ICONV   "OFF := Build 3rdparty lib iconvlib" ON ALL)
 LYX_OPTION(EXTERNAL_HUNSPELL "OFF := Build 3rdparty lib hunspelllib" ON ALL)