diff options
| -rw-r--r-- | xmake/modules/detect/tools/cl/features.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/gcc/features.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/detect/tools/cl/features.lua b/xmake/modules/detect/tools/cl/features.lua index b9b5bb623..9e273bd25 100644 --- a/xmake/modules/detect/tools/cl/features.lua +++ b/xmake/modules/detect/tools/cl/features.lua @@ -26,7 +26,7 @@ import("cxxfeatures") function _get_macro_defines(snippets, extension, opt) -- make an stub source file - local sourcefile = path.join(os.tmpdir(), "detect", "cl_features" .. extension) + local sourcefile = os.tmpfile() .. extension local objectfile = sourcefile .. ".obj" local binaryfile = sourcefile .. ".exe" io.writefile(sourcefile, "#include <stdio.h>\n\nint main(int argc, char** argv)\n{\n" .. table.concat(table.wrap(snippets), "\n") .. "\nreturn 0;\n}\n") diff --git a/xmake/modules/detect/tools/gcc/features.lua b/xmake/modules/detect/tools/gcc/features.lua index 7f2440a27..ef94e9d78 100644 --- a/xmake/modules/detect/tools/gcc/features.lua +++ b/xmake/modules/detect/tools/gcc/features.lua @@ -27,7 +27,7 @@ import("core.language.language") function _get_macro_defines(snippets, extension, opt) -- make an stub source file - local sourcefile = path.join(os.tmpdir(), "detect", "gcc_features" .. extension) + local sourcefile = os.tmpfile() .. extension io.writefile(sourcefile, table.concat(table.wrap(snippets), "\n")) -- get defines |
