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

2014-12-16 Thread Dmitry Polyanitsa
Hi Robert,


 I just tried to upgrade to 3.0r4 and it still defaults the Visual Project 
 setting of Language - C++ Language Standard to Default. I need to set it 
 to C++11 somehow, otherwise I get many errors that the C++11 code we are 
 using in our engine cannot compile. This will either need to be fixed in 
 CMake through a new variable or in the NVidia NSight Tegra package?
I was wrong about this. We're using C++11 by default only in our template 
projects, the default value still being left up to the compiler to decide (== 
don't pass the standard-changing flags). I'm afraid for the time being you'll 
need to use the workaround you've already mentioned. We'll probably add some 
Nsight Tegra specific properties to CMake in the future and when we do, we'll 
make sure C++ Language Standard will be one of them.

 Furthermore, upgrading to 3.0r4 has added a popup when opening the solution 
 in Visual Studio, stating that the project files generated needs to be 
 upgraded. Its upgrading the setting Preserve native API level to some 
 value. My guess it that the CMake generator doesn't set the proper default 
 value for this version of NSight.
I'm sure I've submitted a patch for this - please try updating CMake to a newer 
RC or nightly and see if the problem goes away.

-Dmitry

From: Robert Goulet [mailto:robert.gou...@autodesk.com]
Sent: Tuesday, December 16, 2014 12:02 AM
To: Dmitry Polyanitsa; Brad King
Cc: cmake-developers@cmake.org
Subject: RE: [cmake-developers] CMake 3.1 Android - generator expressions and 
output names


Hi Dmitry,



I just tried to upgrade to 3.0r4 and it still defaults the Visual Project 
setting of Language - C++ Language Standard to Default. I need to set it 
to C++11 somehow, otherwise I get many errors that the C++11 code we are using 
in our engine cannot compile. This will either need to be fixed in CMake 
through a new variable or in the NVidia NSight Tegra package?



Furthermore, upgrading to 3.0r4 has added a popup when opening the solution in 
Visual Studio, stating that the project files generated needs to be upgraded. 
Its upgrading the setting Preserve native API level to some value. My guess 
it that the CMake generator doesn't set the proper default value for this 
version of NSight.





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



We usually advise to upgrade to the latest version. The transition should be 
smooth, but you may want to install TADP 3.0r4 on one of the machines first to 
check all's good before updating it everywhere. In case of any issues or 
questions you can contact me directly via email.



-Dmitry



-Original Message-

From: Robert Goulet [mailto:robert.gou...@autodesk.com]

Sent: Wednesday, December 3, 2014 7:03 PM

To: Dmitry Polyanitsa; Brad King

Cc: cmake-developers@cmake.orgmailto:cmake-developers@cmake.org

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



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:dpolyani...@nvidia.com]

Sent: Wednesday, December 3, 2014 10:46 AM

To: Robert Goulet; Brad King

Cc: cmake-developers@cmake.orgmailto:cmake-developers@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.gou...@autodesk.com]

Sent: Wednesday, December 3, 2014 12:28 AM

To: Brad King

Cc: cmake-developers@cmake.orgmailto:cmake-developers@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 

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

2014-12-16 Thread Brad King
On 12/16/2014 06:58 AM, Dmitry Polyanitsa wrote:
 3.0r4 has added a popup when opening the solution in Visual Studio
 stating that the project files generated needs to be upgraded.
 
 I'm sure I've submitted a patch for this – please try updating CMake

IIUC the patch was this one:

 VS: Change Nsight Tegra 2.0 Project Revision Number from 8 to 9
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb3c87f1

and is available in 3.1.0-rc3.

However, CMake cannot predict future version numbers, so it writes
a NsightTegraUpgradeOnceWithoutPrompt element into the project file.
Nsight Tegra is supposed to upgrade such projects without any popup.

-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] CMake 3.1 Android - generator expressions and output names

