From ebfca7e92c54fb75f842af715560a78895c2b931 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Sat, 1 Apr 2023 23:25:03 -0300 Subject: [PATCH] CMAKE: Remove host cpu tuning options. It help with cross compilation and these flags can be added from the command line, e.g., using cmake -DCMAKE_Fortran_FLAGS="-march=native". Signed-off-by: Grzegorz Kowal --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de7f1c7..2880d74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,13 +19,13 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) endif() if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") - add_compile_options("$<$:-march=native;-pipe;-fno-tree-vectorize;-fno-unsafe-math-optimizations;-frounding-math;-fsignaling-nans;-finline-limit=10000;-fdiagnostics-color=always>") + add_compile_options("$<$:-pipe;-fno-tree-vectorize;-fno-unsafe-math-optimizations;-frounding-math;-fsignaling-nans;-finline-limit=10000;-fdiagnostics-color=always>") add_compile_options("$<$:-Og;-pedantic;-fcheck=all;-W;-Wall;-Wno-unused-dummy-argument>") endif() if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") - add_compile_options("$<$:-xHost;-fp-model=source;-heap-arrays;-ip;-unroll-aggressive;-simd;-qopt-prefetch;-use-intel-optimized-headers;-finline-limit=1000;-fno-omit-frame-pointer>") + add_compile_options("$<$:-fp-model=source;-heap-arrays;-ip;-unroll-aggressive;-simd;-qopt-prefetch;-use-intel-optimized-headers;-finline-limit=1000;-fno-omit-frame-pointer>") add_compile_options("$<$:-O>") - add_compile_options(-assume byterecl) + add_compile_options("-assume byterecl") endif() if(CMAKE_Fortran_COMPILER_ID MATCHES "PGI") add_compile_options("$<$:-fastsse;-O4;-Mvect=simd;-Minline=maxsize:1000>")