diff options
-rw-r--r-- | Source/CMakeLists.txt | 9 | ||||
-rw-r--r-- | Tests/Framework/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Tests/Framework/bar.cxx | 6 | ||||
-rw-r--r-- | Tests/Framework/foo.cxx | 6 | ||||
-rw-r--r-- | Tests/Framework/foo.h | 1 | ||||
-rw-r--r-- | Tests/Framework/foo2.h | 1 |
6 files changed, 34 insertions, 0 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index be55bb2..720963c 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1107,6 +1107,15 @@ IF(BUILD_TESTING) --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} --test-command VSExternalInclude) ENDIF(${CMAKE_TEST_GENERATOR} MATCHES "Visual Studio") + ADD_TEST(FrameworkTest ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/Framework" + "${CMake_BINARY_DIR}/Tests/Framework" + --build-two-config + --build-generator ${CMAKE_TEST_GENERATOR} + --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} + --build-project Framework + --test-command bar) IF (APPLE AND CMAKE_COMPILER_IS_GNUCXX) SET(BundleTestInstallDir diff --git a/Tests/Framework/CMakeLists.txt b/Tests/Framework/CMakeLists.txt new file mode 100644 index 0000000..3aac24d --- /dev/null +++ b/Tests/Framework/CMakeLists.txt @@ -0,0 +1,11 @@ +project(Framework) +add_library(foo SHARED foo.cxx) +set_target_properties(foo PROPERTIES + FRAMEWORK TRUE + FRAMEWORK_PUBLIC_HEADERS "foo.h;foo2.h" + FRAMEWORK_VERSION ver2 + FRAMEWORK_RESOURCES "" +# VERSION 1.2 +) +add_executable(bar bar.cxx) +target_link_libraries(bar foo) diff --git a/Tests/Framework/bar.cxx b/Tests/Framework/bar.cxx new file mode 100644 index 0000000..37c132a --- /dev/null +++ b/Tests/Framework/bar.cxx @@ -0,0 +1,6 @@ +void foo(); +int main() +{ + foo(); + return 0; +} diff --git a/Tests/Framework/foo.cxx b/Tests/Framework/foo.cxx new file mode 100644 index 0000000..62acbb7 --- /dev/null +++ b/Tests/Framework/foo.cxx @@ -0,0 +1,6 @@ +#include <stdio.h> + +void foo() +{ + printf("foo\n"); +} diff --git a/Tests/Framework/foo.h b/Tests/Framework/foo.h new file mode 100644 index 0000000..d959c81 --- /dev/null +++ b/Tests/Framework/foo.h @@ -0,0 +1 @@ +fooh diff --git a/Tests/Framework/foo2.h b/Tests/Framework/foo2.h new file mode 100644 index 0000000..2431d79 --- /dev/null +++ b/Tests/Framework/foo2.h @@ -0,0 +1 @@ +foo2h |