aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-18 14:01:40 -0700
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-18 14:01:40 -0700
commitd5021e7ed5aa3f30e25125e2569a6a94bbe502c4 (patch)
tree7f3ce0c259a337e8e944069b38f789a1bd836bbd /CMakeLists.txt
parentf4dc67879e965249191d4b6f9e43d5647c39921a (diff)
downloadnextpnr-d5021e7ed5aa3f30e25125e2569a6a94bbe502c4.tar.gz
nextpnr-d5021e7ed5aa3f30e25125e2569a6a94bbe502c4.tar.bz2
nextpnr-d5021e7ed5aa3f30e25125e2569a6a94bbe502c4.zip
Add IPO support for nextpnr, and have it enabled by default.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index daddb258..704815e3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,11 @@ project(nextpnr CXX C)
# Allow family.cmake add additional dependencies to gui_${family}.
cmake_policy(SET CMP0079 NEW)
+# Enable IPO support.
+cmake_policy(SET CMP0069 NEW)
+include(CheckIPOSupported)
+check_ipo_supported()
+
option(BUILD_GUI "Build GUI" OFF)
option(BUILD_PYTHON "Build Python Integration" ON)
option(BUILD_TESTS "Build tests" OFF)
@@ -14,6 +19,8 @@ option(STATIC_BUILD "Create static build" OFF)
option(EXTERNAL_CHIPDB "Create build with pre-built chipdb binaries" OFF)
option(WERROR "pass -Werror to compiler (used for CI)" OFF)
+set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
+
if(WIN32 OR EXTERNAL_CHIPDB)
set(BBASM_MODE "binary")
else()