2014-12-16 Thread Dmitry Polyanitsa
Yes, that's the one.

Nsight Tegra will upgrade the projects without a prompt, but only starting with 
the next version number increase.

-Dmitry

-Original Message-
From: Brad King [mailto:brad.k...@kitware.com] 
Sent: Tuesday, December 16, 2014 4:30 PM
To: Robert Goulet
Cc: Dmitry Polyanitsa; cmake-developers@cmake.org
Subject: Re: [cmake-developers] CMake 3.1 Android - generator expressions and 
output names

On 12/16/2014 06:58 AM, Dmitry Polyanitsa wrote:
 3.0r4 has added a popup when opening the solution in Visual Studio 
 stating that the project files generated needs to be upgraded.
 
 I'm sure I've submitted a patch for this - please try updating CMake

IIUC the patch was this one:

 VS: Change Nsight Tegra 2.0 Project Revision Number from 8 to 9
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb3c87f1

and is available in 3.1.0-rc3.

However, CMake cannot predict future version numbers, so it writes a 
NsightTegraUpgradeOnceWithoutPrompt element into the project file.
Nsight Tegra is supposed to upgrade such projects without any popup.

-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.
---
-- 

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] CMake 3.1 Android - generator expressions and output names

2014-12-16 Thread J Decker
Set_source_files_properties( *test2.c** PROPERTIES** LANGUAGE CXX** )*

http://www.cmake.org/pipermail/cmake/2008-July/022647.html

On Tue, Dec 16, 2014 at 5:45 AM, Dmitry Polyanitsa dpolyani...@nvidia.com
wrote:

 Yes, that's the one.

 Nsight Tegra will upgrade the projects without a prompt, but only starting
 with the next version number increase.

 -Dmitry

 -Original Message-
 From: Brad King [mailto:brad.k...@kitware.com]
 Sent: Tuesday, December 16, 2014 4:30 PM
 To: Robert Goulet
 Cc: Dmitry Polyanitsa; cmake-developers@cmake.org
 Subject: Re: [cmake-developers] CMake 3.1 Android - generator expressions
 and output names

 On 12/16/2014 06:58 AM, Dmitry Polyanitsa wrote:
  3.0r4 has added a popup when opening the solution in Visual Studio
  stating that the project files generated needs to be upgraded.
 
  I'm sure I've submitted a patch for this - please try updating CMake

 IIUC the patch was this one:

  VS: Change Nsight Tegra 2.0 Project Revision Number from 8 to 9
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb3c87f1

 and is available in 3.1.0-rc3.

 However, CMake cannot predict future version numbers, so it writes a
 NsightTegraUpgradeOnceWithoutPrompt element into the project file.
 Nsight Tegra is supposed to upgrade such projects without any popup.

 -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.

 ---
 --

 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

-- 

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] CMake 3.1 Android - generator expressions and output names

2014-12-16 Thread Robert Goulet
Upgrading to CMake 3.1-rc3 indeed fixed the upgrade popup upon opening 
generated solution/project files when using NVidia NSight Tegra 3.0r4, however 
the value of Native Android API Level seems to default to Use Min Android 
API Level instead of the expected Use Target Android API Level. Since we 
cannot set the Min or the Native API Level explicitly in CMake, this is a 
regression when upgrading to NVidia NSight Tegra 3.0r4 (from 3.0r3). I guess we 
will have to stick with NVidia NSight Tegra 3.0r3 for now.


-Original Message-
From: Dmitry Polyanitsa [mailto:dpolyani...@nvidia.com] 
Sent: Tuesday, December 16, 2014 8:46 AM
To: Brad King; Robert Goulet
Cc: cmake-developers@cmake.org
Subject: RE: [cmake-developers] CMake 3.1 Android - generator expressions and 
output names

Yes, that's the one.

Nsight Tegra will upgrade the projects without a prompt, but only starting with 
the next version number increase.

-Dmitry

