[Cmake-commits] CMake branch, next, updated. v3.1.0-rc1-499-gdfddf17
Brad King
brad.king at kitware.com
Mon Nov 10 13:12:38 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 dfddf17df79aa61b1a305d0480ab8c1b7f95a5c8 (commit)
via b35641b094fd937b773a2d5b32f9fcebddb23561 (commit)
from 224ece3d2e7c8b4d5f1b8b0ce7dcd623812597d0 (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=dfddf17df79aa61b1a305d0480ab8c1b7f95a5c8
commit dfddf17df79aa61b1a305d0480ab8c1b7f95a5c8
Merge: 224ece3 b35641b
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 10 13:12:36 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Nov 10 13:12:36 2014 -0500
Merge topic 'fix_link-line-dedup_regression' into next
b35641b0 Convert the test to use C only and move it into Tests/Dependency/Case5
diff --cc Tests/CMakeLists.txt
index 5c1c2e6,25cc846..ab83d41
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@@ -1500,18 -1500,8 +1500,8 @@@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=de
set_tests_properties ( linkorder2 PROPERTIES DEPENDS linkorder1)
set_tests_properties ( SimpleInstall-Stage2 PROPERTIES DEPENDS SimpleInstall)
- add_test(LinkMixed ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/LinkMixed"
- "${CMake_BINARY_DIR}/Tests/LinkMixed"
- ${build_generator_args}
- --build-project LinkMixed
- --build-options ${build_options}
- --test-command exec
- )
-
# Test static linking on toolchains known to support it.
- if("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU)$"
+ if(CMAKE_C_COMPILER_ID STREQUAL "GNU"
AND NOT APPLE AND NOT WIN32 AND NOT CYGWIN
AND EXISTS "/usr/lib/libm.a")
add_test(LinkStatic ${CMAKE_CTEST_COMMAND}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b35641b094fd937b773a2d5b32f9fcebddb23561
commit b35641b094fd937b773a2d5b32f9fcebddb23561
Author: Daniele E. Domenichelli <daniele.domenichelli at iit.it>
AuthorDate: Mon Nov 10 15:04:23 2014 +0000
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Nov 10 13:11:29 2014 -0500
Convert the test to use C only and move it into Tests/Dependency/Case5
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index fe2b335..25cc846 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1500,16 +1500,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
set_tests_properties ( linkorder2 PROPERTIES DEPENDS linkorder1)
set_tests_properties ( SimpleInstall-Stage2 PROPERTIES DEPENDS SimpleInstall)
- add_test(LinkMixed ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/LinkMixed"
- "${CMake_BINARY_DIR}/Tests/LinkMixed"
- ${build_generator_args}
- --build-project LinkMixed
- --build-options ${build_options}
- --test-command exec
- )
-
# Test static linking on toolchains known to support it.
if("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU)$"
AND NOT APPLE AND NOT WIN32 AND NOT CYGWIN
diff --git a/Tests/Dependency/CMakeLists.txt b/Tests/Dependency/CMakeLists.txt
index ef42048..ebc2d10 100644
--- a/Tests/Dependency/CMakeLists.txt
+++ b/Tests/Dependency/CMakeLists.txt
@@ -51,3 +51,4 @@ add_subdirectory(Case1)
add_subdirectory(Case2)
add_subdirectory(Case3)
add_subdirectory(Case4)
+add_subdirectory(Case5)
diff --git a/Tests/Dependency/Case5/CMakeLists.txt b/Tests/Dependency/Case5/CMakeLists.txt
new file mode 100644
index 0000000..f04ab83
--- /dev/null
+++ b/Tests/Dependency/Case5/CMakeLists.txt
@@ -0,0 +1,12 @@
+project(CASE5 C)
+
+include_directories(${CASE5_SOURCE_DIR})
+
+add_library(case5Foo SHARED foo.c foo.h)
+
+add_library(case5Bar STATIC bar.c bar.h)
+target_link_libraries(case5Bar case5Foo)
+
+add_executable(case5 main.c)
+target_link_libraries(case5 case5Foo)
+target_link_libraries(case5 case5Bar)
diff --git a/Tests/Dependency/Case5/bar.c b/Tests/Dependency/Case5/bar.c
new file mode 100644
index 0000000..2a70fde
--- /dev/null
+++ b/Tests/Dependency/Case5/bar.c
@@ -0,0 +1,10 @@
+#include "bar.h"
+
+#include <foo.h>
+#include <stdio.h>
+
+void bar()
+{
+ foo();
+ printf("bar()\n");
+}
diff --git a/Tests/Dependency/Case5/bar.h b/Tests/Dependency/Case5/bar.h
new file mode 100644
index 0000000..aee2dc6
--- /dev/null
+++ b/Tests/Dependency/Case5/bar.h
@@ -0,0 +1 @@
+void bar();
diff --git a/Tests/Dependency/Case5/foo.c b/Tests/Dependency/Case5/foo.c
new file mode 100644
index 0000000..c0153bd
--- /dev/null
+++ b/Tests/Dependency/Case5/foo.c
@@ -0,0 +1,8 @@
+#include "foo.h"
+
+#include <stdio.h>
+
+void foo()
+{
+ printf("foo()\n");
+}
diff --git a/Tests/Dependency/Case5/foo.h b/Tests/Dependency/Case5/foo.h
new file mode 100644
index 0000000..c8620b6
--- /dev/null
+++ b/Tests/Dependency/Case5/foo.h
@@ -0,0 +1 @@
+void foo();
diff --git a/Tests/Dependency/Case5/main.c b/Tests/Dependency/Case5/main.c
new file mode 100644
index 0000000..8213496
--- /dev/null
+++ b/Tests/Dependency/Case5/main.c
@@ -0,0 +1,7 @@
+#include <bar.h>
+
+int main(int argc, char *argv[])
+{
+ bar();
+ return 0;
+}
diff --git a/Tests/LinkMixed/CMakeLists.txt b/Tests/LinkMixed/CMakeLists.txt
deleted file mode 100644
index 6f83dcd..0000000
--- a/Tests/LinkMixed/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-cmake_minimum_required(VERSION 2.8.9)
-project(Test)
-
-include_directories(${CMAKE_SOURCE_DIR})
-
-add_library(lib1 SHARED lib1.cpp lib1.h)
-
-add_library(lib2 STATIC lib2.cpp lib2.h)
-target_link_libraries(lib2 lib1)
-
-add_executable(exec main.cpp)
-target_link_libraries(exec lib1)
-target_link_libraries(exec lib2)
diff --git a/Tests/LinkMixed/lib1.cpp b/Tests/LinkMixed/lib1.cpp
deleted file mode 100644
index 772d227..0000000
--- a/Tests/LinkMixed/lib1.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "lib1.h"
-
-#include <iostream>
-
-void lib1::L1::foo()
-{
- std::cout << "lib1::L1::foo()" << std::endl;
-}
diff --git a/Tests/LinkMixed/lib1.h b/Tests/LinkMixed/lib1.h
deleted file mode 100644
index 6998d1a..0000000
--- a/Tests/LinkMixed/lib1.h
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace lib1
-{
-class L1
-{
-public:
- void foo();
-};
-} // namespace lib1
diff --git a/Tests/LinkMixed/lib2.cpp b/Tests/LinkMixed/lib2.cpp
deleted file mode 100644
index 379447b..0000000
--- a/Tests/LinkMixed/lib2.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "lib2.h"
-
-#include <lib1.h>
-#include <iostream>
-
-void lib2::L2::bar()
-{
- lib1::L1 l1;
- l1.foo();
- std::cout << "lib2::L2::bar()" << std::endl;
-}
diff --git a/Tests/LinkMixed/lib2.h b/Tests/LinkMixed/lib2.h
deleted file mode 100644
index ba83e5f..0000000
--- a/Tests/LinkMixed/lib2.h
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace lib2
-{
-class L2
-{
-public:
- void bar();
-};
-} // namespace lib2
diff --git a/Tests/LinkMixed/main.cpp b/Tests/LinkMixed/main.cpp
deleted file mode 100644
index cd52974..0000000
--- a/Tests/LinkMixed/main.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <lib1.h>
-#include <lib2.h>
-
-int main(int argc, char *argv[])
-{
- lib2::L2 l2;
- l2.bar();
-}
-----------------------------------------------------------------------
Summary of changes:
Tests/CMakeLists.txt | 10 ----------
Tests/Dependency/CMakeLists.txt | 1 +
Tests/Dependency/Case5/CMakeLists.txt | 12 ++++++++++++
Tests/Dependency/Case5/bar.c | 10 ++++++++++
Tests/Dependency/Case5/bar.h | 1 +
Tests/Dependency/Case5/foo.c | 8 ++++++++
Tests/Dependency/Case5/foo.h | 1 +
Tests/{FindGTK2/gthread => Dependency/Case5}/main.c | 4 ++--
Tests/LinkMixed/CMakeLists.txt | 13 -------------
Tests/LinkMixed/lib1.cpp | 8 --------
Tests/LinkMixed/lib1.h | 8 --------
Tests/LinkMixed/lib2.cpp | 11 -----------
Tests/LinkMixed/lib2.h | 8 --------
Tests/LinkMixed/main.cpp | 8 --------
14 files changed, 35 insertions(+), 68 deletions(-)
create mode 100644 Tests/Dependency/Case5/CMakeLists.txt
create mode 100644 Tests/Dependency/Case5/bar.c
create mode 100644 Tests/Dependency/Case5/bar.h
create mode 100644 Tests/Dependency/Case5/foo.c
create mode 100644 Tests/Dependency/Case5/foo.h
copy Tests/{FindGTK2/gthread => Dependency/Case5}/main.c (54%)
delete mode 100644 Tests/LinkMixed/CMakeLists.txt
delete mode 100644 Tests/LinkMixed/lib1.cpp
delete mode 100644 Tests/LinkMixed/lib1.h
delete mode 100644 Tests/LinkMixed/lib2.cpp
delete mode 100644 Tests/LinkMixed/lib2.h
delete mode 100644 Tests/LinkMixed/main.cpp
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list