Skip to content

Commit eafade6

Browse files
authored
Enable Compiler Optimization in GCC (#21)
* Set compiler optimization for GCC * Fix duplication
1 parent c7168e0 commit eafade6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

+7
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ if (IqsNative)
140140
endif()
141141

142142

143+
################################################################################
144+
# Enable compiler optimizations to fix GCC performance.
145+
################################################################################
146+
if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
147+
add_compile_options(-O3)
148+
endif()
149+
143150
################################################################################
144151
# Locate MKL if it is already configured through Intel (mklvars.sh) scripts.
145152
# - Follow the Intel compiler documentation to ensure that all of the

0 commit comments

Comments
 (0)