-Original Message-
From: Brad King [mailto:brad.k...@kitware.com]
Sent: Tuesday, December 16, 2014 4:30 PM
To: Robert Goulet
Cc: Dmitry Polyanitsa; cmake-developers@cmake.org
Subject: Re: [cmake-developers] CMake 3.1 Android - generator expressions and 
output names

On 12/16/2014 06:58 AM, Dmitry Polyanitsa wrote:
 3.0r4 has added a popup when opening the solution in Visual Studio 
 stating that the project files generated needs to be upgraded.
 
 I'm sure I've submitted a patch for this - please try updating CMake

IIUC the patch was this one:

 VS: Change Nsight Tegra 2.0 Project Revision Number from 8 to 9
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb3c87f1

and is available in 3.1.0-rc3.

However, CMake cannot predict future version numbers, so it writes a 
NsightTegraUpgradeOnceWithoutPrompt element into the project file.
Nsight Tegra is supposed to upgrade such projects without any popup.

-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.
---
-- 

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] CMake 3.1 Android - generator expressions and output names

2014-12-16 Thread Dmitry Polyanitsa
Native Android API Level really should be the same as Min Android API Level, 
otherwise you might have problems in runtime. The upgrade action sets this 
property to Use Target Android API Level only for the sake of compatibility 
between Nsight Tegra versions, but we strongly encourage our users to switch it 
back to Use Min. We will show a warning if the Native and Min API Levels are 
not the same (Google's ndk-build does it as well).

-Dmitry

-Original Message-
From: Robert Goulet [mailto:robert.gou...@autodesk.com] 
Sent: Tuesday, December 16, 2014 6:58 PM
To: Dmitry Polyanitsa; Brad King
Cc: cmake-developers@cmake.org
Subject: RE: [cmake-developers] CMake 3.1 Android - generator expressions and 
output names

Upgrading to CMake 3.1-rc3 indeed fixed the upgrade popup upon opening 
generated solution/project files when using NVidia NSight Tegra 3.0r4, however 
the value of Native Android API Level seems to default to Use Min Android 
API Level instead of the expected Use Target Android API Level. Since we 
cannot set the Min or the Native API Level explicitly in CMake, this is a 
regression when upgrading to NVidia NSight Tegra 3.0r4 (from 3.0r3). I guess we 
will have to stick with NVidia NSight Tegra 3.0r3 for now.


-Original Message-
From: Dmitry Polyanitsa [mailto:dpolyani...@nvidia.com]
Sent: Tuesday, December 16, 2014 8:46 AM
To: Brad King; Robert Goulet
Cc: cmake-developers@cmake.org
Subject: RE: [cmake-developers] CMake 3.1 Android - generator expressions and 
output names

Yes, that's the one.

Nsight Tegra will upgrade the projects without a prompt, but only starting with 
the next version number increase.

-Dmitry

-Original Message-
From: Brad King [mailto:brad.k...@kitware.com]
Sent: Tuesday, December 16, 2014 4:30 PM
To: Robert Goulet
Cc: Dmitry Polyanitsa; cmake-developers@cmake.org
Subject: Re: [cmake-developers] CMake 3.1 Android - generator expressions and 
output names

On 12/16/2014 06:58 AM, Dmitry Polyanitsa wrote:
 3.0r4 has added a popup when opening the solution in Visual Studio 
 stating that the project files generated needs to be upgraded.
 
 I'm sure I've submitted a patch for this - please try updating CMake

IIUC the patch was this one:

 VS: Change Nsight Tegra 2.0 Project Revision Number from 8 to 9
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb3c87f1

and is available in 3.1.0-rc3.

However, CMake cannot predict future version numbers, so it writes a 
NsightTegraUpgradeOnceWithoutPrompt element into the project file.
Nsight Tegra is supposed to upgrade such projects without any popup.

-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.
---
-- 

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] CMake 3.1 Android - generator expressions and output names

