Multiple main()s? [message #1267691] |
Sun, 09 March 2014 11:52 |
Henry Chan Messages: 19 Registered: October 2009 |
Junior Member |
|
|
Hi,
Let's I have the following layouts:
/workspace/project1/src/exec1/main.cpp
/workspace/project1/src/exec2/main.cpp
/workspace/project1/src/util/util.cpp
/workspace/project1/src/util/FileReader.cpp
/workspace/project1/src/comm/a.cpp b.cpp c.cpp
Let's exec1/main.cpp needs util/*.cpp and comm/*.cpp, and exec1/main.cpp needs util/FileReader.cpp only but not the rest.
I know I can create two build configurations and I can exclude those unrelated cpp files 1 by 1 through "Resource Configuration"->"Exclude From Build".
However, if I select a folder, let's say util, and I try to exclude the whole folder for a new build configuration (let's say exec3/main.cpp), then Eclipse CDT will make exec1/main.cpp and exec2/main.cpp to include util/*.cpp because I don't check their build configuration when I exclude for exec3/main.cpp's build configuration.
I wonder whether there is a way that I can specify what to exclude for just one build configuration but not to specify for the rest of build configurations.
Or what are the best practices to deal with this kind of "spaghetti" code sharing across different build configurations in 1 Eclispe project?
Thanks in advance.
[Updated on: Sun, 09 March 2014 11:53] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02837 seconds