This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 3738245c7b170b3d16ac54b53bbfa08d8d321fff (commit) via df364bf8e78f533dc2267ae281cf4a67c040813e (commit) via 58a09969f84eadd0f06adee33d3aaba09da26229 (commit) from f96cd09de6efbf13d9662eb99fe5911c36fd0ebb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3738245c7b170b3d16ac54b53bbfa08d8d321fff commit 3738245c7b170b3d16ac54b53bbfa08d8d321fff Merge: f96cd09 df364bf Author: Gregor Jasny <gja...@googlemail.com> AuthorDate: Wed Dec 28 13:40:44 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Dec 28 13:40:44 2016 -0500 Merge topic '16253-xcode-effective-platform-name' into next df364bf8 Xcode: Always emit EFFECTIVE_PLATFORM_NAME 58a09969 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df364bf8e78f533dc2267ae281cf4a67c040813e commit df364bf8e78f533dc2267ae281cf4a67c040813e Author: Gregor Jasny <gja...@googlemail.com> AuthorDate: Tue Dec 27 23:42:14 2016 +0100 Commit: Gregor Jasny <gja...@googlemail.com> CommitDate: Wed Dec 28 19:39:23 2016 +0100 Xcode: Always emit EFFECTIVE_PLATFORM_NAME Closes: cmake/cmake#16253 diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index b6db0d6..aeda728 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4419,9 +4419,9 @@ bool cmGeneratorTarget::ComputeOutputDir(const std::string& config, // The generator may add the configuration's subdirectory. if (!conf.empty()) { - bool iosPlatform = this->Makefile->PlatformIsAppleIos(); + bool isXcode = this->Makefile->IsOn("XCODE"); std::string suffix = - usesDefaultOutputDir && iosPlatform ? "${EFFECTIVE_PLATFORM_NAME}" : ""; + usesDefaultOutputDir && isXcode ? "${EFFECTIVE_PLATFORM_NAME}" : ""; this->LocalGenerator->GetGlobalGenerator()->AppendDirectoryForConfig( "/", conf, suffix, out); } diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 2808051..828a0ca 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2342,8 +2342,8 @@ void cmGlobalGenerator::AddGlobalTarget_Install( singleLine.push_back(cmd); if (cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.') { std::string cfgArg = "-DBUILD_TYPE="; - bool iosPlatform = mf->PlatformIsAppleIos(); - if (iosPlatform) { + bool isXcode = mf->IsOn("XCODE"); + if (isXcode) { cfgArg += "$(CONFIGURATION)"; singleLine.push_back(cfgArg); cfgArg = "-DEFFECTIVE_PLATFORM_NAME=$(EFFECTIVE_PLATFORM_NAME)"; diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 60912c2..57766db 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -18,6 +18,27 @@ run_cmake(PerConfigPerSourceFlags) # Use a single build tree for a few tests without cleaning. if(NOT XCODE_VERSION VERSION_LESS 5) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeMultiplatform-build) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_OPTIONS) + + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + + run_cmake(XcodeMultiplatform) + + run_cmake_command(XcodeMultiplatform-macosx-build ${CMAKE_COMMAND} --build . -- -sdk macosx) + run_cmake_command(XcodeMultiplatform-iphonesimulator-build ${CMAKE_COMMAND} --build . -- -sdk iphonesimulator) + + run_cmake_command(XcodeMultiplatform-macosx-install ${CMAKE_COMMAND} --build . --target install -- -sdk macosx DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_macosx) + run_cmake_command(XcodeMultiplatform-iphonesimulator-install ${CMAKE_COMMAND} --build . --target install -- -sdk iphonesimulator DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_iphonesimulator) + + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) + unset(RunCMake_TEST_OPTIONS) +endif() + +if(NOT XCODE_VERSION VERSION_LESS 5) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeInstallIOS-build) set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_BINARY_DIR}/ios_install") diff --git a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake b/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake new file mode 100644 index 0000000..166ce85 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.3) +enable_language(CXX) + +set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx iphonesimulator") +set(CMAKE_MACOSX_BUNDLE true) + +add_library(library STATIC foo.cpp) + +add_executable(main main.cpp) +target_link_libraries(main library) + +install(TARGETS library ARCHIVE DESTINATION lib) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Source/cmGeneratorTarget.cxx | 4 ++-- Source/cmGlobalGenerator.cxx | 4 ++-- Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 21 ++++++++++++++++++++ .../RunCMake/XcodeProject/XcodeMultiplatform.cmake | 12 +++++++++++ 5 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits