Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

mmh. cflags and cxxflags are command line options ? i would expect them to be defined as part of build file.


You can also define them in build file (xmake.lua)

    target("test")
        set_kind("binary")
        add_files("src/*.c", "src/*.cpp")
        add_cflags("-fPIC", "-Dxxx")
        add_cxxflags("-fPIC", "-Dxxx")
 
The command line arguments just give you a quick and easy way to modify cflags.


Not even that. Compiler flags are compiler/platform/library options, naturally, as build options need to be propagated from dependencies.

The people behind cmake already learned that lesson with their modern cmake approach, but it seems the xmake people didn't do a proper review of the state of the art.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: