diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-06-27 02:27:44 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-06-27 02:28:47 +0200 |
commit | cf0c9479deedcbfc0592ac6d207b22ebf3655567 (patch) | |
tree | 008982a234f0a5ea7d1021dc151278dd143e669f /src/CmakeModule.cpp | |
parent | 0697f410b05085cdaf767d5b6fd3fea056ec5bd3 (diff) |
Diffstat (limited to 'src/CmakeModule.cpp')
-rw-r--r-- | src/CmakeModule.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/CmakeModule.cpp b/src/CmakeModule.cpp index 063cced..62aaf34 100644 --- a/src/CmakeModule.cpp +++ b/src/CmakeModule.cpp @@ -200,6 +200,19 @@ namespace sibs FileString cflags = TINYDIR_STRING("-fPIC"); FileString cxxflags; + // TODO: msvc + if(config.getCompiler() == Compiler::GCC || config.getCompiler() == Compiler::MINGW_W64) + { + switch(config.cpu) { + case sibs::CPU_INVALID: + case sibs::CPU_BASELINE: + break; + case sibs::CPU_NATIVE: + cflags += TINYDIR_STRING(" -march=native"); + break; + } + } + if(config.getCompiler() == Compiler::GCC || config.getCompiler() == Compiler::MINGW_W64) { cflags += TINYDIR_STRING(" -fno-omit-frame-pointer"); |