[cmake-developers] Update Nsight Tegra Project Revision Number
Hello, I'd like to update the project rev number from 8 to 9 for the Nsight Tegra 2.0 projects. We had the need to increase the project number in a hotfix and would like CMake to emit that number as well. No other changes are needed. Attached is the formatted patch for the proposed change. -Dmitry 0001-Change-Nsight-Tegra-2.0-Project-Revision-Number-from.patch Description: 0001-Change-Nsight-Tegra-2.0-Project-Revision-Number-from.patch -- 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] Update Nsight Tegra Project Revision Number
Thank you! -Dmitry -Original Message- From: Brad King [mailto:brad.k...@kitware.com] Sent: Thursday, November 13, 2014 10:08 PM To: Dmitry Polyanitsa Cc: cmake-developers@cmake.org Subject: Re: [cmake-developers] Update Nsight Tegra Project Revision Number On 11/13/2014 01:08 PM, Dmitry Polyanitsa wrote: Attached is the formatted patch for the proposed change. Applied: VS: Change Nsight Tegra 2.0 Project Revision Number from 8 to 9 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb3c87f1 Since this is an environmental regression I will include it in the next 3.1 release candidate. 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] CMake 3.1 Android - generator expressions and output names
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
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
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
No, you're right - this is an unfortunate shortcoming. I've attached a patch for CMake as of 0dd9e71 that adds ANDROID_API_MIN/CMAKE_ANDROID_API_MIN which will allow you to set the Min Android API Level in your projects. Brad, I've used ANDROID_API/CMAKE_ANDROID_API as an example when implementing this change. I've added MIN as a postfix, for it seemed to be the preferred way, judging by the other propertiy names. Could you please merge the patch into CMake? -Dmitry -Original Message- From: Robert Goulet [mailto:robert.gou...@autodesk.com] Sent: Tuesday, December 16, 2014 7:36 PM To: Dmitry Polyanitsa; Brad King Cc: cmake-developers@cmake.org Subject: RE: [cmake-developers] CMake 3.1 Android - generator expressions and output names 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. --- 0001-Add-ANDROID_API_MIN-target-property-and-CMAKE_ANDROI.patch Description: 0001-Add-ANDROID_API_MIN-target-property-and-CMAKE_ANDROI.patch -- 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
Re: [cmake-developers] CMake 3.1 Android - generator expressions and output names
Great, thank you! Robert, could you please try the nightly to see if there are any further issues preventing you from using the latest Nsight Tegra? -Dmitry -Original Message- From: Brad King [mailto:brad.k...@kitware.com] Sent: Wednesday, December 17, 2014 7:20 PM To: Dmitry Polyanitsa Cc: Robert Goulet; cmake-developers@cmake.org Subject: Re: [cmake-developers] CMake 3.1 Android - generator expressions and output names On 12/17/2014 09:22 AM, Dmitry Polyanitsa wrote: adds ANDROID_API_MIN/CMAKE_ANDROID_API_MIN which will allow you to set the Min Android API Level in your projects. Thanks. I've applied the patch and merged for testing: Add 'ANDROID_API_MIN' target property to set Android Target MIN API http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eeaa25e5 This will be available in the next nightly binaries that appear here: http://www.cmake.org/files/dev/?C=M;O=D We're long past the freeze for 3.1 features so this will be in 3.2. -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] target_link_libraries and --start-group/--end-group ?
No problem, I'm glad it worked for you in the end :) -Dmitry -Original Message- From: Robert Goulet [mailto:robert.gou...@autodesk.com] Sent: Tuesday, January 13, 2015 8:40 PM To: Dmitry Polyanitsa Cc: Brad King; Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Thank you very much Dmitry, but I actually found a not-so-ugly work-around for now. I simply add the libraries twice and it works for us (target_link_library(${PROJECT_NAME} foo bar foo bar)), so you won't have to issue a special build for us. We are getting very close to release so for now we'd rather not upgrade Nsight Tegra yet, but as soon as the pressure is over I will be looking into this again and make it my top priority. Thanks! -Original Message- From: Dmitry Polyanitsa [mailto:dpolyani...@nvidia.com] Sent: Tuesday, January 13, 2015 12:29 PM To: Robert Goulet Cc: Brad King; Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Well, in this particular case I believe we can patch the old release of Nsight Tegra that you're using to make it behave properly when -Wl,--start-group/-Wl,--end-group is encountered in the linker dependencies. Updating the old TADP to contain the fixed version of Nsight Tegra won't be a fast task, but we could provide you with the latter directly via email/FTP. How does that sound? -Dmitry -Original Message- From: Robert Goulet [mailto:robert.gou...@autodesk.com] Sent: Tuesday, January 13, 2015 7:09 PM To: Dmitry Polyanitsa; Brad King Cc: Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Problem with that is that we are using generator expressions in the library path names. That won't work when trying to set CMAKE_EXE_LINKER_FLAGS if I'm not mistaken. -Original Message- From: Dmitry Polyanitsa [mailto:dpolyani...@nvidia.com] Sent: Tuesday, January 13, 2015 11:01 AM To: Robert Goulet; Brad King Cc: Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Ah, in that case I'm afraid it won't work since we've added the parentheses syntax in 3.0r4. The only other option I can think of is using the Linker - Command Line - Additional Options to manually add all the dependencies and leave the Linker - Input - Additional Dependencies empty. These additional options are passed to the linker unchanged and lots of people have been using them to define linker groups before we've introduced the official syntax for that. I'm not sure how you can write to that property from CMakeLists.txt, however. Brad, can we do that in CMake? Our additional options are compatible with VC++ ones in terms of the metadata name, i.e. it's Link.AdditionalOptions. -Dmitry -Original Message- From: Robert Goulet [mailto:robert.gou...@autodesk.com] Sent: Tuesday, January 13, 2015 6:52 PM To: Dmitry Polyanitsa; Brad King Cc: Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Using NVidia NSight Tegra 3.0r3. Upgrading to 3.0r4 is not an option right now because it would require all our users to use and nightly build of CMake and we want to stick with official releases. -Original Message- From: Dmitry Polyanitsa [mailto:dpolyani...@nvidia.com] Sent: Tuesday, January 13, 2015 10:48 AM To: Robert Goulet; Brad King Cc: Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Robert, What Nsight Tegra version are you using? The AdditionalDependencies string you've described should be correctly parsed as libraries list with a group in the latest Nsight Tegra release. Unfortunately, the existence of a declarative-style platform files workaround is unlikely - we do most of the processing in the build tasks DLL, which is written in C#, so you cannot easily alter things there. -Dmitry -Original Message- From: Robert Goulet [mailto:robert.gou...@autodesk.com] Sent: Tuesday, January 13, 2015 6:37 PM To: Brad King Cc: Dmitry Polyanitsa; Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Hi all, Dmitry suggestion didn't work. It outputs the following in the .vcxproj file: AdditionalDependenciesc;m;dl;log;android;EGL;GLESv2;OpenSLES;(;foo;bar;)/AdditionalDependencies ...and Nsight Tegra interpreted it like this (clang compiler): -lc -lm -ldl -llog -landroid -lEGL -lGLESv2 -lOpenSLES -l( -lfoo -lbar -l) ...which obviously generated a link error (cannot find library '(' and ')'). Using Brad's method of link multiplicity is too much work because we make use of packages and heavy generator expressions, making
Re: [cmake-developers] target_link_libraries and --start-group/--end-group ?
Well, in this particular case I believe we can patch the old release of Nsight Tegra that you're using to make it behave properly when -Wl,--start-group/-Wl,--end-group is encountered in the linker dependencies. Updating the old TADP to contain the fixed version of Nsight Tegra won't be a fast task, but we could provide you with the latter directly via email/FTP. How does that sound? -Dmitry -Original Message- From: Robert Goulet [mailto:robert.gou...@autodesk.com] Sent: Tuesday, January 13, 2015 7:09 PM To: Dmitry Polyanitsa; Brad King Cc: Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Problem with that is that we are using generator expressions in the library path names. That won't work when trying to set CMAKE_EXE_LINKER_FLAGS if I'm not mistaken. -Original Message- From: Dmitry Polyanitsa [mailto:dpolyani...@nvidia.com] Sent: Tuesday, January 13, 2015 11:01 AM To: Robert Goulet; Brad King Cc: Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Ah, in that case I'm afraid it won't work since we've added the parentheses syntax in 3.0r4. The only other option I can think of is using the Linker - Command Line - Additional Options to manually add all the dependencies and leave the Linker - Input - Additional Dependencies empty. These additional options are passed to the linker unchanged and lots of people have been using them to define linker groups before we've introduced the official syntax for that. I'm not sure how you can write to that property from CMakeLists.txt, however. Brad, can we do that in CMake? Our additional options are compatible with VC++ ones in terms of the metadata name, i.e. it's Link.AdditionalOptions. -Dmitry -Original Message- From: Robert Goulet [mailto:robert.gou...@autodesk.com] Sent: Tuesday, January 13, 2015 6:52 PM To: Dmitry Polyanitsa; Brad King Cc: Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Using NVidia NSight Tegra 3.0r3. Upgrading to 3.0r4 is not an option right now because it would require all our users to use and nightly build of CMake and we want to stick with official releases. -Original Message- From: Dmitry Polyanitsa [mailto:dpolyani...@nvidia.com] Sent: Tuesday, January 13, 2015 10:48 AM To: Robert Goulet; Brad King Cc: Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Robert, What Nsight Tegra version are you using? The AdditionalDependencies string you've described should be correctly parsed as libraries list with a group in the latest Nsight Tegra release. Unfortunately, the existence of a declarative-style platform files workaround is unlikely - we do most of the processing in the build tasks DLL, which is written in C#, so you cannot easily alter things there. -Dmitry -Original Message- From: Robert Goulet [mailto:robert.gou...@autodesk.com] Sent: Tuesday, January 13, 2015 6:37 PM To: Brad King Cc: Dmitry Polyanitsa; Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Hi all, Dmitry suggestion didn't work. It outputs the following in the .vcxproj file: AdditionalDependenciesc;m;dl;log;android;EGL;GLESv2;OpenSLES;(;foo;bar;)/AdditionalDependencies ...and Nsight Tegra interpreted it like this (clang compiler): -lc -lm -ldl -llog -landroid -lEGL -lGLESv2 -lOpenSLES -l( -lfoo -lbar -l) ...which obviously generated a link error (cannot find library '(' and ')'). Using Brad's method of link multiplicity is too much work because we make use of packages and heavy generator expressions, making it a lot more difficult and much less elegant. Dmitry, is there a work-around I could temporarily implement in the VS files until you issue a new version of Nsight Tegra? i.e. the files found under C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Tegra-Android ? Thanks. -Original Message- From: Brad King [mailto:brad.k...@kitware.com] Sent: Tuesday, January 13, 2015 9:11 AM To: Robert Goulet Cc: Dmitry Polyanitsa; Justin Borodinsky; cmake-developers@cmake.org Subject: Re: [cmake-developers] target_link_libraries and --start-group/--end-group ? On 1/13/2015 6:19 AM, Dmitry Polyanitsa wrote: you could try using parentheses instead of -Wl,--start-group/-Wl,--end-group [snip] it should serve as a workaround while we fix the prefix addition to the -Wl flags in Nsight Tegra. Thanks, Dmitry. Robert, the linker group flags are platform-specific so the approach CMake offers for doing this in general is the link multiplicity approach Robert Maynard mentioned earlier in this thread: On 1/6/2015 3:50 PM, Robert Goulet wrote: But it doesn't seems to work
Re: [cmake-developers] target_link_libraries and --start-group/--end-group ?
Hi Brad, Robert, Here's the algorithm in short: we split the string by the semicolon and then merge it again, processing each entry as follows. If it contains a slash (forward or backward) or ends with a .so or .a, we consider it to be a fully specified path and don’t add the -l prefix. Otherwise, we add it. We also do some additional processing to handle parentheses (we use them to denote start/end of the groups), but it should be orthogonal to the addition of the prefix. Speaking of which, you could try using parentheses instead of -Wl,--start-group/-Wl,--end-group to define a linker group in the CMakeLists.txt file. The following worked for me (note the escaping): target_link_libraries(twolib-second twolib-first \( c m gcc log \)) This won't be compatible with other generators I presume, but at least it should serve as a workaround while we fix the prefix addition to the -Wl flags in Nsight Tegra. -Dmitry -Original Message- From: Brad King [mailto:brad.k...@kitware.com] Sent: Monday, January 12, 2015 9:06 PM To: Robert Goulet Cc: Justin Borodinsky; cmake-developers@cmake.org; Dmitry Polyanitsa Subject: Re: [cmake-developers] target_link_libraries and --start-group/--end-group ? On 1/12/2015 12:39 PM, Robert Goulet wrote: the generated line in the .vcxproj file looks correct : AdditionalDependenciesandroid;dl;EGL;GLESv3;OpenSLES;-Wl,--start-gro up;libfoo.a;libbar.a;-Wl,--end-group/AdditionalDependencies So now I am guessing the problem is in the glue that adds support of Android to the VS IDE? Where is the code that translate a link library into the command line, such as libfoo.a to -lfoo? That is in the Nsight Tegra implementation AFAIK. Here is a related change already in 3.1.0: VS: Fix Tegra-Android platform linking of libraries by name http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=178f56a5 Dmitry, how does Nsight Tegra transform these flags? Thanks, -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] target_link_libraries and --start-group/--end-group ?
Robert, What Nsight Tegra version are you using? The AdditionalDependencies string you've described should be correctly parsed as libraries list with a group in the latest Nsight Tegra release. Unfortunately, the existence of a declarative-style platform files workaround is unlikely - we do most of the processing in the build tasks DLL, which is written in C#, so you cannot easily alter things there. -Dmitry -Original Message- From: Robert Goulet [mailto:robert.gou...@autodesk.com] Sent: Tuesday, January 13, 2015 6:37 PM To: Brad King Cc: Dmitry Polyanitsa; Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Hi all, Dmitry suggestion didn't work. It outputs the following in the .vcxproj file: AdditionalDependenciesc;m;dl;log;android;EGL;GLESv2;OpenSLES;(;foo;bar;)/AdditionalDependencies ...and Nsight Tegra interpreted it like this (clang compiler): -lc -lm -ldl -llog -landroid -lEGL -lGLESv2 -lOpenSLES -l( -lfoo -lbar -l) ...which obviously generated a link error (cannot find library '(' and ')'). Using Brad's method of link multiplicity is too much work because we make use of packages and heavy generator expressions, making it a lot more difficult and much less elegant. Dmitry, is there a work-around I could temporarily implement in the VS files until you issue a new version of Nsight Tegra? i.e. the files found under C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Tegra-Android ? Thanks. -Original Message- From: Brad King [mailto:brad.k...@kitware.com] Sent: Tuesday, January 13, 2015 9:11 AM To: Robert Goulet Cc: Dmitry Polyanitsa; Justin Borodinsky; cmake-developers@cmake.org Subject: Re: [cmake-developers] target_link_libraries and --start-group/--end-group ? On 1/13/2015 6:19 AM, Dmitry Polyanitsa wrote: you could try using parentheses instead of -Wl,--start-group/-Wl,--end-group [snip] it should serve as a workaround while we fix the prefix addition to the -Wl flags in Nsight Tegra. Thanks, Dmitry. Robert, the linker group flags are platform-specific so the approach CMake offers for doing this in general is the link multiplicity approach Robert Maynard mentioned earlier in this thread: On 1/6/2015 3:50 PM, Robert Goulet wrote: But it doesn't seems to work when building for NVidia NSight Android platform using Visual Studio IDE. With IMPORTED_LINK_INTERFACE_MULTIPLICITY and circular settings for INTERFACE_LINK_LIBRARIES the libraries should show up repeated in the .vcxproj file. -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] target_link_libraries and --start-group/--end-group ?
Ah, in that case I'm afraid it won't work since we've added the parentheses syntax in 3.0r4. The only other option I can think of is using the Linker - Command Line - Additional Options to manually add all the dependencies and leave the Linker - Input - Additional Dependencies empty. These additional options are passed to the linker unchanged and lots of people have been using them to define linker groups before we've introduced the official syntax for that. I'm not sure how you can write to that property from CMakeLists.txt, however. Brad, can we do that in CMake? Our additional options are compatible with VC++ ones in terms of the metadata name, i.e. it's Link.AdditionalOptions. -Dmitry -Original Message- From: Robert Goulet [mailto:robert.gou...@autodesk.com] Sent: Tuesday, January 13, 2015 6:52 PM To: Dmitry Polyanitsa; Brad King Cc: Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Using NVidia NSight Tegra 3.0r3. Upgrading to 3.0r4 is not an option right now because it would require all our users to use and nightly build of CMake and we want to stick with official releases. -Original Message- From: Dmitry Polyanitsa [mailto:dpolyani...@nvidia.com] Sent: Tuesday, January 13, 2015 10:48 AM To: Robert Goulet; Brad King Cc: Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Robert, What Nsight Tegra version are you using? The AdditionalDependencies string you've described should be correctly parsed as libraries list with a group in the latest Nsight Tegra release. Unfortunately, the existence of a declarative-style platform files workaround is unlikely - we do most of the processing in the build tasks DLL, which is written in C#, so you cannot easily alter things there. -Dmitry -Original Message- From: Robert Goulet [mailto:robert.gou...@autodesk.com] Sent: Tuesday, January 13, 2015 6:37 PM To: Brad King Cc: Dmitry Polyanitsa; Justin Borodinsky; cmake-developers@cmake.org Subject: RE: [cmake-developers] target_link_libraries and --start-group/--end-group ? Hi all, Dmitry suggestion didn't work. It outputs the following in the .vcxproj file: AdditionalDependenciesc;m;dl;log;android;EGL;GLESv2;OpenSLES;(;foo;bar;)/AdditionalDependencies ...and Nsight Tegra interpreted it like this (clang compiler): -lc -lm -ldl -llog -landroid -lEGL -lGLESv2 -lOpenSLES -l( -lfoo -lbar -l) ...which obviously generated a link error (cannot find library '(' and ')'). Using Brad's method of link multiplicity is too much work because we make use of packages and heavy generator expressions, making it a lot more difficult and much less elegant. Dmitry, is there a work-around I could temporarily implement in the VS files until you issue a new version of Nsight Tegra? i.e. the files found under C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Tegra-Android ? Thanks. -Original Message- From: Brad King [mailto:brad.k...@kitware.com] Sent: Tuesday, January 13, 2015 9:11 AM To: Robert Goulet Cc: Dmitry Polyanitsa; Justin Borodinsky; cmake-developers@cmake.org Subject: Re: [cmake-developers] target_link_libraries and --start-group/--end-group ? On 1/13/2015 6:19 AM, Dmitry Polyanitsa wrote: you could try using parentheses instead of -Wl,--start-group/-Wl,--end-group [snip] it should serve as a workaround while we fix the prefix addition to the -Wl flags in Nsight Tegra. Thanks, Dmitry. Robert, the linker group flags are platform-specific so the approach CMake offers for doing this in general is the link multiplicity approach Robert Maynard mentioned earlier in this thread: On 1/6/2015 3:50 PM, Robert Goulet wrote: But it doesn't seems to work when building for NVidia NSight Android platform using Visual Studio IDE. With IMPORTED_LINK_INTERFACE_MULTIPLICITY and circular settings for INTERFACE_LINK_LIBRARIES the libraries should show up repeated in the .vcxproj file. -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
Re: [cmake-developers] Setting unexposed Visual Studio properties from CMake?
We're definitely planning to do this, but it's a big action item and we're still prioritizing it. -Dmitry -Original Message- From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] On Behalf Of Brad King Sent: Tuesday, March 17, 2015 9:44 PM To: Robert Goulet Cc: cmake-developers@cmake.org Subject: Re: [cmake-developers] Setting unexposed Visual Studio properties from CMake? On 03/16/2015 10:28 AM, Robert Goulet wrote: Is there a way to set unexposed Visual Studio properties from CMake? No. Unlike Xcode the number of different places that VS properties go means there is no good equivalent to XCODE_ATTRIBUTE_ for VS (or any other generators AFAIK). Exposing every single Nsight Tegra build options to CMake is a big job Nevertheless it is the cleanest path forward IMO. Many of them are likely properties corresponding to specific build flags. The way this works for MS tools is to use the reverse mappings builtin to CMake. See Source/cmVS12CLFlagTable.h for example. We currently have no flag table for Nsight Tegra as mentioned in one of the original commit messages: VS: Teach vcxproj generation about the Tegra-Android platform http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ef0fd4f0 -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 --- 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] [PATCH] Extended Nsight Tegra support for CMake
I've reviewed the patch and tried it locally - looks good. -Dmitry -Original Message- From: Mikhail Filimonov Sent: Monday, July 13, 2015 7:45 PM To: cmake-developers@cmake.org Subject: RE: [cmake-developers] [PATCH] Extended Nsight Tegra support for CMake I've improved the patch according to the Brad's and Dmitry's comments - namely: 1. Improved the documentation for a few target properties. 2. Removed the explicit toolchain file for Nsight Tegra generator test. 3. Improved the generator heuristics for NsightTegraProjectRevisionNumber attribute. Thanks, -Mikhail -Original Message- From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] On Behalf Of Mikhail Filimonov Sent: 9 июля 2015 г. 18:43 To: Brad King Cc: cmake-developers@cmake.org Subject: Re: [cmake-developers] [PATCH] Extended Nsight Tegra support for CMake Thanks for your feedback, Brad From: Brad King [mailto:brad.k...@kitware.com] Sent: 9 июля 2015 г. 18:02 We'd like to keep testing the default behavior without an explicit toolchain file. Also we need to be independent of the toolsets that happen to be available on the system where the test runs, so we should avoid hard-coding a toolset name if possible. Is this part of the patch needed to test everything else? If so, please look at adding more test cases for the new combinations (which can just be more builds of the same test source tree). That's more like a demonstration sample that will show the developers how the various Nsight Tegra project properties could be defined via the various CMake properties even if not directly related to Android - i.e. C_STANDARD and CMAKE_GENERATOR_TOOLSET Currently where's no samples directory in CMake source tree - so I've slightly reworked the existing test case. Maybe you could propose a better way to deliver that sample? Thanks, -Mikhail --- 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] nvidia nsight tegra set vcxproj properties (Ant Build) in cmake file
I’m glad you like it ☺ BTW generating for VS2013 + Nsight Tegra should already be supported in CMake. Support for VS2015 will be added to Nsight Tegra in the next release. -Dmitry From: Peter List [mailto:pem.l...@gmail.com] Sent: Thursday, August 27, 2015 1:36 AM To: Dmitry Polyanitsa dpolyani...@nvidia.com Cc: cmake-developers@cmake.org Subject: Re: [cmake-developers] nvidia nsight tegra set vcxproj properties (Ant Build) in cmake file Awesome - in that case I'll use this built-in support instead of spending time on writing a python script to call from add_custom_command(). It's not officially documented yet ( http://bit.ly/1MOzB0S ), but I can use the link you sent ( http://bit.ly/1UdL3nc ) for documentation. I'm not sure whether this is in the CMake 3.3.1 release, but if not then I can try a nightly build: http://www.cmake.org/download/ - http://www.cmake.org/files/dev/?C=M;O=D - cmake-3.3.20150824-ga3d05-win32-x86.exe Or if that doesn't work, then maybe I'll wait a few days and try a newer nightly build :-) thank you, Peter PS: I love this built-in (nvidia tegra nsight + visual studio 2010) support... Some similar things that would also be awesome as built-in support are... nvidia tegra nsight + visual studio 2013, 2015. nmake + Android Studio (Windows, Mac, Linux). iOS + XCode. On Wed, Aug 26, 2015 at 7:15 AM, Dmitry Polyanitsa dpolyani...@nvidia.commailto:dpolyani...@nvidia.com wrote: Hi Peter, Note the commit Brad mentioned in another thread: VS: Add more Nsight Tegra generator Android property settings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c0afaf4 It adds the ability to set both Native Library Directories and Native Library Dependencies, among other things. Thanks for the link to the forum post, by the way – we forgot to update it and will do that now. -Dmitry From: cmake-developers [mailto:cmake-developers-boun...@cmake.orgmailto:cmake-developers-boun...@cmake.org] On Behalf Of Peter List Sent: Wednesday, August 26, 2015 5:06 AM To: cmake-developers@cmake.orgmailto:cmake-developers@cmake.org Subject: [cmake-developers] nvidia nsight tegra set vcxproj properties (Ant Build) in cmake file I have a working hello world cmake + built-in Android using nvidia nsight tegra. It uses SDL2. Unfortunately, after I run cmake I have to manually edit the following in my vcxproj to add SDL2: Configuration Properties Ant Build Native Library Directories, Native Library Dependencies I found this post ( http://bit.ly/1NTgTE3 ) from May 5th (3 months 20 days ago) describing the same issue. Is there an ETA on this? Since this isn't out yet, is there a work-around I can do instead? So far my best idea is to have cmake use add_custom_command() as a post-build step to call a python script that edits the vcxproj file XML. AntBuild AntBuildPath[path]\build-android\android-project/AntBuildPath AndroidManifestLocation[path]\build-android\android-project\AndroidManifest.xml/AndroidManifestLocation NativeLibDirectories../../../SDL2-2.0.3/libs/armeabi-v7a/NativeLibDirectories NativeLibDependenciesSDL2/NativeLibDependencies /AntBuild thank you 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] nvidia nsight tegra set vcxproj properties (Ant Build) in cmake file
Hi Peter, We’ll look into that and get back to you! -Dmitry From: Peter List [mailto:pem.l...@gmail.com] Sent: Friday, August 28, 2015 8:45 AM To: Dmitry Polyanitsa dpolyani...@nvidia.com Cc: cmake-developers@cmake.org Subject: Re: [cmake-developers] nvidia nsight tegra set vcxproj properties (Ant Build) in cmake file A related but different issue... I tried adding this to my CMakeLists.txt: set(CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES zzz) set(CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES yyy) But cmake 3.1.1 release does not add the expected properties to my vcxproj. In fact, the strings zzz and yyy are not found in my vcxproj file. So I tried a nightly build, but I got a different error - full text pasted below Looks like cmake is doing some sanity check by building a simple test program, but link fails with cannot find -l-Wl,-Bdynamic. Maybe cmake-3.3.20150826-g566f1-win32-x86 isn't ready yet? Btw I'm using AndroidWorks-1R2-win.exe + NVIDIA_Nsight_Tegra_Release_3.1.15202.6244.exe, so another guess is that maybe it's a compatibility issue... Like I have to use a particular version of nsight with a particular version of cmake thank you for any leads, Peter ... ... ... C:\Program Files (x86)\cmake-3.3.20150826-g566f1-win32-x86\bin\cmake -GVisual Studio 10 2010 -DCMAKE_SYSTEM_NAME=Android ..\pemDemos -- The C compiler identification is GNU 4.9.0 -- The CXX compiler identification is GNU 4.9.0 -- Check for working C compiler using: Visual Studio 10 2010 -- Check for working C compiler using: Visual Studio 10 2010 -- broken CMake Error at C:/Program Files (x86)/cmake-3.3.20150826-g566f1-win32-x86/share/cmake-3.3/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler C:/Programs/NVPACK/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc.exe is not able to compile a simple test program. It fails with the following output: Change Dir: H:/Pem_Code/grfxdemossdl2015/pemDemos/build-android-vs2010/CMakeFiles/CMakeTmp Run Build Command:C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe cmTC_84fb1.vcxproj /p:Configuration=Debug /p:VisualStudioVersion=10.0 Microsoft (R) Build Engine version 4.6.79.0 [Microsoft .NET Framework, version 4.0.30319.42000] Copyright (C) Microsoft Corporation. All rights reserved. Build started 8/28/2015 12:35:31 AM. Project H:\Pem_Code\grfxdemossdl2015\pemDemos\build-android-vs2010\CMakeFiles\CMakeTmp\cmTC_84fb1.vcxproj on node 1 (default targets). PrepareForBuild: Creating directory cmTC_84fb1.dir\Debug\. Creating directory H:\Pem_Code\grfxdemossdl2015\pemDemos\build-android-vs2010\CMakeFiles\CMakeTmp\Debug\. InitializeBuildStatus: Creating cmTC_84fb1.dir\Debug\cmTC_84fb1.unsuccessfulbuild because AlwaysCreate was specified. ClCompile: C:\Programs\NVPACK\android-ndk-r10e\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-g++.exe testCCompiler.c C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(991,5): warning MSB8012: TargetExt(.) does not match the Linker's OutputFile property value (). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). [H:\Pem_Code\grfxdemossdl2015\pemDemos\build-android-vs2010\CMakeFiles\CMakeTmp\cmTC_84fb1.vcxproj] Link: C:\Programs\NVPACK\android-ndk-r10e\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-g++.exe cmTC_84fb1.dir Debug/testCCompiler.o -Wl,-soname,cmTC_84fb1. -shared --sysroot=C:/Programs/NVPACK/android-ndk-r10e/platforms/android-9/arch-arm -Wl,-rpath-link=C:/ rograms/NVPACK/android-ndk-r10e/platforms/android-9/arch-arm/usr/lib -l-Wl,-Bdynamic -fuse-ld=bfd -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relr -Wl,-z,now -LC:/Programs/NVPACK/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9/arm 7-a -LC:/Programs/NVPACK/android-ndk-r10e/platforms/android-9/arch-arm/usr/lib -LC:/Programs/NVPACK/android-ndk-r10e/sources/cxx-stl/gnu-libstdc+ /4.9/libs/armeabi-v7a -LC:/Programs/NVPACK/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androide bi/4.9/armv7-a C:/Programs/NVPACK/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_static.a -lc -lm -llog -lgcc -oH:/ em_Code/grfxdemossdl2015/pemDemos/build-android-vs2010/CMakeFiles/CMakeTmp/Debug/cmTC_84fb1. c:/programs/nvpack/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../. /../arm-linux-androideabi/bin/ld.bfd.exe: cannot find -l-Wl,-Bdynamic collect2.exe : error : ld returned 1 exit status [H:\Pem_Code\grfxdemossdl2015\pemDemos\build-android-vs2010\CMakeFiles
Re: [cmake-developers] nvidia nsight tegra set vcxproj properties (Ant Build) in cmake file
Hi Peter, Note the commit Brad mentioned in another thread: VS: Add more Nsight Tegra generator Android property settings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c0afaf4 It adds the ability to set both Native Library Directories and Native Library Dependencies, among other things. Thanks for the link to the forum post, by the way – we forgot to update it and will do that now. -Dmitry From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] On Behalf Of Peter List Sent: Wednesday, August 26, 2015 5:06 AM To: cmake-developers@cmake.org Subject: [cmake-developers] nvidia nsight tegra set vcxproj properties (Ant Build) in cmake file I have a working hello world cmake + built-in Android using nvidia nsight tegra. It uses SDL2. Unfortunately, after I run cmake I have to manually edit the following in my vcxproj to add SDL2: Configuration Properties Ant Build Native Library Directories, Native Library Dependencies I found this post ( http://bit.ly/1NTgTE3 ) from May 5th (3 months 20 days ago) describing the same issue. Is there an ETA on this? Since this isn't out yet, is there a work-around I can do instead? So far my best idea is to have cmake use add_custom_command() as a post-build step to call a python script that edits the vcxproj file XML. AntBuild AntBuildPath[path]\build-android\android-project/AntBuildPath AndroidManifestLocation[path]\build-android\android-project\AndroidManifest.xml/AndroidManifestLocation NativeLibDirectories../../../SDL2-2.0.3/libs/armeabi-v7a/NativeLibDirectories NativeLibDependenciesSDL2/NativeLibDependencies /AntBuild thank you --- 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