diff options
author | Amitha Perera <perera@cs.rpi.edu> | 2002-05-10 17:35:42 (GMT) |
---|---|---|
committer | Amitha Perera <perera@cs.rpi.edu> | 2002-05-10 17:35:42 (GMT) |
commit | 0e6b39e52f561228e3e17bafe4bc7a44da88bf00 (patch) | |
tree | 565638d08eebd83d40cc7ff387b0bbc0994729f8 /Tests/Dependency/Exec2 | |
parent | 6b08b83d892672f0a5849af71441cb06dc2b45e8 (diff) | |
download | CMake-0e6b39e52f561228e3e17bafe4bc7a44da88bf00.zip CMake-0e6b39e52f561228e3e17bafe4bc7a44da88bf00.tar.gz CMake-0e6b39e52f561228e3e17bafe4bc7a44da88bf00.tar.bz2 |
BUG: Correct some of the dependency analysis code.
- Make sure the original link line is untouched
- Avoid duplicating the link line when supporting version < 1.4
- Make sure the cyclic dependencies and such are output correctly in
complicated cases.
- Avoid outputing dependencies that are already satisfied on the original
link line when possible.
Diffstat (limited to 'Tests/Dependency/Exec2')
-rw-r--r-- | Tests/Dependency/Exec2/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Tests/Dependency/Exec2/ExecMain.c | 14 |
2 files changed, 26 insertions, 0 deletions
diff --git a/Tests/Dependency/Exec2/CMakeLists.txt b/Tests/Dependency/Exec2/CMakeLists.txt new file mode 100644 index 0000000..ee0c74d --- /dev/null +++ b/Tests/Dependency/Exec2/CMakeLists.txt @@ -0,0 +1,12 @@ +# Here, Eight depends on Seven, which has the same dependencies as Five. +# If the dependencies of Five are emitted, and then we attempt to emit the +# dependencies of Seven, then we find that they have already been done. So: +# Original line: Eight Five +# Add deps of Five: Eight Five Two ... NoDepA +# Now, we must make sure that Seven gets inserted between Five and Two, and +# not at the end. Unfortunately, if we get it wrong, the test will only +# fail on a platform where the link order makes a difference. +LINK_LIBRARIES( Eight Five ) + +ADD_EXECUTABLE( exec2 ExecMain.c ) + diff --git a/Tests/Dependency/Exec2/ExecMain.c b/Tests/Dependency/Exec2/ExecMain.c new file mode 100644 index 0000000..d08a796 --- /dev/null +++ b/Tests/Dependency/Exec2/ExecMain.c @@ -0,0 +1,14 @@ +#include <stdio.h> + +void FiveFunction(); +void EightFunction(); + +int main( ) +{ + FiveFunction(); + EightFunction(); + + printf("Dependency test executable ran successfully.\n"); + + return 0; +} |