18 ms·
mmh. cflags and cxxflags are command line options ? i would expect them to be defined as part of build file.
by je42 8y ago
mmh. cflags and cxxflags are command line options ? i would expect them to be defined as part of build file.
- waruqi 8y agoYou 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.
- geezerjay 8y agoNot 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.