1
General discussions / Premake
« on: September 12, 2011, 05:35:42 am »
What my project files would look like if I did something similar to what you have done with CMake files (moving the code to FindXXX.cmake files, essentially):
If you don't think that's short, readable and manageable, you shouldn't be programming.
Here's a list of other ways why people should use Premake over CMake:
-Easier to NOT use Premake
For example, if you are only making your project on Windows, and you are using Visual Studios, it might be better for you to just generate the project files and add those to your solution. With CMake, you actually have to edit the vcxproj files (to get rid of the build step) in Notepad to make it not run CMake every time. Then you get to go through and delete CMakeLists files and find all of the little things CMake left behind. In Premake, you generate it, and delete the lua file, and you're done.
-No junk files ("build directory")
I hate generating a project in CMake and having an entire folder of irrelevant trash. I just want the project files. This disgusts me.
-It uses a scripting langauge
A lot of programmers know Lua (especially in the game industry, where it is used in multiple game engines). If you want to start using CMake, you have to learn an entirely new language, that's not elegant or even reasonably readable at all.
-Documentation
Premake has a nice "Scripting with Premake" tutorial section, in addition to pretty straightforward scripting reference. CMake has a generated, monolithic list of commands.
Code: [Select]
dofile "sfml/sfml_static.lua"
solution "Sortmania"
AddSFML()
project "Sortmania"
kind "WindowedApp"
language "C++"
includedirs { "src" }
files { "src/**.cpp" }
LinkSFML()
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
configuration "Release"
flags { "Optimize" }
If you don't think that's short, readable and manageable, you shouldn't be programming.
Here's a list of other ways why people should use Premake over CMake:
-Easier to NOT use Premake
For example, if you are only making your project on Windows, and you are using Visual Studios, it might be better for you to just generate the project files and add those to your solution. With CMake, you actually have to edit the vcxproj files (to get rid of the build step) in Notepad to make it not run CMake every time. Then you get to go through and delete CMakeLists files and find all of the little things CMake left behind. In Premake, you generate it, and delete the lua file, and you're done.
-No junk files ("build directory")
I hate generating a project in CMake and having an entire folder of irrelevant trash. I just want the project files. This disgusts me.
-It uses a scripting langauge
A lot of programmers know Lua (especially in the game industry, where it is used in multiple game engines). If you want to start using CMake, you have to learn an entirely new language, that's not elegant or even reasonably readable at all.
-Documentation
Premake has a nice "Scripting with Premake" tutorial section, in addition to pretty straightforward scripting reference. CMake has a generated, monolithic list of commands.