summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2007-10-10 15:06:15 (GMT)
committerDavid Cole <david.cole@kitware.com>2007-10-10 15:06:15 (GMT)
commit8e4c7b99e1b73c641308c0177673dac33fe57df1 (patch)
treead00c757835a3ac785fd1b3e78ca3b75c2f1a354 /Tests
parentaa9ba5c3efcd32ea631435318f63dc476ac39798 (diff)
downloadCMake-8e4c7b99e1b73c641308c0177673dac33fe57df1.zip
CMake-8e4c7b99e1b73c641308c0177673dac33fe57df1.tar.gz
CMake-8e4c7b99e1b73c641308c0177673dac33fe57df1.tar.bz2
ENH: Finish up the Framework creation code restructuring. Frameworks build and install now. More work needed on the packaging step. See Tests/Framework for example use.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt15
-rw-r--r--Tests/Framework/CMakeLists.txt38
2 files changed, 37 insertions, 16 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 930ac25..728f906 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -45,7 +45,6 @@ IF(BUILD_TESTING)
ADD_TEST_MACRO(LoadCommand LoadedCommand)
ADD_TEST_MACRO(LinkLine LinkLine)
ADD_TEST_MACRO(MacroTest miniMacroTest)
- ADD_TEST_MACRO(Framework bar)
ADD_TEST_MACRO(Properties Properties)
ADD_TEST_MACRO(Assembler HelloAsm)
ADD_TEST_MACRO(SourceGroups SourceGroups)
@@ -64,8 +63,20 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
ENDIF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY)
ENDIF(CMAKE_BUILD_NIGHTLY_WINDOWS_TEST)
-
+
# add tests with more complex invocations
+ ADD_TEST(Framework ${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
+ --build-options
+ "-DCMAKE_INSTALL_PREFIX:PATH=${CMake_BINARY_DIR}/Tests/Framework/Install"
+ --test-command bar)
+
ADD_TEST(TargetName ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/TargetName"
diff --git a/Tests/Framework/CMakeLists.txt b/Tests/Framework/CMakeLists.txt
index 57028d7..4f42b97 100644
--- a/Tests/Framework/CMakeLists.txt
+++ b/Tests/Framework/CMakeLists.txt
@@ -10,26 +10,34 @@ add_library(foo SHARED
fooBoth.h
test.lua
)
+
+set(foo_ver ver4)
+
set_target_properties(foo PROPERTIES
FRAMEWORK TRUE
- FRAMEWORK_VERSION ver3
-)
-# fooNeither.h is marked neither public nor private...
-# fooBoth.h is marked both public and private... (private wins...)
-set_source_files_properties(foo.h foo2.h fooPublic.h fooBoth.h PROPERTIES
- FRAMEWORK_PUBLIC_HEADER TRUE
-)
-set_source_files_properties(fooPrivate.h fooBoth.h PROPERTIES
- FRAMEWORK_PRIVATE_HEADER TRUE
-)
-set_source_files_properties(test.lua PROPERTIES
- FRAMEWORK_RESOURCE TRUE
+ FRAMEWORK_VERSION ${foo_ver}
+ PRIVATE_HEADER "fooPrivate.h;fooBoth.h"
+ PUBLIC_HEADER "foo.h;foo2.h;fooPublic.h;fooBoth.h"
+ RESOURCE "test.lua"
)
+# fooBoth.h is listed as both public and private... (private wins...)
+# fooNeither.h is listed as neither public nor private...
+
add_executable(bar bar.cxx)
target_link_libraries(bar foo)
install(TARGETS foo bar
- RUNTIME DESTINATION /Applications/CMakeTestsFramework/bin
- FRAMEWORK DESTINATION /Library/Frameworks
+ RUNTIME DESTINATION Applications/CMakeTestsFramework/bin
+ FRAMEWORK DESTINATION Library/Frameworks
+
+ # These are ignored on the Mac... and things are automatically placed in
+ # their appropriate Framework sub-folder at build time. (And then the built
+ # framework is copied recursively when it is installed.)
+ PRIVATE_HEADER DESTINATION share/foo-${foo_ver}/PrivateHeaders
+ PUBLIC_HEADER DESTINATION include/foo-${foo_ver}
+ RESOURCE DESTINATION share/foo-${foo_ver}/Resources
+ # But they are required to be present so that installing a framework on other
+ # other platforms will install the pieces of the framework without having to
+ # duplicate install rules for the pieces of the framework.
)
# Make a static library and apply the framework properties to it to verify
@@ -53,3 +61,5 @@ set_target_properties(fooStatic PROPERTIES
)
add_executable(barStatic bar.cxx)
target_link_libraries(barStatic fooStatic)
+
+include(CPack)