ENH: add a very simple framework test

This commit is contained in:
Bill Hoffman 2007-05-08 10:58:35 -04:00
parent 9323a27989
commit b39d96dff8
6 changed files with 34 additions and 0 deletions

View File

@ -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

View File

@ -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)

6
Tests/Framework/bar.cxx Normal file
View File

@ -0,0 +1,6 @@
void foo();
int main()
{
foo();
return 0;
}

6
Tests/Framework/foo.cxx Normal file
View File

@ -0,0 +1,6 @@
#include <stdio.h>
void foo()
{
printf("foo\n");
}

1
Tests/Framework/foo.h Normal file
View File

@ -0,0 +1 @@
fooh

1
Tests/Framework/foo2.h Normal file
View File

@ -0,0 +1 @@
foo2h