including .cpp files is broken for nobs build
If a file has a #include of another file, the compilation doesn't work correctly. e.g. if we have a file meep.cpp with
int meep(void) { return 1; }
and a file beep.cpp with
#include "meep.cpp"
then we get an error of multiple definition of meep()
And if upcxx::
is used in the included file, it is not recognized, so if beep.cpp has
#include <upcxx/upcxx.hpp>
and in meep.cpp we have
upcxx::future<int> f;
then we get the error
‘upcxx’ has not been declared
Note: this used to work just fine a few days ago. Not sure what commit broke it.
Comments (6)
-
Account Deleted -
Account Deleted I will fix this, but cpp's including other cpp's is not hygienic. beep.cpp should include meep.hpp. Nobs will see that and launch a separate compile for meep.cpp automatically and link both beep.o and meep.o together.
-
reporter sure it's bad style, but allowable by all c++ compilers.
-
- changed component to nobs
- changed version to Development Branch
-
Account Deleted - changed status to resolved
-
-
assigned issue to
-
assigned issue to
- Log in to comment
I will fix this, but cpp's including other cpp's is not hygienic. beep.cpp should include meep.hpp. Nobs will see that and launch a separate compile for meep.cpp automatically and link both beep.o and meep.o together.