[cmake-developers] [CMake 0015891]: CMake extracts non-standard filenames incorrectly from tarballs

2015-12-21 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://public.kitware.com/Bug/view.php?id=15891 
== 
Reported By:Ben Boeckel
Assigned To:
== 
Project:CMake
Issue ID:   15891
Category:   CMake
Reproducibility:have not tried
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2015-12-21 15:21 EST
Last Modified:  2015-12-21 15:21 EST
== 
Summary:CMake extracts non-standard filenames incorrectly
from tarballs
Description: 
Attached is a tarball which contains a file "Appendix A \xc2\xa0 An Introduction
to Preprocessor Metaprogramming.html" (the hex is a UTF-8 non-breaking-space).
"cmake -E tar xzf" will extract the file improperly, mangling it. CMake can then
not delete the mangled file.

Using msys2's (from git-bash) to extract the tarball works as expected (the
filename looks fine and cmake can delete it).
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2015-12-21 15:21 Ben BoeckelNew Issue
2015-12-21 15:21 Ben BoeckelFile Added: bad-filename.tar.gz 
  
==

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] Create subdirectories in Resource directory for Frameworks and Application bundle.

2015-12-21 Thread Ruslan Baratov via cmake-developers

On 21-Dec-15 17:19, Bartosz Kosiorek wrote:


Thanks Ruslan for explanation.


Currently we already building fat library for arm (armv7;armv7s;arm64) 
and x86 (i386;x86_64).



That's why my original assumption was that it could be easily enabled 
for Simulator/device (armv7;armv7s;arm64;i386;x86_64).


I could start working on that but if it will be too hacky, then I will 
leave that idea.




BTW I made some benchmarks of Xcode vs Make comparison for our 
internal subproject (with "time" command). Here are results:



Xcode generation:

   real6m31.733s

   user4m51.862s

   sys0m20.268s


Make generation:

   real4m45.089s

   user2m56.117s

   sys0m17.481s


Ninja generation:

  real2m48.585s

  user2m30.712s

  sys0m6.313s



Xcode generation + build time:

   real64m3.238s

   user353m36.825s

   sys46m52.415s


Make generation + build time:

   real61m2.583s

   user358m7.464s

   sys47m21.512s


So it seems in our case, for Generation performance step, we should 
use Ninja.


Ok, thanks for sharing it. This proves what I was thinking - there is no 
difference in build time, but generate time is better for Makefile. 
Probably you can profile CMake and find some bottlenecks.




Best Regards

Bartosz



*From:* Ruslan Baratov 
*Sent:* Saturday, December 19, 2015 6:27 PM
*To:* Bartosz Kosiorek
*Cc:* Clinton Stimpson; Gregor Jasny; CMake Developers
*Subject:* Re: [cmake-developers] Create subdirectories in Resource 
directory for Frameworks and Application bundle.

On 18-Dec-15 22:46, Bartosz Kosiorek wrote:


Thank you all for your tips/advice.


From our experience IDE generators (eg. Visual Studio, Xcode) is 
much slower than Make or Ninja. I will attach benchmarks later.



Unfortunately I'm unable to build Universal libraries for x86 and arm 
architectures by using Makefile.


This feature will work only for Xcode. For Makefile generator 
variable/property IOS_INSTALL_COMBINED is ignored. Xcode and Makefile 
differs in internals. Xcode can hold in build directory all variants 
of library like Release/Debug + Simulator/Device:


Debug-iphoneos/libfoo.a # xcodebuild -sdk iphoneos -config Debug
Debug-iphonesimulator/libfoo.a # xcodebuild -sdk iphonesimulator 
-config Debug

Release-iphoneos/libfoo.a # xcodebuild -sdk iphoneos -config Release
Release-iphonesimulator/libfoo.a # xcodebuild -sdk iphonesimulator 
-config Release


Makefile holds only one variant so building both Simulator/Device in 
one project is tricky. You can build/install several libraries by 
Makefile and combine them with lipo using some external script.



See attached logs.


It seems that two different SDK's (iPhoneOS and 
iPhoneSimulator) needs to be used in that case.


