summaryrefslogtreecommitdiff
path: root/Tests/Framework/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Framework/CMakeLists.txt')
-rw-r--r--Tests/Framework/CMakeLists.txt52
1 files changed, 29 insertions, 23 deletions
diff --git a/Tests/Framework/CMakeLists.txt b/Tests/Framework/CMakeLists.txt
index 29f983810..a313c2c03 100644
--- a/Tests/Framework/CMakeLists.txt
+++ b/Tests/Framework/CMakeLists.txt
@@ -51,30 +51,36 @@ install(TARGETS foo bar
# duplicate install rules for the pieces of the framework.
)
+# test that framework post-build commands run
+add_custom_command(TARGET foo POST_BUILD COMMAND ${CMAKE_COMMAND} -E touch foo-post-build)
+add_custom_target(fooCustom ALL COMMAND ${CMAKE_COMMAND} -E copy foo-post-build foo-custom)
+add_dependencies(fooCustom foo)
+
# Make a static library and apply the framework properties to it to verify
-# that everything still builds correctly, but it will not actually produce
-# a framework... The framework properties only apply when the library type
-# is SHARED.
+# that everything still builds correctly. Xcode prior to version 5 does not
+# support static Frameworks.
#
-add_library(fooStatic STATIC
- foo.cxx
- foo.h
- foo2.h
- fooExtensionlessResource
- fooPublic.h
- fooPublicExtensionlessHeader
- fooPrivate.h
- fooPrivateExtensionlessHeader
- fooNeither.h
- fooBoth.h
- test.lua
- fooDeepPublic.h
-)
-set_target_properties(fooStatic PROPERTIES
- FRAMEWORK TRUE
- FRAMEWORK_VERSION none
-)
-add_executable(barStatic bar.cxx)
-target_link_libraries(barStatic fooStatic)
+if(NOT XCODE OR NOT XCODE_VERSION VERSION_LESS 5)
+ add_library(fooStatic STATIC
+ foo.cxx
+ foo.h
+ foo2.h
+ fooExtensionlessResource
+ fooPublic.h
+ fooPublicExtensionlessHeader
+ fooPrivate.h
+ fooPrivateExtensionlessHeader
+ fooNeither.h
+ fooBoth.h
+ test.lua
+ fooDeepPublic.h
+ )
+ set_target_properties(fooStatic PROPERTIES
+ FRAMEWORK TRUE
+ FRAMEWORK_VERSION none
+ )
+ add_executable(barStatic bar.cxx)
+ target_link_libraries(barStatic fooStatic)
+endif()
include(CPack)