2014-12-16 Thread Robert Goulet
Yes but in our case, we target API 19 (4.4), and min seems to defaults to 9 
(2.3) with CMake, and if we leave the native API to use the min, then it fails 
to find GLES 3.0 headers. It only works if I set the native API to Target 
instead of Min. Perhaps I misunderstood something?

-Original Message-
From: Dmitry Polyanitsa [mailto:dpolyani...@nvidia.com] 
Sent: Tuesday, December 16, 2014 11:09 AM
To: Robert Goulet; Brad King
Cc: cmake-developers@cmake.org
Subject: RE: [cmake-developers] CMake 3.1 Android - generator expressions and 
output names

Native Android API Level really should be the same as Min Android API Level, 
otherwise you might have problems in runtime. The upgrade action sets this 
property to Use Target Android API Level only for the sake of compatibility 
between Nsight Tegra versions, but we strongly encourage our users to switch it 
back to Use Min. We will show a warning if the Native and Min API Levels are 
not the same (Google's ndk-build does it as well).

-Dmitry

-Original Message-
From: Robert Goulet [mailto:robert.gou...@autodesk.com]
Sent: Tuesday, December 16, 2014 6:58 PM
To: Dmitry Polyanitsa; Brad King
Cc: cmake-developers@cmake.org
Subject: RE: [cmake-developers] CMake 3.1 Android - generator expressions and 
output names

Upgrading to CMake 3.1-rc3 indeed fixed the upgrade popup upon opening 
generated solution/project files when using NVidia NSight Tegra 3.0r4, however 
the value of Native Android API Level seems to default to Use Min Android 
API Level instead of the expected Use Target Android API Level. Since we 
cannot set the Min or the Native API Level explicitly in CMake, this is a 
regression when upgrading to NVidia NSight Tegra 3.0r4 (from 3.0r3). I guess we 
will have to stick with NVidia NSight Tegra 3.0r3 for now.


-Original Message-
From: Dmitry Polyanitsa [mailto:dpolyani...@nvidia.com]
Sent: Tuesday, December 16, 2014 8:46 AM
To: Brad King; Robert Goulet
Cc: cmake-developers@cmake.org
Subject: RE: [cmake-developers] CMake 3.1 Android - generator expressions and 
output names

Yes, that's the one.

Nsight Tegra will upgrade the projects without a prompt, but only starting with 
the next version number increase.

-Dmitry

-Original Message-
From: Brad King [mailto:brad.k...@kitware.com]
Sent: Tuesday, December 16, 2014 4:30 PM
To: Robert Goulet
Cc: Dmitry Polyanitsa; cmake-developers@cmake.org
Subject: Re: [cmake-developers] CMake 3.1 Android - generator expressions and 
output names

On 12/16/2014 06:58 AM, Dmitry Polyanitsa wrote:
 3.0r4 has added a popup when opening the solution in Visual Studio 
 stating that the project files generated needs to be upgraded.
 
 I'm sure I've submitted a patch for this - please try updating CMake

IIUC the patch was this one:

 VS: Change Nsight Tegra 2.0 Project Revision Number from 8 to 9
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb3c87f1

and is available in 3.1.0-rc3.

However, CMake cannot predict future version numbers, so it writes a 
NsightTegraUpgradeOnceWithoutPrompt element into the project file.
Nsight Tegra is supposed to upgrade such projects without any popup.

-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.
---
-- 

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] Volunteering to maintain a new module: FindGSL.cmake

2014-12-16 Thread Thompson, KT
Brad,

I made the changes that you suggested wrt removing trailing whitespace and 
removing variables from the cache. I also reverted a recent change by replacing 
GSL_CONFIG_EXECUTABLE with GSL_CONFIG to remain consistent with the naming 
conventions of PkgConfig.cmake. The updated FindGSL.cmake is attached.

