From f5f4537f508af08f2121d42783cff7b39aa84d2f Mon Sep 17 00:00:00 2001 From: cangumeli Date: Tue, 16 Jun 2020 06:29:34 +0200 Subject: [PATCH 1/2] Set compiler optimization for GCC --- CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c439031..a9688876 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,14 @@ set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) +################################################################################ +# Set some compiler options related to C++. +################################################################################ + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + ################################################################################ # Options for the build. ################################################################################ @@ -140,6 +148,13 @@ if (IqsNative) endif() +################################################################################ +# Enable compiler optimizations to fix GCC performance. +################################################################################ +if (CMAKE_CXX_COMPILER_ID MATCHES GNU) + add_compile_options(-O3) +endif() + ################################################################################ # Locate MKL if it is already configured through Intel (mklvars.sh) scripts. # - Follow the Intel compiler documentation to ensure that all of the From ad8f0cc12a3f349aceeff380b91bdf2c9c7771c0 Mon Sep 17 00:00:00 2001 From: cangumeli Date: Tue, 16 Jun 2020 06:32:20 +0200 Subject: [PATCH 2/2] Fix duplication --- CMakeLists.txt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9688876..a674e612 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,14 +38,6 @@ set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) -################################################################################ -# Set some compiler options related to C++. -################################################################################ - -set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_EXTENSIONS OFF) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - ################################################################################ # Options for the build. ################################################################################