summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-10-07 22:41:09 +0800
committerruki <[email protected]>2020-10-07 22:41:09 +0800
commit272052e6545c85c5fcc90cd7fd81177cbb431de1 (patch)
treecaaedef6386aef5947dfc1b3dd18256203214c69
parent9779cee5d7da7ea01a18141ae5811719d4730410 (diff)
add fpmodels for icc
-rw-r--r--xmake/languages/c++/xmake.lua4
-rw-r--r--xmake/modules/core/tools/icc.lua15
-rw-r--r--xmake/modules/core/tools/icl.lua8
-rw-r--r--xmake/modules/core/tools/icpc.lua9
4 files changed, 16 insertions, 20 deletions
diff --git a/xmake/languages/c++/xmake.lua b/xmake/languages/c++/xmake.lua
index a7b73a677..db18347c8 100644
--- a/xmake/languages/c++/xmake.lua
+++ b/xmake/languages/c++/xmake.lua
@@ -58,7 +58,7 @@ language("c++")
, "config.frameworks"
, "target.symbols"
, "target.warnings"
- , "target.fpmodels:check"
+ , "target.fpmodels"
, "target.optimize:check"
, "target.vectorexts:check"
, "target.languages"
@@ -71,7 +71,7 @@ language("c++")
, "target.pcxxheader"
, "option.symbols"
, "option.warnings"
- , "option.fpmodels:check"
+ , "option.fpmodels"
, "option.optimize:check"
, "option.vectorexts:check"
, "option.languages"
diff --git a/xmake/modules/core/tools/icc.lua b/xmake/modules/core/tools/icc.lua
index 9a0eabac1..f9355c6b2 100644
--- a/xmake/modules/core/tools/icc.lua
+++ b/xmake/modules/core/tools/icc.lua
@@ -26,6 +26,15 @@ function init(self)
_super.init(self)
end
--- TODO
--- inherit gcc.lua and override some interfaces in gcc.lua
--- ...
+-- make the fp-model flag
+function nf_fpmodel(self, level)
+ local maps =
+ {
+ precise = "-fp-model=precise"
+ , fast = "-fp-model=fast" --default
+ , strict = "-fp-model=strict"
+ , except = "-fp-model=except"
+ , noexcept = "-fp-model=no-except"
+ }
+ return maps[level]
+end
diff --git a/xmake/modules/core/tools/icl.lua b/xmake/modules/core/tools/icl.lua
index bd2bd5e14..07f259f99 100644
--- a/xmake/modules/core/tools/icl.lua
+++ b/xmake/modules/core/tools/icl.lua
@@ -21,11 +21,3 @@
-- inherit cl
inherit("cl")
--- init it
-function init(self)
-
-end
-
--- TODO
--- inherit cl.lua and override some interfaces in cl.lua
--- ...
diff --git a/xmake/modules/core/tools/icpc.lua b/xmake/modules/core/tools/icpc.lua
index 6639bfcfe..a30fba433 100644
--- a/xmake/modules/core/tools/icpc.lua
+++ b/xmake/modules/core/tools/icpc.lua
@@ -18,11 +18,6 @@
-- @file icpc.lua
--
--- inherit gcc
-inherit("gcc")
-
--- init it
-function init(self)
- _super.init(self)
-end
+-- inherit icc
+inherit("icc")