I also created a simple test for the new module (see attached FindGSL.tgz).  If 
ENABLE_FINDGSL_TEST is true, this test will be included.  I am setting up a 
nightly cmake regression on one of my machines that will run this test. In 
addition to the new files found in FindGSL.tgz, the Tests/CMakeLists.txt will 
require this simple addition:

--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1252,6 +1252,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P 
${CMake_SOURCE_DIR}/Utilities/Release
 add_subdirectory(FindGTK2)
   endif()
 
+  find_package(GSL QUIET)
+  if(GSL_FOUND AND ENABLE_FINDGSL_TEST)
+add_subdirectory(FindGSL)
+  endif()
+
   add_test(ExternalProject ${CMAKE_CTEST_COMMAND}
 --build-and-test
 ${CMake_SOURCE_DIR}/Tests/ExternalProject

I can build build and test cmake with my new tests in my local sandbox so I 
have some confidence that the test is working as intended.  I don't know how to 
check the testing code in the cmake regression system w/o it being checked into 
git.

Let me know how I should proceed.

-kt



FindGSL.cmake
Description: FindGSL.cmake


FindGSL.tgz
Description: FindGSL.tgz
-- 

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] [CMake 0015311]: CMAKE_CXX_KNOWN_FEATURES variable documentation should be corrected

