]> git.lyx.org Git - features.git/commitdiff
Cmake build: Disable interprocedural optimization if debugging
authorKornel Benko <kornel@lyx.org>
Tue, 30 Jul 2019 13:19:56 +0000 (15:19 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:42 +0000 (15:48 +0200)
3rdparty/hunspell/CMakeLists.txt
3rdparty/mythes/CMakeLists.txt
CMakeLists.txt

index dfa9a287c0020e5ccacd2ba271030f748f721e2f..ad67b438654bdfa2b44f0866395f6471f332d64c 100644 (file)
@@ -2,7 +2,11 @@
 cmake_minimum_required(VERSION 3.1)
 
 if (POLICY CMP0069)
-  cmake_policy(SET CMP0069 NEW)
+  if (LYX_DEBUG)
+    cmake_policy(SET CMP0069 OLD)
+  else()
+    cmake_policy(SET CMP0069 NEW)
+  endif()
 endif()
 
 project(hunspell)
index 9457df2b73185448ceec1f9da8d32b961ca6d926..d970ef23c337abc3d03ff4d07efe289ec1223a41 100644 (file)
@@ -1,7 +1,11 @@
 cmake_minimum_required(VERSION 3.1)
 
 if (POLICY CMP0069)
-  cmake_policy(SET CMP0069 NEW)
+  if (LYX_DEBUG)
+    cmake_policy(SET CMP0069 OLD)
+  else()
+    cmake_policy(SET CMP0069 NEW)
+  endif()
 endif()
 
 set(VERSION "1.2.5")
index e4e278908412406ba14faee3417a2613f7496dfc..f759d8f45bdeb314939bf5e1b75169b24cd2f2c2 100644 (file)
@@ -81,16 +81,12 @@ if(NOT help AND NOT HELP)
       message(FATAL_ERROR "Exiting")
     endif()
   endif()
-  # Enable LTO if supported
+  # Enable LTO if supported and not debugging
   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)
+    if (LYX_DEBUG)
+      cmake_policy(SET CMP0069 OLD)
     else()
-      message(STATUS "Not setting IPO , result = ${result}, reason = ${reason}")
+      cmake_policy(SET CMP0069 NEW)
     endif()
   endif()
 endif()