diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua
index 0b160374..c4be0603 100644
--- a/src/actions/vstudio/vs2010_vcxproj.lua
+++ b/src/actions/vstudio/vs2010_vcxproj.lua
@@ -1352,7 +1352,7 @@
function m.floatingPointModel(cfg)
- if cfg.floatingpoint then
+ if cfg.floatingpoint and cfg.floatingpoint ~= "Default" then
m.element("FloatingPointModel", nil, cfg.floatingpoint)
end
end
diff --git a/src/tools/clang.lua b/src/tools/clang.lua
index 282f7d28..2928fcb5 100644
--- a/src/tools/clang.lua
+++ b/src/tools/clang.lua
@@ -44,7 +44,9 @@
clang.shared = {
architecture = gcc.shared.architecture,
flags = gcc.shared.flags,
- floatingpoint = gcc.shared.floatingpoint,
+ floatingpoint = {
+ Fast = "-ffast-math",
+ },
strictaliasing = gcc.shared.strictaliasing,
optimize = {
Off = "-O0",
diff --git a/tests/actions/vstudio/vc2010/test_floatingpoint.lua b/tests/actions/vstudio/vc2010/test_floatingpoint.lua
index abd65b59..1816ff24 100644
--- a/tests/actions/vstudio/vc2010/test_floatingpoint.lua
+++ b/tests/actions/vstudio/vc2010/test_floatingpoint.lua
@@ -30,7 +30,7 @@
function suite.floatingPoint_onFloatFast()
- flags "FloatFast"
+ floatingpoint "fast"
prepare()
test.capture [[
Fast
@@ -38,12 +38,15 @@
end
function suite.floatingPoint_onFloatStrict()
- flags "FloatStrict"
+ floatingpoint "strict"
prepare()
test.capture [[
Strict
]]
end
-
-
+ function suite.floatingPoint_onDefault()
+ floatingpoint "Default"
+ prepare()
+ test.isemptycapture()
+ end