summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Framework
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2017-03-24 11:28:57 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2017-03-30 20:24:54 (GMT)
commitd1dac1acc502af2f2b766cc9b262a4f1294be39b (patch)
tree7240b96fa3d0ca1774dcdd9d01d5efe6dd178779 /Tests/RunCMake/Framework
parentd02709d7f76624d9ec5e178d79cf3658d551f197 (diff)
downloadCMake-d1dac1acc502af2f2b766cc9b262a4f1294be39b.zip
CMake-d1dac1acc502af2f2b766cc9b262a4f1294be39b.tar.gz
CMake-d1dac1acc502af2f2b766cc9b262a4f1294be39b.tar.bz2
Xcode: Execute RunCMake.Framework also for Xcode generator
Diffstat (limited to 'Tests/RunCMake/Framework')
-rw-r--r--Tests/RunCMake/Framework/FrameworkLayout.cmake5
-rw-r--r--Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake2
-rw-r--r--Tests/RunCMake/Framework/RunCMakeTest.cmake11
-rw-r--r--Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake2
4 files changed, 11 insertions, 9 deletions
diff --git a/Tests/RunCMake/Framework/FrameworkLayout.cmake b/Tests/RunCMake/Framework/FrameworkLayout.cmake
index dcfbd2d..3d62a8a 100644
--- a/Tests/RunCMake/Framework/FrameworkLayout.cmake
+++ b/Tests/RunCMake/Framework/FrameworkLayout.cmake
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.4)
enable_language(C)
+set(CMAKE_CONFIGURATION_TYPES "Debug" CACHE INTERNAL "Supported configuration types")
+set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}) # get rid of ${EFFECTIVE_PLATFORM_NAME}
+
add_library(Framework ${FRAMEWORK_TYPE}
foo.c
foo.h
@@ -18,3 +21,5 @@ set_source_files_properties(some.txt PROPERTIES MACOSX_PACKAGE_LOCATION somedir)
add_custom_command(TARGET Framework POST_BUILD
COMMAND /usr/bin/file $<TARGET_FILE:Framework>)
+
+file(GENERATE OUTPUT FrameworkName.cmake CONTENT "set(framework-dir \"$<TARGET_BUNDLE_DIR:Framework>\")\n")
diff --git a/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake b/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake
index 1a543d8..eb71394 100644
--- a/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake
+++ b/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake
@@ -1,4 +1,4 @@
-set(framework-dir "${RunCMake_TEST_BINARY_DIR}/Framework.framework")
+include("${RunCMake_TEST_BINARY_DIR}/FrameworkName.cmake")
set(framework-resources "${framework-dir}/Resources")
set(framework-resource-file "${framework-resources}/res.txt")
set(framework-flat-resource-file "${framework-resources}/flatresource.txt")
diff --git a/Tests/RunCMake/Framework/RunCMakeTest.cmake b/Tests/RunCMake/Framework/RunCMakeTest.cmake
index e64892d..4fc83f8 100644
--- a/Tests/RunCMake/Framework/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Framework/RunCMakeTest.cmake
@@ -13,13 +13,10 @@ function(framework_layout_test Name Toolchain Type)
run_cmake_command(${Name} ${CMAKE_COMMAND} --build .)
endfunction()
-# build check cannot cope with multi-configuration generators directory layout
-if(NOT RunCMake_GENERATOR STREQUAL "Xcode")
- framework_layout_test(iOSFrameworkLayout-build ios SHARED)
- framework_layout_test(iOSFrameworkLayout-build ios STATIC)
- framework_layout_test(OSXFrameworkLayout-build osx SHARED)
- framework_layout_test(OSXFrameworkLayout-build osx STATIC)
-endif()
+framework_layout_test(iOSFrameworkLayout-build ios SHARED)
+framework_layout_test(iOSFrameworkLayout-build ios STATIC)
+framework_layout_test(OSXFrameworkLayout-build osx SHARED)
+framework_layout_test(OSXFrameworkLayout-build osx STATIC)
function(framework_type_test Toolchain Type)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${Toolchain}${Type}FrameworkType-build)
diff --git a/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake b/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake
index e068a3a..2da60d2 100644
--- a/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake
+++ b/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake
@@ -1,4 +1,4 @@
-set(framework-dir "${RunCMake_TEST_BINARY_DIR}/Framework.framework")
+include("${RunCMake_TEST_BINARY_DIR}/FrameworkName.cmake")
set(framework-resources "${framework-dir}/Resources")
set(framework-resource-file "${framework-dir}/res.txt")
set(framework-flat-resource-file "${framework-dir}/flatresource.txt")