From a5fec576f96a67c8da3a8400b9fbbe1a03dca422 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Mon, 25 Nov 2024 19:57:13 +0100 Subject: [PATCH] Set default workspace instead of requiring outpath This uses ./build/workspaces/default as location for generated build files as well as build products. Using the name "default" to avoid the dilemma gcc vs clang vs premake generator. Doesn't impact scripts already using --outpath and allows running premake5 --help without a wrapper. Also update .gitignore to make using arbitrary workspaces cleaner. Signed-off-by: Ralph Sennhauser --- .gitignore | 11 ++++------- build/premake/premake5.lua | 5 +---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index f91449ec68..19062a0d16 100644 --- a/.gitignore +++ b/.gitignore @@ -4,13 +4,10 @@ binaries/system/* !binaries/system/readme.txt # Workspaces -build/workspaces/codeblocks/ -build/workspaces/gcc/ -build/workspaces/xcode3/ -build/workspaces/xcode4/ -build/workspaces/vc2013 -build/workspaces/vc2015 -build/workspaces/vs2017 +build/workspaces +!build/workspaces/clean-workspaces.sh +!build/workspaces/update-workspaces.bat +!build/workspaces/update-workspaces.sh # Libraries libraries/macos diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index 0c3bc2e75d..fa27642edc 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -5,7 +5,7 @@ newoption { trigger = "gles", description = "Use non-working OpenGL ES 2.0 mode" newoption { trigger = "icc", description = "Use Intel C++ Compiler (Linux only; should use either \"--cc icc\" or --without-pch too, and then set CXX=icpc before calling make)" } newoption { trigger = "jenkins-tests", description = "Configure CxxTest to use the XmlPrinter runner which produces Jenkins-compatible output" } newoption { trigger = "minimal-flags", description = "Only set compiler/linker flags that are really needed. Has no effect on Windows builds" } -newoption { trigger = "outpath", description = "Location for generated project files" } +newoption { trigger = "outpath", description = "Location for generated project files", default="../workspaces/default" } newoption { trigger = "with-system-cxxtest", description = "Search standard paths for cxxtest, instead of using bundled copy" } newoption { trigger = "with-lto", description = "Enable Link Time Optimization (LTO)" } newoption { trigger = "with-system-mozjs", description = "Search standard paths for libmozjs91, instead of using bundled copy" } @@ -121,9 +121,6 @@ end workspace "pyrogenesis" targetdir(rootdir.."/binaries/system") libdirs(rootdir.."/binaries/system") -if not _OPTIONS["outpath"] then - error("You must specify the 'outpath' parameter") -end location(_OPTIONS["outpath"]) configurations { "Release", "Debug" }