summaryrefslogtreecommitdiffstats
path: root/Tests/BundleTest/BundleTest.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2008-09-02 15:07:04 (GMT)
committerDavid Cole <david.cole@kitware.com>2008-09-02 15:07:04 (GMT)
commita54e97cf946e82de6b73c26c64b7fe3efdf0be43 (patch)
tree83e2ced27b238b65b902ac0e2c5e9286c48d70dc /Tests/BundleTest/BundleTest.cxx
parent698b8044a627293dd6a453c2fa10284000b2f5b1 (diff)
downloadCMake-a54e97cf946e82de6b73c26c64b7fe3efdf0be43.zip
CMake-a54e97cf946e82de6b73c26c64b7fe3efdf0be43.tar.gz
CMake-a54e97cf946e82de6b73c26c64b7fe3efdf0be43.tar.bz2
ENH: Add indirect dependency to Carbon and call a Carbon function from executable. This will allow detecting broken dependency chaining for '-framework blah' style lib dependencies.
Diffstat (limited to 'Tests/BundleTest/BundleTest.cxx')
-rw-r--r--Tests/BundleTest/BundleTest.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/BundleTest/BundleTest.cxx b/Tests/BundleTest/BundleTest.cxx
index 1e508ac..29d17db 100644
--- a/Tests/BundleTest/BundleTest.cxx
+++ b/Tests/BundleTest/BundleTest.cxx
@@ -1,9 +1,20 @@
#include <stdio.h>
+#include <Carbon/Carbon.h>
+
extern int foo(char* exec);
int main(int argc, char* argv[])
{
printf("Started with: %d arguments\n", argc);
+
+ // Call a "Carbon" function... but pull in the link dependency on "-framework
+ // Carbon" via CMake's dependency chaining mechanism. This code exists to
+ // verify that the chaining mechanism works with "-framework blah" style
+ // link dependencies.
+ //
+ CFBundleRef br = CFBundleGetMainBundle();
+ (void) br;
+
return foo(argv[0]);
}