diff --git a/build/premake/cxxtest/cxxtest.lua b/build/premake/cxxtest/cxxtest.lua index e46ceecc36..f777339699 100644 --- a/build/premake/cxxtest/cxxtest.lua +++ b/build/premake/cxxtest/cxxtest.lua @@ -39,15 +39,15 @@ function m.init(source_root, have_std, runner, includes, root_includes) -- With gmake, create a Utility project that generates the test root file -- This is a workaround for https://github.com/premake/premake-core/issues/286 - if _ACTION == "gmake" then + if _ACTION == "gmake2" then project "cxxtestroot" - kind "Utility" + kind "Makefile" -- Note: this command is not silent and clutters the output -- Reported upstream: https://github.com/premake/premake-core/issues/954 - prebuildmessage 'Generating test root file' - prebuildcommands { m.exepath.." --root "..m.rootoptions.." --runner="..m.runner.." -o "..path.getabsolute(m.rootfile) } - buildoutputs { m.rootfile } + buildmessage 'Generating test root file' + buildcommands { m.exepath.." --root "..m.rootoptions.." --runner="..m.runner.." -o "..path.getabsolute(m.rootfile) } + cleancommands { "rm " .. path.getabsolute(m.rootfile) } end end @@ -56,7 +56,7 @@ function m.configure_project(hdrfiles) -- Generate the root file, or make sure the utility for generating -- it is a dependancy with gmake. - if _ACTION == "gmake" then + if _ACTION == "gmake2" then dependson { "cxxtestroot" } else prebuildmessage 'Generating test root file' @@ -78,9 +78,11 @@ function m.configure_project(hdrfiles) -- Add source files files { m.rootfile } - for _,hdrfile in ipairs(hdrfiles) do - local srcfile = string.sub(hdrfile, 1, -3) .. ".cpp" - files { srcfile } + if not (_ACTION == "gmake2") then + for _,hdrfile in ipairs(hdrfiles) do + local srcfile = string.sub(hdrfile, 1, -3) .. ".cpp" + files { srcfile } + end end end diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index 9839434bd4..b6d4a718ef 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -395,7 +395,7 @@ function project_set_build_flags() end -- Adding the executable path and taking care of correct escaping - if _ACTION == "gmake" then + if _ACTION == "gmake2" then linkoptions { "-Wl,-rpath,'$$ORIGIN'" } elseif _ACTION == "codeblocks" then linkoptions { "-Wl,-R\\\\$$$ORIGIN" } diff --git a/build/workspaces/update-workspaces.sh b/build/workspaces/update-workspaces.sh index b407e5dfd9..7eafb028d5 100755 --- a/build/workspaces/update-workspaces.sh +++ b/build/workspaces/update-workspaces.sh @@ -86,10 +86,10 @@ export HOSTTYPE="$HOSTTYPE" echo "Premake args: ${premake_args}" if [ "$OS" != "Darwin" ]; then # shellcheck disable=SC2086 - ${premake_command} --file="premake5.lua" --outpath="../workspaces/gcc/" ${premake_args} gmake || die "Premake failed" + ${premake_command} --file="premake5.lua" --outpath="../workspaces/gcc/" ${premake_args} gmake2 || die "Premake failed" else # shellcheck disable=SC2086 - ${premake_command} --file="premake5.lua" --outpath="../workspaces/gcc/" --macosx-version-min="${MIN_OSX_VERSION}" ${premake_args} gmake || die "Premake failed" + ${premake_command} --file="premake5.lua" --outpath="../workspaces/gcc/" --macosx-version-min="${MIN_OSX_VERSION}" ${premake_args} gmake2 || die "Premake failed" # Also generate xcode workspaces if on OS X # shellcheck disable=SC2086 ${premake_command} --file="premake5.lua" --outpath="../workspaces/xcode4" --macosx-version-min="${MIN_OSX_VERSION}" ${premake_args} xcode4 || die "Premake failed"