CACI-International / ergo-cpp

A C++ build system library for ergo.
MIT License
2 stars 0 forks source link

relative-dir requires careful evaluation #3

Open calebzulawski opened 1 year ago

calebzulawski commented 1 year ago

This function works:

fn ~(Path:or-source :source) :args -> {
    Path :relative-dir = Path:parent $source
    c++:module ^{relative-dir} { ... }
}

however this function doesn't:

fn ~(Path:or-source :source) :args -> {
    relative-dir = Path:parent $source
    c++:module ^{relative-dir} { ... }
}

I haven't quite tracked down what "doesn't work" means--there is no ergo error, but the module paths are somehow evaluated differently (and result in compiler errors, specifically missing #includes). Also, I guess this is maybe a bug in ergo and not ergo-cpp...

afranchuk commented 1 year ago

I think I've seen some weird behavior there too. I'm not exactly sure the cause yet.