Do you know how it could be fixed?

Maybe I should add "CMAKE_OSX_SYSROOT "iphoneos" support for other 
generators?


What do you think about that idea?


Thanks in advance

Bartosz​


PS

I'm attaching the script which I'm using for testing purposes.

To reproduce it just run command (from command line):

   cd builddir && cmake .. && cmake --build .




*From:*Ruslan Baratov [mailto:ruslan_bara...@yahoo.com]
*Sent:* Saturday, December 12, 2015 6:49 AM
*To:* Bartosz Kosiorek
*Cc:* Clinton Stimpson; Gregor Jasny; CMake Developers
*Subject:* Re: [cmake-developers] Create subdirectories in Resource 
directory for Frameworks and Application bundle.


On 12-Dec-15 10:08, Bartosz Kosiorek wrote:

Thanks Ruslan.

I would like to create instruction which is universal for all
generators.

I think it's not possible. E.g. IOS_INSTALL_COMBINED will work only 
for Xcode.



Currently we would like to support both Make/Ninja and Xcode generators,

...


because Make is much faster than Xcode generator, and we are using it 
in our CI system.


Do you mean generate step or build? I've used to compile quite big 
projects like OpenCV with Xcode and according to the `top` it uses 
all my cores with clang++ at 100% CPU time.
Can you show any benchmarks? Also note that Xcode can add some 
additional stuff, like dSYM: 
https://github.com/headupinclouds/gatherer/pull/69



Make is also common for other architectures (Linux, QNX, Android etc.)

Unfortunately

   set(CMAKE_OSX_SYSROOT "iphoneos")

is not working for me.

It displays error:

  /Users/warsaw/Perforce/cmake-dev/cmake-build/bin/cmake .. && 
/Users/warsaw/Perforce/cmake-dev/cmake-build/bin/cmake --build .


  -- Configuring done

  -- Generating done

  -- Build files have been written to: 
/Users/warsaw/Perforce/cmake_ios_framework_with_resource2/builddir


  [ 14%] Building C object 
shared_empty/heymath/CMakeFiles/heymath.dir/add.c.o


  clang: warning: no such sysroot directory: 'iphoneos'

...

Do you have some tip for that?

Yes, this hint was for Xcode generator.


After removing "-isysroot ${CMAKE_OSX_SYSROOT}" everything works 
perfectly. Thanks


Unfortunately CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET is not 
working with 

[cmake-developers] [CMake 0015890]: file(STRINGS ..) doesn't work on single character files.

2015-12-21 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://public.kitware.com/Bug/view.php?id=15890 
== 
Reported By:Fredrik Björkenfors
Assigned To:
== 
Project:CMake
Issue ID:   15890
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2015-12-21 10:43 EST
Last Modified:  2015-12-21 10:43 EST
== 
Summary:file(STRINGS ..) doesn't work on single character
files.
Description: 
If the file passed to file(STRINGS  VAR) contains a single character file
VAR will be empty.

Steps to Reproduce: 
Run CMake on the attached project.

Workaround: Adding any character to the input file, including an EOL character.

Additional Information: 
If the file has less than 2 characters ReadBOM(std::istream& in) will set the
failbit and the attempt to rewind the file will fail. 
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2015-12-21 10:43 Fredrik BjörkenforsNew Issue  
 
2015-12-21 10:43 Fredrik BjörkenforsFile Added: CMake_bug.zip  
 
==

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [PATCH v2] QtDialog: Allow to set CMAKE_XDGDATA_DIR

2015-12-21 Thread Brad King
On 12/21/2015 10:02 AM, Niels Ole Salscheider wrote:
> This is needed for multiarch layouts where the prefix is /usr/${host} but
> where arch-independet files (like the XDG specific ones) are installed to
> /usr/share.

Great, thanks.  Applied:

 QtDialog: Add option to control XDG file install destination
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=76566621

-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMakeFindDependencyMacro limitations

2015-12-21 Thread Stephen Kelly
Roger Leigh wrote:

> I've run into a few limitations in find_dependency.  I'm not sure if
> these are by design or could be fixed, so this is really a request for
> further explanation or design rationale.
> 
> The first issue is this:
> 
>if (NOT ${dep}_FOUND)
> 
> This seems to be making the assumption that the found variable matches
> the dependency name, but the case used varies between modules and the
> name is case sensitive, from my reading of cmake-language.  Is this
> correct?

It is intentional, yes. See

 http://public.kitware.com/Bug/view.php?id=15412

The config-packages generated by cmake are canonical, so modules should set 
the ExactCase_FOUND to be a 'correct module'.

> Even if so, should this optimisation be put here rather than
> in find_package itself? 

I don't know the answer to this.

> If case sensitivity/naming is an issue, could
> the _FOUND variable be passed in as an argument, leaving the existing
> behaviour as the default if unspecified?

I don't think that's a good idea.

> The reason for stripping EXACT isn't clear.  If my package has a strict
> requirement on another package, whether the caller has an exact
> requirement for the version of my package has no bearing on the
> requirements I have for my dependencies as far as I understand.  What's
> the reason for the existing behaviour?

I don't know what you are referring to with 'stripping EXACT'. Perhaps you 
are looking at CMake < 3.0. See commit v3.0.0-rc2~10^2 (find_dependency: 
Don't propagate EXACT argument., 2014-03-06).

> Support for find_package arguments is limited to the dependency name and
> optionally the version.  

... and optionally EXACT.

> I can understand why REQUIRED and related
> arguments are omitted--that is why find_dependency exists--but I'd quite
> like to be able to specify COMPONENTS where needed e.g. with FindBoost,
> and this is not currently possible.

I don't remember whether this was discussed when designing find_dependency. 
Perhaps COMPONENTS could be added to the macro now.

> I was wondering if we could perhaps make find_dependency handle and pass
> through /all/ find_package arguments, minus REQUIRED/QUIET, so that
> find_dependency can expose the additional functionality offered by
> find_package.  Some may not be useful, in which case they could be
> omitted, but some like COMPONENTS may be required for the find_package
> call to be useful.

It might be possible, but might not be a good idea. What else do you want to 
pass in?

Thanks,

Steve.


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] [PATCH v2] QtDialog: Allow to set CMAKE_XDGDATA_DIR

2015-12-21 Thread Niels Ole Salscheider
This is needed for multiarch layouts where the prefix is /usr/${host} but
where arch-independet files (like the XDG specific ones) are installed to
/usr/share.
---
 Source/CMakeInstallDestinations.cmake | 5 +
 Source/QtDialog/CMakeLists.txt| 6 +++---
 bootstrap | 7 +++
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/Source/CMakeInstallDestinations.cmake 
b/Source/CMakeInstallDestinations.cmake
index 99c86ca..2f9d95a 100644
--- a/Source/CMakeInstallDestinations.cmake
+++ b/Source/CMakeInstallDestinations.cmake
@@ -3,24 +3,29 @@ if(BEOS)
   set(CMAKE_DATA_DIR_DEFAULT 
"share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # HAIKU
   set(CMAKE_MAN_DIR_DEFAULT "documentation/man") # HAIKU
   set(CMAKE_DOC_DIR_DEFAULT 
"documentation/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # HAIKU
+  set(CMAKE_XDGDATA_DIR_DEFAULT "share") # HAIKU
 elseif(CYGWIN)
   set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION}") # CYGWIN
   set(CMAKE_DOC_DIR_DEFAULT "share/doc/cmake-${CMake_VERSION}") # CYGWIN
   set(CMAKE_MAN_DIR_DEFAULT "share/man") # CYGWIN
+  set(CMAKE_XDGDATA_DIR_DEFAULT "share") # CYGWIN
 else()
   set(CMAKE_DATA_DIR_DEFAULT 
"share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # OTHER
   set(CMAKE_DOC_DIR_DEFAULT 
"doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # OTHER
   set(CMAKE_MAN_DIR_DEFAULT "man") # OTHER
+  set(CMAKE_XDGDATA_DIR_DEFAULT "share") # OTHER
 endif()
 
 set(CMAKE_DATA_DIR_DESC "data")
 set(CMAKE_DOC_DIR_DESC "docs")
 set(CMAKE_MAN_DIR_DESC "man pages")
+set(CMAKE_XDGDATA_DIR_DESC "XDG specific files")
 
 foreach(v
 CMAKE_DATA_DIR
 CMAKE_DOC_DIR
 CMAKE_MAN_DIR
+CMAKE_XDGDATA_DIR
 )
   # Populate the cache with empty values so we know when the user sets them.
   set(${v} "" CACHE STRING "")
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index 9161ad3..f17de5d 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -193,7 +193,7 @@ if(UNIX AND NOT APPLE)
   foreach (size IN ITEMS 32 128)
 install(
   FILES   "${CMAKE_CURRENT_SOURCE_DIR}/CMakeSetup${size}.png"
-  DESTINATION "share/icons/hicolor/${size}x${size}/apps"
+  DESTINATION "${CMAKE_XDGDATA_DIR}/icons/hicolor/${size}x${size}/apps"
   ${COMPONENT}
   RENAME  "CMakeSetup.png")
   endforeach ()
@@ -201,10 +201,10 @@ if(UNIX AND NOT APPLE)
   # install a desktop file so CMake appears in the application start menu
   # with an icon
   install(FILES CMake.desktop
-DESTINATION share/applications
+DESTINATION "${CMAKE_XDGDATA_DIR}/applications"
 ${COMPONENT})
   install(FILES cmakecache.xml
-DESTINATION share/mime/packages
+DESTINATION "${CMAKE_XDGDATA_DIR}/mime/packages"
 ${COMPONENT})
 endif()
 
diff --git a/bootstrap b/bootstrap
index b2421a1..97e85bf 100755
--- a/bootstrap
+++ b/bootstrap
@@ -63,9 +63,11 @@ cmake_copyright="`grep '^Copyright .* Kitware' 
"${cmake_source_dir}/Copyright.tx
 cmake_data_dir_keyword="OTHER"
 cmake_doc_dir_keyword="OTHER"
 cmake_man_dir_keyword="OTHER"
+cmake_xdgdata_dir_keyword="OTHER"
 cmake_data_dir=""
 cmake_doc_dir=""
 cmake_man_dir=""
+cmake_xdgdata_dir=""
 cmake_init_file=""
 cmake_bootstrap_system_libs=""
 cmake_bootstrap_qt_gui=""
@@ -214,6 +216,7 @@ fi
 cmake_data_dir_default="`cmake_install_dest_default DATA 
${cmake_data_dir_keyword}`"
 cmake_doc_dir_default="`cmake_install_dest_default DOC 
${cmake_doc_dir_keyword}`"
 cmake_man_dir_default="`cmake_install_dest_default MAN 
${cmake_man_dir_keyword}`"
+cmake_xdgdata_dir_default="`cmake_install_dest_default XDGDATA 
${cmake_xdgdata_dir_keyword}`"
 
 CMAKE_KNOWN_C_COMPILERS="cc gcc xlc icc tcc"
 CMAKE_KNOWN_CXX_COMPILERS="aCC xlC CC g++ c++ icc como "
@@ -428,6 +431,8 @@ Directory and file names:
   ['"${cmake_doc_dir_default}"']
   --mandir=DIRinstall man pages files in PREFIX/DIR/manN
   ['"${cmake_man_dir_default}"']
+  --xdgdatadir=DIRinstall XDG specific files in PREFIX/DIR
+  ['"${cmake_xdgdata_dir_default}"']
 '
   exit 10
 }
@@ -616,6 +621,7 @@ while test $# != 0; do
   --datadir=*) cmake_data_dir=`cmake_arg "$1"` ;;
   --docdir=*) cmake_doc_dir=`cmake_arg "$1"` ;;
   --mandir=*) cmake_man_dir=`cmake_arg "$1"` ;;
+  --xdgdatadir=*) cmake_xdgdata_dir=`cmake_arg "$1"` ;;
   --init=*) cmake_init_file=`cmake_arg "$1"` ;;
   --system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} 
-DCMAKE_USE_SYSTEM_LIBRARIES=1" ;;
   --no-system-libs) 
cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} 
-DCMAKE_USE_SYSTEM_LIBRARIES=0" ;;
@@ -1368,6 +1374,7 @@ set (CMAKE_INSTALL_PREFIX "'"${cmake_prefix_dir}"'" CACHE 
PATH "Install path pre
 set (CMAKE_DOC_DIR "'"${cmake_doc_dir}"'" CACHE PATH "Install location for 
documentation (relative to prefix)." FORCE)
 set (CMAKE_MAN_DIR "'"${cmake_man_dir}"'" CACHE PATH "Ins

[cmake-developers] Maintainer vacation until Jan 7

2015-12-21 Thread Brad King
Hi Folks,

FYI, tomorrow I'm heading out for vacation and will likely not
be responsive until at least Jan 7.

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] QtDialog: Allow to set CMAKE_SHARE_DIR

2015-12-21 Thread Brad King
On 12/20/2015 05:07 PM, Niels Ole Salscheider wrote:
> This is needed for multiarch layouts where the prefix is /usr/${host} but
> where arch-independet files are installed to /usr/share.

Thanks.  Some of the current install dir options default to `share/...` as
seen in `Source/CMakeInstallDestinations.cmake`.  Many of the corresponding
installed files are also architecture-independent.  The name `CMAKE_SHARE_DIR`
sounds like it intends to replace all uses of `share/` and architecture-
independent files when in fact it is only for gui system integration files.
Can you propose a more-specific name and description for the option?

Also, the `cmake_install_dest_default` function in the bootstrap script depends
on the source code layout in `Source/CMakeInstallDestinations.cmake` and a
"# OTHER" comment.  Please revise and test that the bootstrap script extracts
the matching default.

Thanks,
-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] Can't find correct openssl on Windows

2015-12-21 Thread Brad King
On 12/18/2015 07:49 PM, Patrick Spendrin wrote:
> I attached a patch both here and at the bug report which fixes this
> behaviour for the cost of having an additional and ugly option for the
> FindOpenSSL.cmake file.
> I don't see a different solution, as the no-MD/MT version of the
> library is the backup solution (although the one I would prefer in
> this case).

The OPENSSL_MSVC_NO_RT_MODE patch can be a fallback solution, but we
may be able to avoid it.  Take a look at the NAMES_PER_DIR option of
the find_library command.  Using that it should be possible to find
the library of any name that appears first among the searched locations.

FYI, one may avoid using OpenSSL altogether on Windows by using Schannel
instead:

 https://msdn.microsoft.com/en-us/library/windows/desktop/aa380123.aspx
 https://msdn.microsoft.com/en-us/library/windows/desktop/aa374782.aspx

This is the approach CMake itself currently uses, in particular because
it has the advantage of using the OS-maintained list of root CAs.

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] Create subdirectories in Resource directory for Frameworks and Application bundle.

2015-12-21 Thread Bartosz Kosiorek
Thanks Ruslan for explanation.


Currently we already building fat library for arm (armv7;armv7s;arm64) and x86 
(i386;x86_64).


That's why my original assumption was that it could be easily enabled for 
Simulator/device (armv7;armv7s;arm64;i386;x86_64).

I could start working on that but if it will be too hacky, then I will leave 
that idea.



BTW I made some benchmarks of Xcode vs Make comparison for our internal 
subproject (with "time" command). Here are results:


Xcode generation:

   real 6m31.733s

   user 4m51.862s

   sys 0m20.268s


Make generation:

   real 4m45.089s

   user 2m56.117s

   sys 0m17.481s


Ninja generation:

  real 2m48.585s

  user 2m30.712s

  sys 0m6.313s



Xcode generation + build time:

   real 64m3.238s

   user 353m36.825s

   sys 46m52.415s


Make generation + build time:

   real 61m2.583s

   user 358m7.464s

   sys 47m21.512s


So it seems in our case, for Generation performance step, we should use Ninja.


Best Regards

Bartosz



From: Ruslan Baratov 
Sent: Saturday, December 19, 2015 6:27 PM
To: Bartosz Kosiorek
Cc: Clinton Stimpson; Gregor Jasny; CMake Developers
Subject: Re: [cmake-developers] Create subdirectories in Resource directory for 
Frameworks and Application bundle.

On 18-Dec-15 22:46, Bartosz Kosiorek wrote:
Thank you all for your tips/advice.

From our experience IDE generators (eg. Visual Studio, Xcode) is much slower 
than Make or Ninja. I will attach benchmarks later.

Unfortunately I'm unable to build Universal libraries for x86 and arm 
architectures by using Makefile.
This feature will work only for Xcode. For Makefile generator variable/property 
IOS_INSTALL_COMBINED is ignored. Xcode and Makefile differs in internals. Xcode 
can hold in build directory all variants of library like Release/Debug + 
Simulator/Device:

Debug-iphoneos/libfoo.a # xcodebuild -sdk iphoneos -config Debug
Debug-iphonesimulator/libfoo.a # xcodebuild -sdk iphonesimulator -config Debug
Release-iphoneos/libfoo.a # xcodebuild -sdk iphoneos -config Release
Release-iphonesimulator/libfoo.a # xcodebuild -sdk iphonesimulator -config 
Release

Makefile holds only one variant so building both Simulator/Device in one 
project is tricky. You can build/install several libraries by Makefile and 
combine them with lipo using some external script.

See attached logs.

It seems that two different SDK's (iPhoneOS and iPhoneSimulator) needs to be 
used in that case.
Do you know how it could be fixed?
Maybe I should add "CMAKE_OSX_SYSROOT "iphoneos" support for other generators?
What do you think about that idea?

Thanks in advance
Bartosz​

PS
I'm attaching the script which I'm using for testing purposes.
To reproduce it just run command (from command line):
   cd builddir && cmake .. && cmake --build .




From: Ruslan Baratov [mailto:ruslan_bara...@yahoo.com]
Sent: Saturday, December 12, 2015 6:49 AM
To: Bartosz Kosiorek
Cc: Clinton Stimpson; Gregor Jasny; CMake Developers
Subject: Re: [cmake-developers] Create subdirectories in Resource directory for 
Frameworks and Application bundle.

On 12-Dec-15 10:08, Bartosz Kosiorek wrote:

Thanks Ruslan.



I would like to create instruction which is universal for all generators.
I think it's not possible. E.g. IOS_INSTALL_COMBINED will work only for Xcode.



Currently we would like to support both Make/Ninja and Xcode generators,
...



because Make is much faster than Xcode generator, and we are using it in our CI 
system.
Do you mean generate step or build? I've used to compile quite big projects 
like OpenCV with Xcode and according to the `top` it uses all my cores with 
clang++ at 100% CPU time.
Can you show any benchmarks? Also note that Xcode can add some additional 
stuff, like dSYM: https://github.com/headupinclouds/gatherer/pull/69



Make is also common for other architectures (Linux, QNX, Android etc.)



Unfortunately

   set(CMAKE_OSX_SYSROOT "iphoneos")

is not working for me.

It displays error:


  /Users/warsaw/Perforce/cmake-dev/cmake-build/bin/cmake .. && 
/Users/warsaw/Perforce/cmake-dev/cmake-build/bin/cmake --build .
  -- Configuring done
  -- Generating done
  -- Build files have been written to: 
/Users/warsaw/Perforce/cmake_ios_framework_with_resource2/builddir
  [ 14%] Building C object shared_empty/heymath/CMakeFiles/heymath.dir/add.c.o
  clang: warning: no such sysroot directory: 'iphoneos'
...
Do you have some tip for that?
Yes, this hint was for Xcode generator.




After removing "-isysroot ${CMAKE_OSX_SYSROOT}" everything works perfectly. 
Thanks

Unfortunately CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET is not working 
with Make.
Is it possible to introduce CMAKE_IOS_DEPLOYMENT_TARGET, as we already have 
CMAKE_OSX_DEPLOYMENT_TARGET?
Since OSX_ARCHITECTURES controls iOS architectures too I think request should 
sounds like "Extend OSX_DEPLOYMENT_TARGET property for iOS platform".



I have attached my example script which I'm using.
​Could you please modify it to be be