[Cmake-commits] CMake branch, next, updated. v3.1.0-rc1-504-ga5ac2c8
Brad King
brad.king at kitware.com
Mon Nov 10 14:46:13 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via a5ac2c8c66194e177ba45ed328c1fcc0fbbda143 (commit)
via af169422fc642a45e32a1b40e09a8ad91615777b (commit)
from 47374d622e9f0543875c4dfca4174ed60a19323b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5ac2c8c66194e177ba45ed328c1fcc0fbbda143
commit a5ac2c8c66194e177ba45ed328c1fcc0fbbda143
Merge: 47374d6 af16942
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 10 14:46:13 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Nov 10 14:46:13 2014 -0500
Merge topic 'fix_link-line-dedup_regression' into next
af169422 Tests/Dependency/Case5: Fix dll, simplify impl
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af169422fc642a45e32a1b40e09a8ad91615777b
commit af169422fc642a45e32a1b40e09a8ad91615777b
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 10 14:41:58 2014 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Nov 10 14:42:20 2014 -0500
Tests/Dependency/Case5: Fix dll, simplify impl
Add dllexport/dllimport markup. Just hard-code declarations
instead of using headers, since the headers would need macros
to adapt between export and import.
diff --git a/Tests/Dependency/Case5/CMakeLists.txt b/Tests/Dependency/Case5/CMakeLists.txt
index f04ab83..e954b02 100644
--- a/Tests/Dependency/Case5/CMakeLists.txt
+++ b/Tests/Dependency/Case5/CMakeLists.txt
@@ -1,12 +1,8 @@
project(CASE5 C)
-include_directories(${CASE5_SOURCE_DIR})
-
-add_library(case5Foo SHARED foo.c foo.h)
-
-add_library(case5Bar STATIC bar.c bar.h)
+add_library(case5Foo SHARED foo.c)
+add_library(case5Bar STATIC bar.c)
target_link_libraries(case5Bar case5Foo)
add_executable(case5 main.c)
-target_link_libraries(case5 case5Foo)
-target_link_libraries(case5 case5Bar)
+target_link_libraries(case5 case5Foo case5Bar)
diff --git a/Tests/Dependency/Case5/bar.c b/Tests/Dependency/Case5/bar.c
index 2a70fde..4cb1b1b 100644
--- a/Tests/Dependency/Case5/bar.c
+++ b/Tests/Dependency/Case5/bar.c
@@ -1,10 +1,12 @@
-#include "bar.h"
+#ifdef _WIN32
+__declspec(dllimport)
+#endif
+void foo(void);
-#include <foo.h>
#include <stdio.h>
-void bar()
+void bar(void)
{
- foo();
- printf("bar()\n");
+ foo();
+ printf("bar()\n");
}
diff --git a/Tests/Dependency/Case5/bar.h b/Tests/Dependency/Case5/bar.h
deleted file mode 100644
index aee2dc6..0000000
--- a/Tests/Dependency/Case5/bar.h
+++ /dev/null
@@ -1 +0,0 @@
-void bar();
diff --git a/Tests/Dependency/Case5/foo.c b/Tests/Dependency/Case5/foo.c
index c0153bd..794833d 100644
--- a/Tests/Dependency/Case5/foo.c
+++ b/Tests/Dependency/Case5/foo.c
@@ -1,8 +1,9 @@
-#include "foo.h"
-
#include <stdio.h>
-void foo()
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+void foo(void)
{
- printf("foo()\n");
+ printf("foo()\n");
}
diff --git a/Tests/Dependency/Case5/foo.h b/Tests/Dependency/Case5/foo.h
deleted file mode 100644
index c8620b6..0000000
--- a/Tests/Dependency/Case5/foo.h
+++ /dev/null
@@ -1 +0,0 @@
-void foo();
diff --git a/Tests/Dependency/Case5/main.c b/Tests/Dependency/Case5/main.c
index 8213496..ae3dc95 100644
--- a/Tests/Dependency/Case5/main.c
+++ b/Tests/Dependency/Case5/main.c
@@ -1,7 +1,7 @@
-#include <bar.h>
+void bar(void);
int main(int argc, char *argv[])
{
- bar();
- return 0;
+ bar();
+ return 0;
}
-----------------------------------------------------------------------
Summary of changes:
Tests/Dependency/Case5/CMakeLists.txt | 10 +++-------
Tests/Dependency/Case5/bar.c | 12 +++++++-----
Tests/Dependency/Case5/bar.h | 1 -
Tests/Dependency/Case5/foo.c | 9 +++++----
Tests/Dependency/Case5/foo.h | 1 -
Tests/Dependency/Case5/main.c | 6 +++---
6 files changed, 18 insertions(+), 21 deletions(-)
delete mode 100644 Tests/Dependency/Case5/bar.h
delete mode 100644 Tests/Dependency/Case5/foo.h
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list