Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node.abspath is nil #18

Open
WhoseTheNerd opened this issue Mar 18, 2022 · 2 comments
Open

node.abspath is nil #18

WhoseTheNerd opened this issue Mar 18, 2022 · 2 comments

Comments

@WhoseTheNerd
Copy link

Generating Clion project needs to generate cmake files, which errors for me. Might want to document what this error means and how to fix it for most of the cases.

whosethenerd@whosethenerd-pc:[~/dev/minecraft]: premake5 clion
Building configurations...
Running action 'clion'...
Error: /home/whosethenerd/.premake/cmake/cmake_project.lua:38: bad argument #2 to 'getrelative' (string expected, got nil)
whosethenerd@whosethenerd-pc:[~/dev/minecraft]: ls -l
total 12
-rw-r--r-- 1 whosethenerd whosethenerd 979 Mar 18 19:44 CMakeLists.txt
drwxr-xr-x 1 whosethenerd whosethenerd  24 Mar 18 19:47 minecraft
-rw-r--r-- 1 whosethenerd whosethenerd 244 Mar 18 19:47 premake5.lua
-rw-r--r-- 1 whosethenerd whosethenerd 236 Mar 18 19:16 README.md
whosethenerd@whosethenerd-pc:[~/dev/minecraft]: ls -l minecraft/
total 4
-rw-r--r-- 1 whosethenerd whosethenerd 430 Mar 18 19:47 premake5.lua
whosethenerd@whosethenerd-pc:[~/dev/minecraft]: cat premake5.lua 
workspace "minecraft"
    architecture "x86_64"

    configurations
    {
        "Debug",
        "Release"
    }

    flags
        {
                "MultiProcessorCompile"
        }

outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"

include "minecraft"
whosethenerd@whosethenerd-pc:[~/dev/minecraft]: cat minecraft/premake5.lua 
project "minecraft"
    kind "ConsoleApp"
    language "C++"
    cppdialect "C++17"
    staticruntime "on"

    targetdir ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
        objdir ("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}")

    files
        {
                "src/**.h",
                "src/**.cpp"
        }

    filter "configurations:Debug"
                runtime "Debug"
                symbols "on"

        filter "configurations:Release"
                runtime "Release"
                optimize "on"
whosethenerd@whosethenerd-pc:[~/dev/minecraft]: 
@WhoseTheNerd
Copy link
Author

It seems that the issue occurs when no files exist in that "src" path, might want to add an error message detailing that?

@Jarod42
Copy link

Jarod42 commented Apr 15, 2022

In my fork (https://github.com/Jarod42/premake-cmake), I have just handled that case. no errors for CMake generation.
Issue is reported when running cmake as no files to generate app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants