[cmake-developers] CMake 3.1 Android - generator expressions and output names

Robert Goulet Robert.Goulet at autodesk.com
Wed Dec 3 11:02:42 EST 2014


We are currently using 3.0-r3, and I am guessing this version doesn't use C++11 by default. You are saying that the latest release should fix this, because it defaults to C++11? I am not sure what are the implications of upgrading our engine with this new version. Should we expect the transition to go smoothly? We have to decide on a final version for the release, what's your thoughts on this? Thanks!

-----Original Message-----
From: Dmitry Polyanitsa [mailto:dpolyanitsa at nvidia.com] 
Sent: Wednesday, December 3, 2014 10:46 AM
To: Robert Goulet; Brad King
Cc: cmake-developers at cmake.org
Subject: RE: [cmake-developers] CMake 3.1 Android - generator expressions and output names

Hi Robert,

I'm Dmitry from the Nsight Tegra team. Currently, we do not allow changing the APK name, so copying/moving the outputs is the best you can do. As for the language standard override, latest Nsight Tegra uses C++11 by default, why would you want to set it explicitly?

-Dmitry

-----Original Message-----
From: Robert Goulet [mailto:Robert.Goulet at autodesk.com]
Sent: Wednesday, December 3, 2014 12:28 AM
To: Brad King
Cc: cmake-developers at cmake.org
Subject: RE: [cmake-developers] CMake 3.1 Android - generator expressions and output names

I can't find any options to set the .apk name from the IDE, but I find it interesting that it uses the project's name instead of the output file name set in the IDE. Hence why I wonder if its CMake result or if its NVidia's Tegra toolkit? But I have a work-around for that, using add_custom_command to do a copy using ${CMAKE_COMMAND} -E copy.

So my only issue left is the fact that I will have to use set_source_properties to pass the -std=c++11 flag instead of being able to set the "C++ Language Standard" option. That is a bit annoying, is there a better work-around?
Thanks!

-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com]
Sent: Tuesday, December 2, 2014 3:45 PM
To: Robert Goulet
Cc: cmake-developers at cmake.org
Subject: Re: [cmake-developers] CMake 3.1 Android - generator expressions and output names

Hi Robert,

Thanks for trying out the Nsight Tegra generator support.
It is brand new so we are just at the beginning of the maturation process.  We would appreciate any help you can provide.

On 12/02/2014 02:24 PM, Robert Goulet wrote:
> Perhaps it would be nice to have a generator expression that refers to 
> the .apk file produced when compiling for Android?

This may be possible, but first we should work out the output name and location settings as discussed next.

> Also, it would make sense that the .apk output name respect the names 
> that we set using the target properties OUTPUT_NAME_<CONFIG>. Right 
> now it uses the project's name for the .apk, while the .so does indeed 
> respect the output name set.

Is it possible to configure the .apk name through the IDE?
If so, CMake could be taught to add the corresponding setting to the .vcxproj file.  If not, then Nsight Tegra itself would have to be modified by NVIDIA to support such a setting.

Some output directory settings may be needed too.  We have RUNTIME_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY, and ARCHIVE_OUTPUT_DIRECTORY already.  I'm not sure if one of these should apply to the .apk, or if another setting would be needed.  Also the availability of Nsight Tegra settings for this needs to be investigated.

> C++ Language Standard to other values than Default?

I don't think there is currently.  The commit adding the original support was:

 VS: Teach vcxproj generation about the Tegra-Android platform
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ef0fd4f0

The commit message documents many of the limitations.  Only the last bullet (ANDROID_GUI prop) and part of the second bullet (ANDROID_API prop) have been addressed so far.  The lack of a flag table or other controls for the rest of the project settings is currently the main limitation.

-Brad

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain confidential information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------


More information about the cmake-developers mailing list