summaryrefslogtreecommitdiffstats
path: root/Tests/Dependency
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-08-25 14:14:31 (GMT)
committerBrad King <brad.king@kitware.com>2010-08-25 21:14:13 (GMT)
commitadb58d5e36e482e7cc2c0b1a37d94b21da9234df (patch)
treeb1d915bc894343ccba3e629ca9e790005b582072 /Tests/Dependency
parent681cf011dde81c08c0404569289110f9585c6daf (diff)
downloadCMake-adb58d5e36e482e7cc2c0b1a37d94b21da9234df.zip
CMake-adb58d5e36e482e7cc2c0b1a37d94b21da9234df.tar.gz
CMake-adb58d5e36e482e7cc2c0b1a37d94b21da9234df.tar.bz2
Honor strong intra-component target dependencies
Strong dependencies (created by add_dependencies) must be honored when linearizing a strongly-connected component of the target dependency graph. The initial graph edges have strong/weak labels and can contain cycles that do not consist exclusively of strong edges. The final graph never contains cycles so all edges can be strong.
Diffstat (limited to 'Tests/Dependency')
-rw-r--r--Tests/Dependency/Four/CMakeLists.txt3
-rw-r--r--Tests/Dependency/Four/FourSrc.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/Tests/Dependency/Four/CMakeLists.txt b/Tests/Dependency/Four/CMakeLists.txt
index ba3711f..df0f162 100644
--- a/Tests/Dependency/Four/CMakeLists.txt
+++ b/Tests/Dependency/Four/CMakeLists.txt
@@ -1,3 +1,6 @@
+INCLUDE_DIRECTORIES(${Dependency_BINARY_DIR}/Two)
ADD_LIBRARY( Four FourSrc.c )
TARGET_LINK_LIBRARIES( Four One Two NoDepA )
+# TwoCustom must build before Four.
+ADD_DEPENDENCIES(Four TwoCustom)
diff --git a/Tests/Dependency/Four/FourSrc.c b/Tests/Dependency/Four/FourSrc.c
index e8fefcd..23a66a4 100644
--- a/Tests/Dependency/Four/FourSrc.c
+++ b/Tests/Dependency/Four/FourSrc.c
@@ -1,3 +1,4 @@
+#include <two-test.h> /* Requires TwoCustom to be built first. */
void NoDepAFunction();
void OneFunction();
void TwoFunction();