2014-12-16 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://www.cmake.org/Bug/view.php?id=15311 
== 
Reported By:Paweł Stankowski
Assigned To:
== 
Project:CMake
Issue ID:   15311
Category:   CMake
Reproducibility:always
Severity:   text
Priority:   high
Status: new
== 
Date Submitted: 2014-12-16 14:46 EST
Last Modified:  2014-12-16 14:46 EST
== 
Summary:CMAKE_CXX_KNOWN_FEATURES variable documentation
should be corrected
Description: 
CMake 3.1 documentation available at www.cmake.org contains reference to
obsolete documentation of override control features. According to
[[http://msdn.microsoft.com/en-us/library/hh567368.aspx|http://msdn.microsoft.com/en-us/library/hh567368.aspx]],
final version of override control in C++11 is based on changes from N3206 and
N3272 documents. It means that defining \[\[hiding\]\],\[\[override\]\] and
other attributes and hiding control are not part of C++11 Standard.

Current CMake documentation:
cxx_final
Override control final keyword, as defined in N2928.
cxx_override
Override control override keyword, as defined in N2928.

Even CMake unit tests Tests/CompileFeatures/cxx_{final,override}.cpp check only
for 'override' keyword support, and not for attributes support from N2928.

There is a bug in GCC site, which potencially could be a reason for this one.

[[https://gcc.gnu.org/gcc-4.7/changes.html|GCC 4.7 changes page]] contains an
example of usage for 'override' keyword (and not attribute), but
[[https://gcc.gnu.org/gcc-4.7/cxx0x_status.html|Status of Experimental C++11
Support in GCC 4.7]] page lists only proposal N2928 as the one being
implemented. This bug was fixed at general
[[https://gcc.gnu.org/projects/cxx0x.html|C++0x/C++11 Support in GCC]] page.

Btw: Support for C++11 attribute syntax was added in
[[https://gcc.gnu.org/gcc-4.8/changes.html|g++ 4.8]].
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2014-12-16 14:46 Paweł StankowskiNew Issue
==

-- 

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 0/4] XCTest Bundles v2

2014-12-16 Thread Gregor Jasny
Hello,

I addressed all the comments you gave about the last series.

changes to v1:
* Slit out independent patches
* Restrict testing to Cocoa Applications because I have not managed
  to test Frameworks without crashing Xcode
* cross referenced properties
* Enhanced error logs in Xcode generator

open issues:
* if a fatal error is issued in cmGlobalXCodeGenerator::CreateBuildSettings
  generation does not stop. So you'll see the error for every configuration.
* Hooking up CocoaExample into test suite. Note: This is an Cocoa application,
  so it needs a valid display session.
  
targets for separate patch sets:
* Framework test support
* Makefile / Ninja xctest support - but this will need some bigger patches
  in all Framework, CFBundle, and Application Bundle code. Don't know if it's
  worth the trouble


On 09/12/14 21:40, Brad King wrote:
  On non-Apple platforms and Xcode  5.0 those XCTest bundles are pretty
  useless.
 What should CMake do on those platforms?  The fact that an add_library
 call has occurred means it needs to do something with the target.
 Should it be an error to ensure that the project adds such targets
 only conditionally?

I'd say handle it exactly like CFBundles are handled on foreign platforms.
I added a warning if the Xcode version is too old to support XCTest.

  Note: It is currently not possible to run the tests without opening Xcode
  once to (auto) generate the Schema files. Otherwise calling
  xcodebuild test -scheme CocoaExample will not recognise the scheme.
 Does this mean we can't automatically setup testing?

I added a Schema and install it as part of the configuration run. But I don't
know how stable the IDs in the schema or pbxproj are. You can run the tests:

mkdir Tests/CocoaExample/_build
cd Tests/CocoaExample/_build
cmake -GXcode ..
xcodebuild -scheme CocoaExample test

Thanks,
Gregor

Gregor Jasny (4):
  Use GetCFBundleDirectory within GetFullNameInternal
  Call cmTarget::IsCFBundleOnApple to decide if bundle is being built
  Add handling for XCTest bundles
  Add XCTest Example

 Help/manual/cmake-properties.7.rst |   2 +
 Help/prop_tgt/XCTEST.rst   |  11 +
 Help/prop_tgt/XCTEST_HOST.rst  |   8 +
 Source/cmGlobalXCodeGenerator.cxx  |  69 ++-
 Source/cmTarget.cxx|  30 +-
 Source/cmTarget.h  |   3 +
 Tests/CocoaExample/CMakeLists.txt  |  31 +
 Tests/CocoaExample/CocoaExample.xcscheme   | 110 
 Tests/CocoaExample/CocoaExample/AppDelegate.h  |   7 +
 Tests/CocoaExample/CocoaExample/AppDelegate.m  |  18 +
 Tests/CocoaExample/CocoaExample/Info.plist.in  |  32 +
 Tests/CocoaExample/CocoaExample/MainMenu.xib   | 680 +
 Tests/CocoaExample/CocoaExample/main.m |   5 +
 .../CocoaExampleTests/CocoaExampleTests.m  |  13 +
 14 files changed, 1005 insertions(+), 14 deletions(-)
 create mode 100644 Help/prop_tgt/XCTEST.rst
 create mode 100644 Help/prop_tgt/XCTEST_HOST.rst
 create mode 100644 Tests/CocoaExample/CMakeLists.txt
 create mode 100644 Tests/CocoaExample/CocoaExample.xcscheme
 create mode 100644 Tests/CocoaExample/CocoaExample/AppDelegate.h
 create mode 100644 Tests/CocoaExample/CocoaExample/AppDelegate.m
 create mode 100644 Tests/CocoaExample/CocoaExample/Info.plist.in
 create mode 100644 Tests/CocoaExample/CocoaExample/MainMenu.xib
 create mode 100644 Tests/CocoaExample/CocoaExample/main.m
 create mode 100644 Tests/CocoaExample/CocoaExampleTests/CocoaExampleTests.m

-- 
1.9.3 (Apple Git-50)

-- 

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 3/4] Add handling for XCTest bundles

2014-12-16 Thread Gregor Jasny
An XCTest bundle is a CFBundle with a special product-type and bundle
extension. It gets loaded directly into the AppBundle
it should test. For more information about XCTest visit the Mac
Developer library at:

http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/

To build a XCTest bundle, you need to create a CFBundle and set the
XCTEST property. Additionally you need to specify the application
target to test within the XCTEST_HOST property. CMake
and Xcode will then setup the correct target dependencies.

add_library(CocoaExampleTest MODULE ...)
set_target_properties(CocoaExampleTest PROPERTIES
  XCTEST TRUE
  XCTEST_HOST CocoaExample)

Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 Help/manual/cmake-properties.7.rst |  2 ++
 Help/prop_tgt/XCTEST.rst   | 11 +++
 Help/prop_tgt/XCTEST_HOST.rst  |  8 +
 Source/cmGlobalXCodeGenerator.cxx  | 67 --
 Source/cmTarget.cxx| 19 +--
 Source/cmTarget.h  |  3 ++
 6 files changed, 106 insertions(+), 4 deletions(-)
 create mode 100644 Help/prop_tgt/XCTEST.rst
 create mode 100644 Help/prop_tgt/XCTEST_HOST.rst

diff --git a/Help/manual/cmake-properties.7.rst 
b/Help/manual/cmake-properties.7.rst
index cca6d28..7b8aa66 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -242,6 +242,8 @@ Properties on Targets
/prop_tgt/VS_WINRT_REFERENCES
/prop_tgt/WIN32_EXECUTABLE
/prop_tgt/XCODE_ATTRIBUTE_an-attribute
+   /prop_tgt/XCTEST
+   /prop_tgt/XCTEST_HOST
 
 Properties on Tests
 ===
diff --git a/Help/prop_tgt/XCTEST.rst b/Help/prop_tgt/XCTEST.rst
new file mode 100644
index 000..9086485
--- /dev/null
+++ b/Help/prop_tgt/XCTEST.rst
@@ -0,0 +1,11 @@
+XCTEST
+--
+
+This target is a XCTest CFBundle on the Mac.
+
+If a module library target has this property set to true it will be
+built as a CFBundle when built on the mac.  It will have the directory
+structure required for a CFBundle.
+
+This property implies :prop_tgt:`BUNDLE` and also requires the
+:prop_tgt:`XCTEST_HOST` property to be set.
diff --git a/Help/prop_tgt/XCTEST_HOST.rst b/Help/prop_tgt/XCTEST_HOST.rst
new file mode 100644
index 000..5284246
--- /dev/null
+++ b/Help/prop_tgt/XCTEST_HOST.rst
@@ -0,0 +1,8 @@
+XCTEST_HOST
+---
+
+XCTest works by injecting an XCTest CFBundle directly into an AppBundle.
+This property names this destination target under test.
+
+This property is only useful with the Xcode Generator and also needs the
+:prop_tgt:`XCTEST` property enabled on the target.
diff --git a/Source/cmGlobalXCodeGenerator.cxx 
b/Source/cmGlobalXCodeGenerator.cxx
index 6a480a9..7a71e70 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -493,6 +493,15 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* 
root,
 allbuild-AddUtility(target.GetName());
 }
 
+  if(target.IsXCTestOnApple())
+{
+const char *testHostName = target.GetProperty(XCTEST_HOST);
+if(testHostName  
this-CurrentMakefile-FindTargetToUse(testHostName))
+  {
+  target.AddUtility(testHostName);
+  }
+}
+
   // Refer to the build configuration file for easy editing.
   listfile = lg-GetMakefile()-GetStartDirectory();
   listfile += /;
@@ -761,6 +770,10 @@ GetSourcecodeValueFromFileExtension(const std::string 
_ext,
 {
 sourcecode = compiled.mach-o.objfile;
 }
+  else if(ext == xctest)
+{
+sourcecode = wrapper.cfbundle;
+}
   else if(ext == xib)
 {
 keepLastKnownFileType = true;
@@ -2321,6 +2334,52 @@ void 
cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget target,
 buildSettings-AddAttribute(DYLIB_COMPATIBILITY_VERSION,
 this-CreateString(vso.str().c_str()));
 }
+
+  if(target.IsXCTestOnApple())
+{
+if(this-XcodeVersion  50)
+  {
+  this-CMakeInstance-IssueMessage(cmake::WARNING,
+Xcode 5.0 or later is required for XCTEST support.,
+target.GetBacktrace());
+  }
+
+const char *testHostName = target.GetProperty(XCTEST_HOST);
+if(!testHostName)
+  {
+  this-CMakeInstance-IssueMessage(cmake::FATAL_ERROR,
+target has XCTEST property but no XCTEST_HOST one.,
+target.GetBacktrace());
+  return;
+  }
+
+cmTarget *testHostTarget =
+  this-CurrentMakefile-FindTargetToUse(testHostName);
+if(!testHostTarget)
+  {
+  cmOStringStream e;
+  e  Cannot find XCTEST_HOST target:   testHostName;
+  this-CMakeInstance-IssueMessage(cmake::FATAL_ERROR,
+e.str(), target.GetBacktrace());
+  return;
+  }
+
+if (!testHostTarget-IsAppBundleOnApple())
+  {
+  cmOStringStream e;
+  e  XCTEST_HOST target   testHostName;
+  e   is not an App Bundle;
+  

[cmake-developers] [PATCH 2/4] Call cmTarget::IsCFBundleOnApple to decide if bundle is being built

2014-12-16 Thread Gregor Jasny
Narrow down the decision if a CFBundle is built to one place.
This is a preparation patch to add the XCTEST target property
which, if set, will imply BUNDLE. Having only one function
which will have to look at both properties helps to keep code
clean.

Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 Source/cmGlobalXCodeGenerator.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Source/cmGlobalXCodeGenerator.cxx 
b/Source/cmGlobalXCodeGenerator.cxx
index de6e915..6a480a9 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1925,7 +1925,7 @@ void 
cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget target,
 {
 buildSettings-AddAttribute(LIBRARY_STYLE,
 this-CreateString(BUNDLE));
-if (target.GetPropertyAsBool(BUNDLE))
+if (target.IsCFBundleOnApple())
   {
   // It turns out that a BUNDLE is basically the same
   // in many ways as an application bundle, as far as
-- 
1.9.3 (Apple Git-50)

-- 

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 1/4] Use GetCFBundleDirectory within GetFullNameInternal

2014-12-16 Thread Gregor Jasny
Replace duplicated code by call to GetCFBundleDirectory.

Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 Source/cmTarget.cxx | 11 ++-
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index f0957d0..90295c8 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4056,15 +4056,8 @@ void cmTarget::GetFullNameInternal(const std::string 
config,
 
   if(this-IsCFBundleOnApple())
 {
-fw_prefix = this-GetOutputName(config, false);
-fw_prefix += .;
-const char *ext = this-GetProperty(BUNDLE_EXTENSION);
-if (!ext)
-  {
-  ext = bundle;
-  }
-fw_prefix += ext;
-fw_prefix += /Contents/MacOS/;
+fw_prefix = this-GetCFBundleDirectory(config, false);
+fw_prefix += /;
 targetPrefix = fw_prefix.c_str();
 targetSuffix = 0;
 }
-- 
1.9.3 (Apple Git-50)

-- 

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] [CMake 0015312]: setting CMAKE_AR doesn't work

2014-12-16 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=15312 
== 
Reported By:Alan Scott
Assigned To:
== 
Project:CMake
Issue ID:   15312
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2014-12-17 00:00 WAST
Last Modified:  2014-12-17 00:00 WAST
== 
Summary:setting CMAKE_AR doesn't work
Description: 
From a user (Dave K):

when using the intel compilers, you need to use their ar tool, xiar. The first
issue is that the intel ar utility is not automatically recognized when the
compiler is intel. The second issue is that setting the CMAKE_AR variable does
not propagate to the CMakeFiles/version/CMakeCCompiler and CMakeCXXCompiler
files (so it's effectively ignored)

This becomes evident when using -ip and -ipo optimization flags (since they fail
with static libraries linked with ar vs xiar)


== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2014-12-17 00:00 Alan Scott New Issue
==

-- 

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