From eike at sf-mail.de Sun Feb 1 04:18:35 2015 From: eike at sf-mail.de (Rolf Eike Beer) Date: Sun, 01 Feb 2015 10:18:35 +0100 Subject: [cmake-developers] New module: CheckFortranCompilerFlag.cmake In-Reply-To: References: Message-ID: <2368316.NGt5bHpFaX@eto> Nicolas Bock wrote: > Hi, > > please find attached for potential inclusion into CMake a new Module > that tests Fortran compiler flags. It is a modified copy of the > existing CheckCCompilerFlag.cmake module. Hi Nicolas, which version did you base this on? It looks like this is a version older than any 3.0.0-rc. Please take a look at the git version instead. Also I don't know if it makes sense to check for certain flags that look specific to C++. Which compilers did you use to test? Greetings, Eike -- -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From robert.maynard at kitware.com Mon Feb 2 09:56:26 2015 From: robert.maynard at kitware.com (Robert Maynard) Date: Mon, 2 Feb 2015 09:56:26 -0500 Subject: [cmake-developers] Fwd: [CMake] CPack in CMake 3.1.0 doesn't install files In-Reply-To: References: <52A2C443-8D57-4723-996E-CFBD9AAFC931@me.com> <3D148401-325C-4F20-BD97-82C8EF3F216B@me.com> <067991DF-9B20-4A01-B0DF-7E68D603B25B@me.com> Message-ID: Forwarding to CMake Developers as this looks to be bug. ---------- Forwarded message ---------- From: NoRulez Date: Mon, Feb 2, 2015 at 9:54 AM Subject: Re: [CMake] CPack in CMake 3.1.0 doesn't install files To: Robert Maynard Cc: CMake MailingList Hi, I think I found the problem: In the file cmLocalGenerator.cxx the pointer is always true since 3.1.0, which was a const char* in 3.0.2. and now it could point to an empty const std::string, but the pointer is still valid The if statement is: if(!default_config) And should be (line 411): if(!default_config || (default_config && strlen(default_config) == 0)) Best Regards > Am 23.01.2015 um 09:15 schrieb NoRulez : > > Hi, > > i've tested it also with 3.1.1 and the failure behaves the same. > > Best Regards > > >> Am 21.01.2015 um 10:00 schrieb NoRulez : >> >> Hi, >> >> it should also not work when you build a test project in release mode and then in the build directory type "cpack -G ZIP" for example. (Without the -C option) >> >> In the CTestScript is also added the -C option to ensure it uses the release mode, but it doesn't work either. >> >> When you then open the cmake_install.cmake files, you will see that the CMAKE_INSTALL_CONFIG_NAME variable is empty on line 15. >> >> In CMake 3.0.2 the variable is set with the value "Release". >> >> Best Regards >> >> >>> Am 20.01.2015 um 18:40 schrieb Robert Maynard : >>> >>> Hi, >>> >>> I haven't seen this issue but if you have a self-contained and reduced >>> (preferably plain CMake ) test case, I would be happy to run it and >>> verify if this is a regression. >>> >>>> On Tue, Jan 20, 2015 at 2:37 AM, NoRulez wrote: >>>> No one? >>>> >>>> Has something changed between 3.0.2 to 3.1.0 which prevents cpack to copy the generated *.exe file to the _CPack_Packages directory? Or did i need an additional variable to be set in 3.1.0? >>>> >>>> Thanks in advance >>>> >>>> Best Regards >>>> >>>> >>>>> Am 16.01.2015 um 12:09 schrieb NoRulez : >>>>> >>>>> If I switch back to 3.0.2 everything is working like a charm >>>>> >>>>> Best Regards >>>>> >>>>>> Am 15.01.2015 um 17:49 schrieb NoRulez : >>>>>> >>>>>> Hello, >>>>>> >>>>>> we have only upgraded to the last release 3.1.0 from 3.0.2 and get the following when cpack is executed in a CTestScript: >>>>>> >>>>>> error: fixup_bundle: not a valid bundle >>>>>> >>>>>> The files are ceated, but they are not copied to the _CPack_Packages folder >>>>>> >>>>>> Then I found out that the variable "CMAKE_INSTALL_CONFIG_NAME" is empty in the cmake_install.cmake files >>>>>> >>>>>> Any hints? >>>>>> >>>>>> Best Regards >>>>>> >>>>>> -- >>>>>> >>>>>> 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 >>>>> -- >>>>> >>>>> 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 >>>> -- >>>> >>>> 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 >> -- >> >> 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 > -- > > 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 From ben.boeckel at kitware.com Mon Feb 2 10:30:55 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 2 Feb 2015 10:30:55 -0500 Subject: [cmake-developers] Fwd: [CMake] CPack in CMake 3.1.0 doesn't install files In-Reply-To: References: <52A2C443-8D57-4723-996E-CFBD9AAFC931@me.com> <3D148401-325C-4F20-BD97-82C8EF3F216B@me.com> <067991DF-9B20-4A01-B0DF-7E68D603B25B@me.com> Message-ID: <20150202153055.GD7466@bronto-burt.dev.benboeckel.net> On Mon, Feb 02, 2015 at 09:56:26 -0500, Robert Maynard wrote: > Forwarding to CMake Developers as this looks to be bug. Oops, indeed. Pushing out a patch. --Ben From aleixpol at kde.org Mon Feb 2 11:36:19 2015 From: aleixpol at kde.org (Aleix Pol) Date: Mon, 2 Feb 2015 17:36:19 +0100 Subject: [cmake-developers] Extracting target metadata, IDE integration In-Reply-To: References: <54C65C0F.9090902@kitware.com> Message-ID: On Mon, Jan 26, 2015 at 9:15 PM, Tobias Hunger wrote: > I gave this patch a try with the cmake project data. > > I had hoped that this file would contain all the information an IDE > might need, but there seems quite a bit missing for that. E.g. there > is no information on which files are used to build a target. What am I > missing? > > Best Regards, > Tobias > > On Mon, Jan 26, 2015 at 4:23 PM, Brad King wrote: >> On 01/25/2015 08:26 AM, Tobias Hunger wrote: >>> I just had a bit of time to play with cmake this weekend: Is this >>> patch available somewhere by now? >> >> Aleix sent it in a message of this thread on 2015-01-09: >> >> http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10711/focus=12061 >> >> Some review comments elsewhere in this thread are still pending. >> >> -Brad >> It does provide them. For example [1]. Isn't that what you meant? Aleix [1] { "name": "kdevcmakebuilder", "type": "MODULE_LIBRARY", "configs": [ { "name": "debug", "sources": [ "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilder.cpp", "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakejob.cpp", "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/prunejob.cpp", "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilderpreferences.cpp", "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/ui_cmakebuildersettings.h", "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilderconfig.cpp", "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilderconfig.h", "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/kdevcmakebuilder_automoc.cpp", "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuildersettings.ui", "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilderconfig.kcfgc" ] } ], "directory": "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder", "location": "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/kdevcmakebuilder.so", "backtrace": ["/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/CMakeLists.txt:20"], "installed": true } From roman.wueger at gmx.at Mon Feb 2 11:44:54 2015 From: roman.wueger at gmx.at (=?UTF-8?Q?=22Roman_W=C3=BCger=22?=) Date: Mon, 2 Feb 2015 17:44:54 +0100 Subject: [cmake-developers] Fix for the default configuration for CMAKE_INSTALL_CONFIG_NAME Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Bugfix-Fix-default-config-for-CMAKE_INSTALL_CONFIG_N.patch Type: application/octet-stream Size: 1972 bytes Desc: not available URL: From roman.wueger at gmx.at Mon Feb 2 17:47:15 2015 From: roman.wueger at gmx.at (=?iso-8859-1?Q?Roman_W=FCger?=) Date: Mon, 2 Feb 2015 23:47:15 +0100 Subject: [cmake-developers] Commit 4c98de33: cmLocalGenerator: fix the default configuration check Message-ID: <2c1201d03f3a$315f5a10$941e0e30$@gmx.at> Hello Ben, I think the change is also required for the following line (line 424): if(!default_config && !configurationTypes.empty()) Because here the ?default_config? could also be a valid pointer with an empty content/string. Nevertheless I had already posted a working patch which uses a std::vector and std::string instead to prevent such pointer problems. Best Regards Roman -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Mon Feb 2 18:35:17 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 2 Feb 2015 18:35:17 -0500 Subject: [cmake-developers] Commit 4c98de33: cmLocalGenerator: fix the default configuration check In-Reply-To: <2c1201d03f3a$315f5a10$941e0e30$@gmx.at> References: <2c1201d03f3a$315f5a10$941e0e30$@gmx.at> Message-ID: <20150202233517.GA7391@bronto-burt.dev.benboeckel.net> On Mon, Feb 02, 2015 at 23:47:15 +0100, Roman W?ger wrote: > I think the change is also required for the following line (line 424): > > > > if(!default_config && !configurationTypes.empty()) > > > > Because here the ?default_config? could also be a valid pointer with an > empty content/string. > > Nevertheless I had already posted a working patch which uses a std::vector > and std::string instead to prevent such pointer problems. Yeah, your patch is better. I'll revert mine and put yours up. Do you have/want access to the stage to push it yourself? I can do so if not. http://www.cmake.org/Wiki/CMake/Git/Develop Thanks, --Ben P.S. Also, seems I hadn't switched this repo over to my Kitware email anyways for this commit. From mantis at public.kitware.com Tue Feb 3 05:04:15 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Tue, 3 Feb 2015 05:04:15 -0500 Subject: [cmake-developers] [CMake 0015385]: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT is set to CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT Message-ID: The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15385 ====================================================================== Reported By: Gunnar Roth Assigned To: ====================================================================== Project: CMake Issue ID: 15385 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-03 05:04 EST Last Modified: 2015-02-03 05:04 EST ====================================================================== Summary: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT is set to CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT Description: in windows-MSVC.cmake you can find set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT}) but that should probaly be set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT}) as it is also set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT}) ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-03 05:04 Gunnar Roth New Issue ====================================================================== From mantis at public.kitware.com Tue Feb 3 05:39:52 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Tue, 3 Feb 2015 05:39:52 -0500 Subject: [cmake-developers] [CMake 0015386]: FindOpenSSL.cmake fails to find new version (1.0.2) of OpenSSL Message-ID: <1ebb4b1c6f1ff107cbf9cb0389f420ec@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15386 ====================================================================== Reported By: Karl Tarbe Assigned To: ====================================================================== Project: CMake Issue ID: 15386 Category: (No Category) Reproducibility: always Severity: major Priority: urgent Status: new ====================================================================== Date Submitted: 2015-02-03 05:39 EST Last Modified: 2015-02-03 05:39 EST ====================================================================== Summary: FindOpenSSL.cmake fails to find new version (1.0.2) of OpenSSL Description: The version scheme changed, because of a major version upgrade of OpenSSL. I believe the regex in FindOpenSSL.cmake fails. CMake Error at /usr/share/cmake-3.0/Modules/FindOpenSSL.cmake:293 (list): list GET given empty list Call Stack (most recent call first): CMakeLists.txt:25 (FIND_PACKAGE) CMake Error at /usr/share/cmake-3.0/Modules/FindOpenSSL.cmake:294 (list): list GET given empty list Call Stack (most recent call first): CMakeLists.txt:25 (FIND_PACKAGE) CMake Error at /usr/share/cmake-3.0/Modules/FindOpenSSL.cmake:296 (list): list GET given empty list Call Stack (most recent call first): CMakeLists.txt:25 (FIND_PACKAGE) CMake Error at /usr/share/cmake-3.0/Modules/FindOpenSSL.cmake:298 (list): list GET given empty list Call Stack (most recent call first): CMakeLists.txt:25 (FIND_PACKAGE) Steps to Reproduce: Install OpenSSL 1.0.2 Use FIND_PACKAGE(OpenSSL REQUIRED) ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-03 05:39 Karl Tarbe New Issue ====================================================================== From mantis at public.kitware.com Tue Feb 3 07:01:17 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Tue, 3 Feb 2015 07:01:17 -0500 Subject: [cmake-developers] [CMake 0015387]: FindwxWidget.cmake can not find the wxWidgets framework installed by Mac Port Message-ID: <7542473dc14b9fab6be68ff7d0cb6b19@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15387 ====================================================================== Reported By: Fr?d?ric Wang Assigned To: ====================================================================== Project: CMake Issue ID: 15387 Category: Modules Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-03 07:01 EST Last Modified: 2015-02-03 07:01 EST ====================================================================== Summary: FindwxWidget.cmake can not find the wxWidgets framework installed by Mac Port Description: The problem is essentially the one described in this old post on https://forums.wxwidgets.org/viewtopic.php?f=19&t=38338 The Mac Port package installs a wxWidgets framework into /opt/local/Library/Frameworks/ but this one is not found by FindwxWidget.cmake. This might be related to http://www.cmake.org/Wiki/CMake:MacOSX_Frameworks ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-03 07:01 Fr?d?ric Wang New Issue ====================================================================== From nicolasbock at gmail.com Tue Feb 3 07:46:50 2015 From: nicolasbock at gmail.com (Nicolas Bock) Date: Tue, 3 Feb 2015 05:46:50 -0700 Subject: [cmake-developers] New module: CheckFortranCompilerFlag.cmake In-Reply-To: <2368316.NGt5bHpFaX@eto> References: <2368316.NGt5bHpFaX@eto> Message-ID: Hi Eike, please find attached a patch based on 460f7bcb7d11e905ee025c9d9cc9629d597fa91b. Thanks nick >From a843ca01581ab85a07c36700b2474c722e9917fb Mon Sep 17 00:00:00 2001 From: Nicolas Bock Date: Mon, 2 Feb 2015 17:07:04 -0700 Subject: [PATCH] New Module: CheckFortranCompilerFlags.cmake This module is based on the existing CheckCCompilerFlags.cmake. --- Modules/CheckFortranCompilerFlag.cmake | 65 ++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Modules/CheckFortranCompilerFlag.cmake diff --git a/Modules/CheckFortranCompilerFlag.cmake b/Modules/CheckFortranCompilerFlag.cmake new file mode 100644 index 0000000..08aed07 --- /dev/null +++ b/Modules/CheckFortranCompilerFlag.cmake @@ -0,0 +1,65 @@ +#.rst: +# CheckCCompilerFlag +# ------------------ +# +# Check whether the Fortran compiler supports a given flag. +# +# CHECK_Fortran_COMPILER_FLAG( ) +# +# :: +# +# - the compiler flag +# - variable to store the result +# Will be created as an internal cache variable. +# +# This internally calls the check_fortran_source_compiles macro and +# sets CMAKE_REQUIRED_DEFINITIONS to . See help for +# CheckFortranSourceCompiles for a listing of variables that can +# otherwise modify the build. The result only tells that the compiler +# does not give an error message when it encounters the flag. If the +# flag has any effect or even a specific one is beyond the scope of +# this module. + +#============================================================================= +# Copyright 2006-2011 Kitware, Inc. +# Copyright 2006 Alexander Neundorf +# Copyright 2011 Matthias Kretz +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +include(CheckFortranSourceCompiles) +include(CMakeCheckCompilerFlagCommonPatterns) + +macro (CHECK_Fortran_COMPILER_FLAG _FLAG _RESULT) + set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") + set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") + + # Normalize locale during test compilation. + set(_CheckFortranCompilerFlag_LOCALE_VARS LC_ALL LC_MESSAGES LANG) + foreach(v ${_CheckFortranCompilerFlag_LOCALE_VARS}) + set(_CheckFortranCompilerFlag_SAVED_${v} "$ENV{${v}}") + set(ENV{${v}} C) + endforeach() + CHECK_COMPILER_FLAG_COMMON_PATTERNS(_CheckFortranCompilerFlag_COMMON_PATTERNS) + CHECK_Fortran_SOURCE_COMPILES(" program test\n stop\n end program" ${_RESULT} + # Some compilers do not fail with a bad flag + FAIL_REGEX "command line option .* is valid for .* but not for C" # GNU + ${_CheckFortranCompilerFlag_COMMON_PATTERNS} + ) + foreach(v ${_CheckFortranCompilerFlag_LOCALE_VARS}) + set(ENV{${v}} ${_CheckFortranCompilerFlag_SAVED_${v}}) + unset(_CheckFortranCompilerFlag_SAVED_${v}) + endforeach() + unset(_CheckFortranCompilerFlag_LOCALE_VARS) + unset(_CheckFortranCompilerFlag_COMMON_PATTERNS) + + set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") +endmacro () -- 2.0.5 On Sun, Feb 1, 2015 at 2:18 AM, Rolf Eike Beer wrote: > Nicolas Bock wrote: >> Hi, >> >> please find attached for potential inclusion into CMake a new Module >> that tests Fortran compiler flags. It is a modified copy of the >> existing CheckCCompilerFlag.cmake module. > > Hi Nicolas, > > which version did you base this on? It looks like this is a version older than > any 3.0.0-rc. Please take a look at the git version instead. > > Also I don't know if it makes sense to check for certain flags that look > specific to C++. Which compilers did you use to test? > > Greetings, > > Eike > -- > -- > > 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 From opensguser at web.de Tue Feb 3 09:20:35 2015 From: opensguser at web.de (R.H.) Date: Tue, 3 Feb 2015 14:20:35 +0000 (UTC) Subject: [cmake-developers] [CMake 0014317]: Configuration dependent install EXPORT References: <51F6853E.5060908@kitware.com> Message-ID: Brad King writes: > > Steve, > > On 07/26/2013 04:43 AM, Mantis Bug Tracker wrote: > > http://www.cmake.org/Bug/view.php?id=14317 > > What do you think about adding generator expressions to install > DESTINATION options. In particular the $ genex > would be useful in this case. > > Thanks, > -Brad Generator expressions given to DESTINATION in the install() command unfortunately are still not supported as of 3.1.1, e.g. install( TARGETS mylib EXPORT mylib ARCHIVE DESTINATION "lib/$" ) Without this, I can't find any satisfiable solution installing archive and runtime files for multi-configuration projects (VS) using the export mechanism. Visual Studio users really suffer from this, as only one configuration can be used. Is there any chance this feature (genex) will be added? The ticket 0014317 (http://www.cmake.org/Bug/view.php?id=14317) is still open. From thefox at aspekt.fi Tue Feb 3 09:56:52 2015 From: thefox at aspekt.fi (thefox xofeht) Date: Tue, 3 Feb 2015 16:56:52 +0200 Subject: [cmake-developers] Generating Windows Phone project files Message-ID: Hi, I was trying to generate project files for Windows Phone 8, but hit a snag right away: " >cmake .. -G "Visual Studio 12 2013" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 CMake Error at CMakeLists.txt:5 (project): A Windows Phone component with CMake requires both the Windows Desktop SDK as well as the Windows Phone '8.0' SDK. Please make sure that you have both installed " I'm able to compile a project generated from a Windows Phone 8.0 DirectX App template, so I believe I should have all the necessary SDKs. I looked around in the CMake code for a bit, and noticed that it's looking for the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\WindowsPhone\v8.0". I don't have that. I do have "HKEY_CURRENT_USER\Software\Microsoft\Microsoft SDKs\WindowsPhone\v8.0", though. And both "v8.0" and "v8.1" directories are visible in the directory "C:\Program Files (x86)\Microsoft SDKs\Windows Phone". Using Windows 8.1, cmake version 3.1.20150114-gdb5583, Visual Studio 2013. Any ideas? -K From thefox at aspekt.fi Tue Feb 3 10:16:35 2015 From: thefox at aspekt.fi (thefox xofeht) Date: Tue, 3 Feb 2015 17:16:35 +0200 Subject: [cmake-developers] Generating Windows Phone project files In-Reply-To: References: Message-ID: On Tue, Feb 3, 2015 at 4:56 PM, thefox xofeht wrote: > I was trying to generate project files for Windows Phone 8, but hit a > snag right away: Well, as always, it helps to make a post like this since I realized now what the problem was. I had ran "cmake .. -G "Visual Studio 12 2013" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.0" in the same directory unsuccessfully, and that was affecting my later runs with CMAKE_SYSTEM_VERSION=8.1. Sorry for the noise. -K From jamesbigler at gmail.com Tue Feb 3 11:49:28 2015 From: jamesbigler at gmail.com (James Bigler) Date: Tue, 3 Feb 2015 09:49:28 -0700 Subject: [cmake-developers] CUDA as a compiler instead FindCUDA? In-Reply-To: References: <9F2CF081-470B-42E4-9DCE-CB67BA7D2DD0@java.pl> <54B9164D.5080507@kitware.com> Message-ID: On Sat, Jan 17, 2015 at 8:13 AM, Adam Strzelecki wrote: > 1. Support for dependency scanning. If I change a header included by > file.cu I want file.cu to be recompiled. This is easy for makefiles, > hard for anything else. > > > .cu is superset of C++ so it should be pretty easy to get dependency > scanning working same as for regular .cpp/.h files using CMake facilities. > > CMake doesn't support dependency scanning for Visual Studio. > 2. In the past there have been bugs with nvcc, such as leaving a partially > written output file during generation that failed, that FindCUDA has worked > around. > > > I don't see why we should care about that? If they still exist isn't it > what NVIDIA partner bug report site is for? > > It may not be my fault, but it's my problem. If I can correct for problems and help others not have to deal with those same problems, I'm going to do that. We all have to deal with imperfect tools, and not all of us can wait for 1-2 years for bugs to be fixed. > 3. Host flags generally need to be propagated to the CUDA flags (I'll > admit that this support in FindCUDA isn't perfect). > > > You mean user-defined preprocessor definitions or compiler flags? Host > compiler flags are picked up by nvcc from host compiler itself. Aside of > that, CMake will insert -D definitions as well to any extra compiler. > > So you may only want to wrap CMAKE_CXX_FLAGS into CMAKE_CUDACXX_FLAGS > using -Xcompiler which can be tricky, but I believe we can workaround that > somehow. > > 4. How do you support other targets besides cubin (obj), such as PTX? > > > For what purpose? Debugging? > > CUDA supports two usage APIs. The runtime API that is used when you compile your code to object files, and the driver API that compiles to PTX or CUBIN and then loads that code into the driver directly. FindCUDA supports both. > 5. How would separable compilation work? Especially since you can't > easily replace the linker. > > > Correct me if I am wrong, but we will still use platform linker. > > You can't use the platform linker for separable compilation unless you also produce intermediate linkage files. In order to produce intermediate linkage files you need all the object files compiled with separable linking to be run through another tool that produces this intermedate link file that will also need to be linked into the executable module. > 6. If you support PTX, can you use the output as input for other custom > commands (I like to encode the PTX into strings compiled into C++ files > using bin2c from CUDA). > > > Again can you please elaborate more why would you like to handle PTX > yourself if CUDA does it for you, i.e.: > > nvcc -arch sm_30 -> makes .o contain native device code > nvcc -arch compute_30 -> makes .o contain ptx code compiled later by the > driver itself > > This sounds like some custom behavior. > See my comment above regarding the driver versus runtime CUDA API. Yes it is different behavior, but I was able to accommodate both compilation models with the same tool. I would love for what you propose to work for both compilation modes, so if it is possible I would like to design it in. Otherwise it can't be a complete replacement for FindCUDA. James -------------- next part -------------- An HTML attachment was scrubbed... URL: From mantis at public.kitware.com Tue Feb 3 12:55:19 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Tue, 3 Feb 2015 12:55:19 -0500 Subject: [cmake-developers] [CMake 0015388]: CTEST_GIT_UPDATE_CUSTOM is not handled by CTest.cmake Message-ID: The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15388 ====================================================================== Reported By: Martin Beaudoin Assigned To: ====================================================================== Project: CMake Issue ID: 15388 Category: CMake Reproducibility: always Severity: tweak Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-03 12:55 EST Last Modified: 2015-02-03 12:55 EST ====================================================================== Summary: CTEST_GIT_UPDATE_CUSTOM is not handled by CTest.cmake Description: It would be nice to be able to use the option CTEST_GIT_UPDATE_CUSTOM from a CMakeLists.txt file. Right now, only the GIT_UPDATE_OPTIONS option is handled by the module CTest.cmake. The option CTEST_GIT_UPDATE_CUSTOM is basically ignored by the module CTest.cmake. So one has to modify the DartConfiguration.tcl directly in order to specify a GITUpdateCustom entry prior to invoke "make Nightly" or "make NightlyUpdate". I am willing to work on/contribute a patch if you are interested by this useful tweak. Additional Information: The syntax one has to specify for the CTEST_GIT_UPDATE_CUSTOM option is also a bit peculiar. My "Custom GIT Update" command is simply : "/usr/bin/git merge origin/master" Still, here is the syntax one will need to use to set the proper value for GITUpdateCustom in the DartConfiguration.tcl: /usr/bin/git;merge;origin/master I don't mind this compact syntax which is probably necessary in order to supply a multi-token entry that will be recognized for the key/value syntax of the DartConfiguration.tcl file. But if this information is ever taken from a CMakeLists.txt file, it would be nice to support at this higher level a user-friendly syntax like this: SET(CTEST_GIT_UPDATE_CUSTOM "/usr/bin/git merge origin/master" ....) ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-03 12:55 Martin BeaudoinNew Issue ====================================================================== From brad.king at kitware.com Tue Feb 3 13:23:35 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 03 Feb 2015 13:23:35 -0500 Subject: [cmake-developers] Fix for the default configuration for CMAKE_INSTALL_CONFIG_NAME In-Reply-To: References: Message-ID: <54D11227.4040906@kitware.com> On 02/02/2015 11:44 AM, "Roman W?ger" wrote: > Attached is a patch to fix this issue. Thanks. Inspired by that Ben produced: install: Fix regression in default configuration selection http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dea42d92 Thanks, -Brad From brad.king at kitware.com Tue Feb 3 14:59:58 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 03 Feb 2015 14:59:58 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> Message-ID: <54D128BE.9030109@kitware.com> On 01/28/2015 09:21 AM, Raffi Enficiaud wrote: > I am wondering why I haven't zipped the patch before. > > Please find attached the patch addressing the issues you raised. The reason it was so big is because you sent an entire patch series containing your local development history. Instead please squash everything down to a single commit so "git format-patch" generates a patch with only one commit. I did this locally and produced the attached patch from your changes, rebased on master as of commit aec11372. You could start a new branch from there, "git am" the attached patch, edit files, use "git commit --amend" to update it, and then "git format-patch" to send it back. Please revise the commit message to summarize all the work done by these changes. In order to make the tests available only when enabled explicitly on a machine with Matlab installed, please revise the test cases to use the pattern used for FindJsonCpp. Look for code refering to CMake_TEST_FindJsonCpp for an example. The same check can be used in the RunCMake directory too. Use -DCMake_TEST_FindMatlab=1 on the CMake command line locally to get the tests enabled for you. Later we will expect you to run nightly testing for this since our dashboard machines do not have Matlab. Also, please rename: Tests/Module/Matlab2/ => Tests/FindMatlab/ Tests/RunCMake/Matlab2/ => Tests/RunCMake/FindMatlab/ Thanks, -Brad -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-FindMatlab-Rewrite-module-and-provide-a-usage-API.patch Type: text/x-diff Size: 66876 bytes Desc: not available URL: From brad.king at kitware.com Tue Feb 3 15:04:51 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 03 Feb 2015 15:04:51 -0500 Subject: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support In-Reply-To: References: <0543633b28c7431f93808182fc1e26e1@CO1PR07MB208.namprd07.prod.outlook.com> <543D2BBC.1010306@kitware.com> <0b5b33c4d1f0472782e260f9e5bce980@CO1PR07MB208.namprd07.prod.outlook.com> <544E4C9F.3050408@kitware.com> <64abd7ba273245b686146aa67acb7e8a@DM2PR0701MB1020.namprd07.prod.outlook.com> <545A7C44.6040305@kitware.com> <5474E132.2010705@kitware.com> Message-ID: <54D129E3.60101@kitware.com> On 01/28/2015 10:51 PM, Geoffrey Viola wrote: > I submitted some builds. > I'm not sure why 9 fail. Okay, let's get your builds submitting cleanly with no local changes first. That way we can identify whether any of your changes cause the failures. There are basic instructions for setting up a nightly build here: http://www.cmake.org/Wiki/CMake/Git/Dashboard You can use Windows Task Scheduler to run a .bat file that calls ctest with the dashboard script. Once we get your submission to a clean state then we can continue looking at the changes for the new generator and whether they cause any failures. Thanks, -Brad From brad.king at kitware.com Tue Feb 3 15:08:32 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 03 Feb 2015 15:08:32 -0500 Subject: [cmake-developers] Windows Store generated solution also containing win32 console app? In-Reply-To: References: <54C7CE23.6010707@kitware.com> <54C92876.3030001@kitware.com> <54C92C97.9060703@kitware.com> <54C933E6.6010605@kitware.com> <54CAAA0D.8040105@kitware.com> <54CAB002.6060301@kitware.com> Message-ID: <54D12AC0.8060903@kitware.com> On 01/29/2015 06:11 PM, Gilles Khouzam wrote: > For applications you might not need the VS_WINRT_COMPONENT, but for > libraries setting it vs not does have some differences. Thanks, Gilles. Robert, I think this means my suggestion of trying to re-use VS_WINRT_COMPONENT for this was a bad idea. Let's return to your original suggestion of a separate option. The proper name for the option may depend on the discussion below. Of course it needs to be an error to enable both the new option and VS_WINRT_COMPONENT in the same target. On 01/27/2015 02:58 PM, Robert Goulet wrote: > the generator is essentially the same for both Win32 and WinRT Is this true for only Store, or might all this work for Phone too? Thanks, -Brad From brad.king at kitware.com Tue Feb 3 15:11:38 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 03 Feb 2015 15:11:38 -0500 Subject: [cmake-developers] msbuild VisualStudioEdition value (was: Fix for Windows Store warning APPX1901...) In-Reply-To: References: <54CA9077.6000902@kitware.com> Message-ID: <54D12B7A.6090202@kitware.com> On 01/30/2015 10:35 AM, Robert Goulet wrote: > makeCommand.push_back(std::string("/p:VisualStudioVersion=")+ > this->GetIDEVersion()); > + > + // Normally this is only needed for Windows Store/Phone apps when building from command-line. > + // Fixes warning APPX2102: : File 'VisualStudioEdition' is not found or is not an executable file. > + makeCommand.push_back(std::string("/p:VisualStudioEdition=\"")+ > + this->GetName()+ > + std::string("\"")); Something like this may work, but the generator name will not always be a valid value for VisualStudioEdition. Somehow we have to look up a correct value based on the current generator and what is installed on the system. Gilles, might you be able to help with this? Thanks, -Brad From brad.king at kitware.com Tue Feb 3 15:18:06 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 03 Feb 2015 15:18:06 -0500 Subject: [cmake-developers] New module: CheckFortranCompilerFlag.cmake In-Reply-To: References: <2368316.NGt5bHpFaX@eto> Message-ID: <54D12CFE.8060408@kitware.com> On 02/03/2015 07:46 AM, Nicolas Bock wrote: > please find attached a patch based on 460f7bcb7d11e905ee025c9d9cc9629d597fa91b. Thanks. Was this based on CheckCCompilerFlag from that version too? On 02/01/2015 04:18 AM, Rolf Eike Beer wrote: > Also I don't know if it makes sense to check for certain flags that look > specific to C++. Which compilers did you use to test? Agreed. Do you have example failure messages from any compilers? Local testing of GNU Fortran 4.9 shows that bad flags are rejected with an error. Do we need the pattern matches for any Fortran compilers? > + # Some compilers do not fail with a bad flag > + FAIL_REGEX "command line option .* is valid for .* but not for C" # GNU > + ${_CheckFortranCompilerFlag_COMMON_PATTERNS} Certainly the "but not for C" message will not show up from a Fortran compiler. Thanks, -Brad From nicolasbock at gmail.com Tue Feb 3 15:21:45 2015 From: nicolasbock at gmail.com (Nicolas Bock) Date: Tue, 3 Feb 2015 13:21:45 -0700 Subject: [cmake-developers] New module: CheckFortranCompilerFlag.cmake In-Reply-To: <54D12CFE.8060408@kitware.com> References: <2368316.NGt5bHpFaX@eto> <54D12CFE.8060408@kitware.com> Message-ID: On Tue, Feb 3, 2015 at 1:18 PM, Brad King wrote: > On 02/03/2015 07:46 AM, Nicolas Bock wrote: >> please find attached a patch based on 460f7bcb7d11e905ee025c9d9cc9629d597fa91b. > > Thanks. Was this based on CheckCCompilerFlag from that version too? > Yes. > On 02/01/2015 04:18 AM, Rolf Eike Beer wrote: >> Also I don't know if it makes sense to check for certain flags that look >> specific to C++. Which compilers did you use to test? > > Agreed. Do you have example failure messages from any compilers? > I will collect some. > Local testing of GNU Fortran 4.9 shows that bad flags are rejected with > an error. Do we need the pattern matches for any Fortran compilers? I have tested with gcc and Intel (ifort). Ifort gives out warnings for illegal flags, stating that it will ignore them. In my (very basic) testing the warning lead to test failure of the module, i.e.. it lead to the correct behavior. I have access to PGI and possibly NAG's compilers as well and will test whether error messages are caught. > >> + # Some compilers do not fail with a bad flag >> + FAIL_REGEX "command line option .* is valid for .* but not for C" # GNU >> + ${_CheckFortranCompilerFlag_COMMON_PATTERNS} > > Certainly the "but not for C" message will not show up from a > Fortran compiler. > Oops, yes good point. > Thanks, > -Brad > From stillcompiling at gmail.com Tue Feb 3 17:04:01 2015 From: stillcompiling at gmail.com (Joshua Clayton) Date: Tue, 3 Feb 2015 14:04:01 -0800 Subject: [cmake-developers] [PATCH] CPackRPM: Fix cross-building rpms Message-ID: <1423001041-20554-1-git-send-email-stillcompiling@gmail.com> Add the --target argument to rpmbuild Do not add a BuildArch variable to the spec file for arch specific packages BuildArch causes rpm building to fail except for "noarch" packages --- Modules/CPackRPM.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 43e3fe0..b9d7381 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -615,7 +615,14 @@ endif() string(REPLACE "-" "_" CPACK_RPM_PACKAGE_VERSION ${CPACK_RPM_PACKAGE_VERSION}) # CPACK_RPM_PACKAGE_ARCHITECTURE (optional) -if(CPACK_RPM_PACKAGE_ARCHITECTURE) +if(NOT CPACK_RPM_PACKAGE_ARCHITECTURE) + execute_process(COMMAND uname "-m" + WORKING_DIRECTORY "${WDIR}" + OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE) +endif() +set(TMP_CPACK_RPM_TARGET "--target" "${CPACK_RPM_PACKAGE_ARCHITECTURE}") + +if (CPACK_RPM_PACKAGE_ARCHITECTURE STREQUAL "noarch") set(TMP_RPM_BUILDARCH "Buildarch: ${CPACK_RPM_PACKAGE_ARCHITECTURE}") if(CPACK_RPM_PACKAGE_DEBUG) message("CPackRPM:Debug: using user-specified build arch = ${CPACK_RPM_PACKAGE_ARCHITECTURE}") @@ -1277,6 +1284,7 @@ if(RPMBUILD_EXECUTABLE) COMMAND "${RPMBUILD_EXECUTABLE}" -bb --define "_topdir ${CPACK_RPM_DIRECTORY}" --buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" + ${TMP_CPACK_RPM_TARGET} "${CPACK_RPM_BINARY_SPECFILE}" WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" RESULT_VARIABLE CPACK_RPMBUILD_EXEC_RESULT -- 2.1.0 From raffi.enficiaud at free.fr Tue Feb 3 18:21:58 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Wed, 4 Feb 2015 00:21:58 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54D128BE.9030109@kitware.com> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> Message-ID: Dear Brad, Thanks for the feedback. I will implement your suggestions. I suppose there is some documentation on how to set up a night test server, but I could not find any. Would you please help me with this? Regards, Raffi Enficiaud > On 03 Feb 2015, at 20:59, Brad King wrote: > > In order to make the tests available only when enabled explicitly > on a machine with Matlab installed, please revise the test cases > to use the pattern used for FindJsonCpp. Look for code refering > to CMake_TEST_FindJsonCpp for an example. The same check can be > used in the RunCMake directory too. Use -DCMake_TEST_FindMatlab=1 > on the CMake command line locally to get the tests enabled for you. > Later we will expect you to run nightly testing for this since our > dashboard machines do not have Matlab. > > Also, please rename: > > Tests/Module/Matlab2/ => Tests/FindMatlab/ > Tests/RunCMake/Matlab2/ => Tests/RunCMake/FindMatlab/ > > Thanks, > -Brad > > <0001-FindMatlab-Rewrite-module-and-provide-a-usage-API.patch> From Gilles.Khouzam at microsoft.com Tue Feb 3 19:09:15 2015 From: Gilles.Khouzam at microsoft.com (Gilles Khouzam) Date: Wed, 4 Feb 2015 00:09:15 +0000 Subject: [cmake-developers] Windows Store generated solution also containing win32 console app? In-Reply-To: <54D12AC0.8060903@kitware.com> References: <54C7CE23.6010707@kitware.com> <54C92876.3030001@kitware.com> <54C92C97.9060703@kitware.com> <54C933E6.6010605@kitware.com> <54CAAA0D.8040105@kitware.com> <54CAB002.6060301@kitware.com> <54D12AC0.8060903@kitware.com> Message-ID: Hi Robert, I'm a little confused at how your scenario would work for the ARM architecture? If you're building a non-WinRT console app for the solution that needs to run, this is fine on x86, but how is that handled on ARM? It would not be built (since you can't really run it anyway) and it would not be able to run on the build machine since it would be the wrong architecture. If this is to be supported long term, it might make more sense to have a new target that is based on the build environment and not the target environment. -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Tuesday, February 3, 2015 12:09 To: Gilles Khouzam; Robert Goulet Cc: cmake-developers at cmake.org Subject: Re: [cmake-developers] Windows Store generated solution also containing win32 console app? On 01/29/2015 06:11 PM, Gilles Khouzam wrote: > For applications you might not need the VS_WINRT_COMPONENT, but for > libraries setting it vs not does have some differences. Thanks, Gilles. Robert, I think this means my suggestion of trying to re-use VS_WINRT_COMPONENT for this was a bad idea. Let's return to your original suggestion of a separate option. The proper name for the option may depend on the discussion below. Of course it needs to be an error to enable both the new option and VS_WINRT_COMPONENT in the same target. On 01/27/2015 02:58 PM, Robert Goulet wrote: > the generator is essentially the same for both Win32 and WinRT Is this true for only Store, or might all this work for Phone too? Thanks, -Brad From eike at sf-mail.de Wed Feb 4 02:30:08 2015 From: eike at sf-mail.de (Rolf Eike Beer) Date: Wed, 04 Feb 2015 08:30:08 +0100 Subject: [cmake-developers] [PATCH] CPackRPM: Fix cross-building rpms In-Reply-To: <1423001041-20554-1-git-send-email-stillcompiling@gmail.com> References: <1423001041-20554-1-git-send-email-stillcompiling@gmail.com> Message-ID: <1818436.NyXrZ0ArmH@caliban.sf-tec.de> > # CPACK_RPM_PACKAGE_ARCHITECTURE (optional) > -if(CPACK_RPM_PACKAGE_ARCHITECTURE) > +if(NOT CPACK_RPM_PACKAGE_ARCHITECTURE) > + execute_process(COMMAND uname "-m" > + WORKING_DIRECTORY "${WDIR}" > + OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE) > +endif() You don't need to specify a working directory for uname. Also I assume that you want to use OUTPUT_STRIP_TRAILING_WHITESPACE to not have the trailing newline in the variable. Greetings, Eike -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From domen.vrankar at gmail.com Wed Feb 4 02:50:31 2015 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Wed, 4 Feb 2015 08:50:31 +0100 Subject: [cmake-developers] [PATCH] CPackRPM: Fix cross-building rpms In-Reply-To: <1423001041-20554-1-git-send-email-stillcompiling@gmail.com> References: <1423001041-20554-1-git-send-email-stillcompiling@gmail.com> Message-ID: > Add the --target argument to rpmbuild > Do not add a BuildArch variable to the spec file for arch specific packages > BuildArch causes rpm building to fail except for "noarch" packages I'm not too familiar with cross compilation problems so could you please also provide a simple test case to help with patch review? Thanks, Domen From nicolasbock at gmail.com Wed Feb 4 08:21:04 2015 From: nicolasbock at gmail.com (Nicolas Bock) Date: Wed, 4 Feb 2015 06:21:04 -0700 Subject: [cmake-developers] New module: CheckFortranCompilerFlag.cmake In-Reply-To: References: <2368316.NGt5bHpFaX@eto> <54D12CFE.8060408@kitware.com> Message-ID: I have modified the patch and added error messages for NAG and PGI compilers. I have also fixed the FAIL_REGEX in the module itself to read "not for Fortran" instead of "... for C". >From 452602f4b125eb89c114d9e1b3db6ee78b04d0b1 Mon Sep 17 00:00:00 2001 From: Nicolas Bock Date: Mon, 2 Feb 2015 17:07:04 -0700 Subject: [PATCH] New Module: CheckFortranCompilerFlags.cmake This module is based on the existing CheckCCompilerFlags.cmake. --- Modules/CMakeCheckCompilerFlagCommonPatterns.cmake | 5 +- Modules/CheckFortranCompilerFlag.cmake | 65 ++++++++++++++++++++++ 2 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 Modules/CheckFortranCompilerFlag.cmake diff --git a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake index 19b2bbc..3141d60 100644 --- a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake +++ b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake @@ -21,9 +21,9 @@ macro (CHECK_COMPILER_FLAG_COMMON_PATTERNS _VAR) set(${_VAR} - FAIL_REGEX "unrecognized .*option" # GNU + FAIL_REGEX "[Uu]nrecogni[sz]ed .*option" # GNU, NAG FAIL_REGEX "unknown .*option" # Clang - FAIL_REGEX "ignoring unknown option" # MSVC + FAIL_REGEX "ignoring unknown option" # MSVC, Intel FAIL_REGEX "warning D9002" # MSVC, any lang FAIL_REGEX "option.*not supported" # Intel FAIL_REGEX "invalid argument .*option" # Intel @@ -35,6 +35,7 @@ macro (CHECK_COMPILER_FLAG_COMMON_PATTERNS _VAR) FAIL_REGEX "command option .* contains an incorrect subargument" # XL FAIL_REGEX "not supported in this configuration. ignored" # AIX FAIL_REGEX "File with unknown suffix passed to linker" # PGI + FAIL_REGEX "[Uu]nknown switch" # PGI FAIL_REGEX "WARNING: unknown flag:" # Open64 FAIL_REGEX "Incorrect command line option:" # Borland FAIL_REGEX "Warning: illegal option" # SunStudio 12 diff --git a/Modules/CheckFortranCompilerFlag.cmake b/Modules/CheckFortranCompilerFlag.cmake new file mode 100644 index 0000000..479ff9f --- /dev/null +++ b/Modules/CheckFortranCompilerFlag.cmake @@ -0,0 +1,65 @@ +#.rst: +# CheckCCompilerFlag +# ------------------ +# +# Check whether the Fortran compiler supports a given flag. +# +# CHECK_Fortran_COMPILER_FLAG( ) +# +# :: +# +# - the compiler flag +# - variable to store the result +# Will be created as an internal cache variable. +# +# This internally calls the check_fortran_source_compiles macro and +# sets CMAKE_REQUIRED_DEFINITIONS to . See help for +# CheckFortranSourceCompiles for a listing of variables that can +# otherwise modify the build. The result only tells that the compiler +# does not give an error message when it encounters the flag. If the +# flag has any effect or even a specific one is beyond the scope of +# this module. + +#============================================================================= +# Copyright 2006-2011 Kitware, Inc. +# Copyright 2006 Alexander Neundorf +# Copyright 2011 Matthias Kretz +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +include(CheckFortranSourceCompiles) +include(CMakeCheckCompilerFlagCommonPatterns) + +macro (CHECK_Fortran_COMPILER_FLAG _FLAG _RESULT) + set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") + set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") + + # Normalize locale during test compilation. + set(_CheckFortranCompilerFlag_LOCALE_VARS LC_ALL LC_MESSAGES LANG) + foreach(v ${_CheckFortranCompilerFlag_LOCALE_VARS}) + set(_CheckFortranCompilerFlag_SAVED_${v} "$ENV{${v}}") + set(ENV{${v}} C) + endforeach() + CHECK_COMPILER_FLAG_COMMON_PATTERNS(_CheckFortranCompilerFlag_COMMON_PATTERNS) + CHECK_Fortran_SOURCE_COMPILES(" program test\n stop\n end program" ${_RESULT} + # Some compilers do not fail with a bad flag + FAIL_REGEX "command line option .* is valid for .* but not for Fortran" # GNU + ${_CheckFortranCompilerFlag_COMMON_PATTERNS} + ) + foreach(v ${_CheckFortranCompilerFlag_LOCALE_VARS}) + set(ENV{${v}} ${_CheckFortranCompilerFlag_SAVED_${v}}) + unset(_CheckFortranCompilerFlag_SAVED_${v}) + endforeach() + unset(_CheckFortranCompilerFlag_LOCALE_VARS) + unset(_CheckFortranCompilerFlag_COMMON_PATTERNS) + + set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") +endmacro () -- 2.0.5 On Tue, Feb 3, 2015 at 1:21 PM, Nicolas Bock wrote: > On Tue, Feb 3, 2015 at 1:18 PM, Brad King wrote: >> On 02/03/2015 07:46 AM, Nicolas Bock wrote: >>> please find attached a patch based on 460f7bcb7d11e905ee025c9d9cc9629d597fa91b. >> >> Thanks. Was this based on CheckCCompilerFlag from that version too? >> > Yes. > >> On 02/01/2015 04:18 AM, Rolf Eike Beer wrote: >>> Also I don't know if it makes sense to check for certain flags that look >>> specific to C++. Which compilers did you use to test? >> >> Agreed. Do you have example failure messages from any compilers? >> > I will collect some. > >> Local testing of GNU Fortran 4.9 shows that bad flags are rejected with >> an error. Do we need the pattern matches for any Fortran compilers? > I have tested with gcc and Intel (ifort). Ifort gives out warnings for > illegal flags, stating that it will ignore them. In my (very basic) > testing the warning lead to test failure of the module, i.e.. it lead > to the correct behavior. I have access to PGI and possibly NAG's > compilers as well and will test whether error messages are caught. > >> >>> + # Some compilers do not fail with a bad flag >>> + FAIL_REGEX "command line option .* is valid for .* but not for C" # GNU >>> + ${_CheckFortranCompilerFlag_COMMON_PATTERNS} >> >> Certainly the "but not for C" message will not show up from a >> Fortran compiler. >> > Oops, yes good point. > >> Thanks, >> -Brad >> From brad.king at kitware.com Wed Feb 4 08:46:12 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 04 Feb 2015 08:46:12 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> Message-ID: <54D222A4.7090500@kitware.com> On 02/03/2015 06:21 PM, Raffi Enficiaud wrote: > I suppose there is some documentation on how to set up a night test server Oops, I forgot to include the link. Here: http://www.cmake.org/Wiki/CMake/Git/Dashboard Use Windows Task Scheduler to run a .bat script that runs ctest on the dashboard script you create. Thanks, -Brad From mantis at public.kitware.com Wed Feb 4 10:20:30 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Wed, 4 Feb 2015 10:20:30 -0500 Subject: [cmake-developers] [CMake 0015389]: file GENERATE does not support generator expression for paramter INPUT Message-ID: The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15389 ====================================================================== Reported By: Sascha Kratky Assigned To: ====================================================================== Project: CMake Issue ID: 15389 Category: CMake Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-04 10:20 EST Last Modified: 2015-02-04 10:20 EST ====================================================================== Summary: file GENERATE does not support generator expression for paramter INPUT Description: The documentation of the file GENERATE command states that the , and parameters may also contain generator expressions. This is incorrect. Only the and may contain generator expressions. See cmFileCommand.cxx:3402. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-04 10:20 Sascha Kratky New Issue ====================================================================== From Robert.Goulet at autodesk.com Wed Feb 4 10:24:41 2015 From: Robert.Goulet at autodesk.com (Robert Goulet) Date: Wed, 4 Feb 2015 15:24:41 +0000 Subject: [cmake-developers] Windows Store generated solution also containing win32 console app? In-Reply-To: References: <54C7CE23.6010707@kitware.com> <54C92876.3030001@kitware.com> <54C92C97.9060703@kitware.com> <54C933E6.6010605@kitware.com> <54CAAA0D.8040105@kitware.com> <54CAB002.6060301@kitware.com> <54D12AC0.8060903@kitware.com> Message-ID: Hi Gilles, Turns out we do not support ARM. And that is true, that wouldn't work if we were to support ARM. And also I found an issue with this setup on x86/x64 : the Store menu doesn't appear in Visual Studio if a windows console application is part of the solution, even if I correctly select the windows store app as the current selected project before looking for this menu. Looks like this won't work and it's too much of an hack. I guess I have no choice but to compile this windows console project outside of the main project. Thanks! -----Original Message----- From: Gilles Khouzam [mailto:Gilles.Khouzam at microsoft.com] Sent: Tuesday, February 3, 2015 7:09 PM To: 'Brad King'; Robert Goulet Cc: cmake-developers at cmake.org Subject: RE: [cmake-developers] Windows Store generated solution also containing win32 console app? Hi Robert, I'm a little confused at how your scenario would work for the ARM architecture? If you're building a non-WinRT console app for the solution that needs to run, this is fine on x86, but how is that handled on ARM? It would not be built (since you can't really run it anyway) and it would not be able to run on the build machine since it would be the wrong architecture. If this is to be supported long term, it might make more sense to have a new target that is based on the build environment and not the target environment. -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Tuesday, February 3, 2015 12:09 To: Gilles Khouzam; Robert Goulet Cc: cmake-developers at cmake.org Subject: Re: [cmake-developers] Windows Store generated solution also containing win32 console app? On 01/29/2015 06:11 PM, Gilles Khouzam wrote: > For applications you might not need the VS_WINRT_COMPONENT, but for > libraries setting it vs not does have some differences. Thanks, Gilles. Robert, I think this means my suggestion of trying to re-use VS_WINRT_COMPONENT for this was a bad idea. Let's return to your original suggestion of a separate option. The proper name for the option may depend on the discussion below. Of course it needs to be an error to enable both the new option and VS_WINRT_COMPONENT in the same target. On 01/27/2015 02:58 PM, Robert Goulet wrote: > the generator is essentially the same for both Win32 and WinRT Is this true for only Store, or might all this work for Phone too? Thanks, -Brad From pa at letnes.com Thu Feb 5 04:54:03 2015 From: pa at letnes.com (Paul Anton Letnes) Date: Thu, 05 Feb 2015 09:54:03 GMT Subject: [cmake-developers] Feature request in CMake-gui: "Open project file" button Message-ID: <1423130043469.84365.13292@webmail5> Hi! I sometimes dream of a tiny, but time-saving feature: Next to "configure" and "generate", I'd want an "open project" button (for VS/Eclipse/XCode or other IDE projects). Cheers ----------- Paul Anton -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Thu Feb 5 10:15:06 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 05 Feb 2015 10:15:06 -0500 Subject: [cmake-developers] CMake 3.2 feature freeze on 2015-02-02 In-Reply-To: <54C66E52.9060504@kitware.com> References: <5498373B.9070308@kitware.com> <54C66E52.9060504@kitware.com> Message-ID: <54D388FA.9000403@kitware.com> On 01/26/2015 11:41 AM, Brad King wrote: > In preparation for this freeze to 'master' next week, I'm now freezing > 'next' to new features. I've branched 'release' for 3.2. The repository is now open for post-3.2 development. Please rebase any open topics on 'master' before merging to 'next'. -Brad From robert.maynard at kitware.com Thu Feb 5 10:34:50 2015 From: robert.maynard at kitware.com (Robert Maynard) Date: Thu, 5 Feb 2015 10:34:50 -0500 Subject: [cmake-developers] [ANNOUNCE] CMake 3.1.2 Released Message-ID: We are pleased to announce that CMake 3.1.2 is now available for download. Please use the latest release from our download page: http://www.cmake.org/download/ Thanks for your support! ------------------------------------------------------------------------- Changes in 3.1.2 since 3.1.1: Ben Boeckel (1): install: Fix regression in default configuration selection Bill Hoffman (1): CPack: Fix packaging of source tarballs with symbolic links Brad King (5): KWSys Directory: Check opendir return value before using it (#15367) Help: Clarify status of link_libraries command Normalize OBJECT_DEPENDS paths to match custom commands (#15366) MSVC: Fix initialization of RelWithDebInfo shared library link flags (#15385) CMake 3.1.2 Christoph Gr?ninger (1): FeatureSummary: Fix bracket in documentation. Guillaume Belz (1): FindOpenSSL: fix detection of OpenSSL 1.0.2 Marco Nolden (1): ctest_build: Update GNU make error message matching (#15379) From brad.king at kitware.com Thu Feb 5 11:23:06 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 05 Feb 2015 11:23:06 -0500 Subject: [cmake-developers] New module: CheckFortranCompilerFlag.cmake In-Reply-To: References: <2368316.NGt5bHpFaX@eto> <54D12CFE.8060408@kitware.com> Message-ID: <54D398EA.2020905@kitware.com> On 02/04/2015 08:21 AM, Nicolas Bock wrote: > I have modified the patch and added error messages for NAG and PGI > compilers. I have also fixed the FAIL_REGEX in the module itself to > read "not for Fortran" instead of "... for C". Thanks. I've drafted commits to add the module and a test case: CheckFortranCompilerFlag: Add module to check Fortran flag existence http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=393a45e2 CheckFortranCompilerFlag: Add test case http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54e900ab It was too late in the 3.2 preparation process to add this, so the commits are based on post-3.2 development. This will give us more time to get the module tested everywhere and to get feedback from early adopters that build from source or use nightly binaries. -Brad From nicolasbock at gmail.com Thu Feb 5 11:57:11 2015 From: nicolasbock at gmail.com (Nicolas Bock) Date: Thu, 5 Feb 2015 09:57:11 -0700 Subject: [cmake-developers] New module: CheckFortranCompilerFlag.cmake In-Reply-To: <54D398EA.2020905@kitware.com> References: <2368316.NGt5bHpFaX@eto> <54D12CFE.8060408@kitware.com> <54D398EA.2020905@kitware.com> Message-ID: Thanks! Let me know how I can help with testing. Nick On Feb 5, 2015 9:23 AM, "Brad King" wrote: > On 02/04/2015 08:21 AM, Nicolas Bock wrote: > > I have modified the patch and added error messages for NAG and PGI > > compilers. I have also fixed the FAIL_REGEX in the module itself to > > read "not for Fortran" instead of "... for C". > > Thanks. I've drafted commits to add the module and a test case: > > CheckFortranCompilerFlag: Add module to check Fortran flag existence > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=393a45e2 > > CheckFortranCompilerFlag: Add test case > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54e900ab > > It was too late in the 3.2 preparation process to add this, so the > commits are based on post-3.2 development. This will give us more > time to get the module tested everywhere and to get feedback from > early adopters that build from source or use nightly binaries. > > -Brad > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aleixpol at kde.org Thu Feb 5 12:03:25 2015 From: aleixpol at kde.org (Aleix Pol) Date: Thu, 5 Feb 2015 18:03:25 +0100 Subject: [cmake-developers] Extracting target metadata, IDE integration In-Reply-To: References: <54C65C0F.9090902@kitware.com> Message-ID: On Mon, Feb 2, 2015 at 5:36 PM, Aleix Pol wrote: > On Mon, Jan 26, 2015 at 9:15 PM, Tobias Hunger wrote: >> I gave this patch a try with the cmake project data. >> >> I had hoped that this file would contain all the information an IDE >> might need, but there seems quite a bit missing for that. E.g. there >> is no information on which files are used to build a target. What am I >> missing? >> >> Best Regards, >> Tobias >> >> On Mon, Jan 26, 2015 at 4:23 PM, Brad King wrote: >>> On 01/25/2015 08:26 AM, Tobias Hunger wrote: >>>> I just had a bit of time to play with cmake this weekend: Is this >>>> patch available somewhere by now? >>> >>> Aleix sent it in a message of this thread on 2015-01-09: >>> >>> http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10711/focus=12061 >>> >>> Some review comments elsewhere in this thread are still pending. >>> >>> -Brad >>> > > It does provide them. For example [1]. > > Isn't that what you meant? > > Aleix > > [1] > { > "name": "kdevcmakebuilder", > "type": "MODULE_LIBRARY", > "configs": [ > { > "name": "debug", > "sources": [ > "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilder.cpp", > "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakejob.cpp", > "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/prunejob.cpp", > "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilderpreferences.cpp", > "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/ui_cmakebuildersettings.h", > "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilderconfig.cpp", > "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilderconfig.h", > "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/kdevcmakebuilder_automoc.cpp", > "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuildersettings.ui", > "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilderconfig.kcfgc" > ] > } > ], > "directory": > "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder", > "location": > "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/kdevcmakebuilder.so", > "backtrace": > ["/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/CMakeLists.txt:20"], > "installed": true > } Bump? Aleix From DLRdave at aol.com Thu Feb 5 12:38:27 2015 From: DLRdave at aol.com (David Cole) Date: Thu, 5 Feb 2015 12:38:27 -0500 Subject: [cmake-developers] Feature request in CMake-gui: "Open project file" button In-Reply-To: <1423130043469.84365.13292@webmail5> References: <1423130043469.84365.13292@webmail5> Message-ID: There is a similar (old) feature request in the bug tracker for a "build" button: http://public.kitware.com/Bug/view.php?id=8260 See the commentary there when considering adding a button to cmake-gui... D On Thu, Feb 5, 2015 at 4:54 AM, Paul Anton Letnes wrote: > Hi! > > I sometimes dream of a tiny, but time-saving feature: Next to "configure" > and "generate", I'd want an "open project" button (for VS/Eclipse/XCode or > other IDE projects). > > Cheers > ----------- > Paul Anton > > -- > > 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 From foss at grueninger.de Fri Feb 6 01:01:55 2015 From: foss at grueninger.de (=?UTF-8?B?Q2hyaXN0b3BoIEdyw7xuaW5nZXI=?=) Date: Fri, 06 Feb 2015 07:01:55 +0100 Subject: [cmake-developers] Fortran detection, issue 9220 Message-ID: <54D458D3.6050705@grueninger.de> Hi CMake developers, would you mind to tackle issue 9220 "enable_language(.... OPTIONAL) signature does not work correctly"? It's a shame that CMake cannot properly detect optional Fortran for more than 5 years! The workaround from Eigen works fine for me, but it's still embarrassing. BTW, is there a way to disable the optional Fortran by a flag to CMake? I couldn't find any... Bye Christoph From ben.boeckel at kitware.com Fri Feb 6 10:21:52 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 6 Feb 2015 10:21:52 -0500 Subject: [cmake-developers] Fortran detection, issue 9220 In-Reply-To: <54D458D3.6050705@grueninger.de> References: <54D458D3.6050705@grueninger.de> Message-ID: <20150206152152.GB25916@megas.kitwarein.com> On Fri, Feb 06, 2015 at 07:01:55 +0100, Christoph Gr?ninger wrote: > would you mind to tackle issue 9220 "enable_language(.... OPTIONAL) > signature does not work correctly"? It's a shame that CMake cannot > properly detect optional Fortran for more than 5 years! The workaround > from Eigen works fine for me, but it's still embarrassing. > > BTW, is there a way to disable the optional Fortran by a flag to CMake? > I couldn't find any... Here is a commit which I haven't worked on for a while which delays the error until you request an actual build of a Fortran object: https://github.com/mathstuf/CMake/commit/880d783bf7fbd986b8a50a712e69ff40abbcfa07 While not the OPTIONAL signature, it is more accurate. Let me know how it works for you. --Ben From Robert.Goulet at autodesk.com Fri Feb 6 10:25:30 2015 From: Robert.Goulet at autodesk.com (Robert Goulet) Date: Fri, 6 Feb 2015 15:25:30 +0000 Subject: [cmake-developers] msbuild VisualStudioEdition value (was: Fix for Windows Store warning APPX1901...) In-Reply-To: <54D12B7A.6090202@kitware.com> References: <54CA9077.6000902@kitware.com> <54D12B7A.6090202@kitware.com> Message-ID: Gilles? Any advices about this one? Thanks! -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Tuesday, February 3, 2015 3:12 PM To: Robert Goulet; Gilles Khouzam Cc: cmake-developers at cmake.org Subject: Re: msbuild VisualStudioEdition value (was: Fix for Windows Store warning APPX1901...) On 01/30/2015 10:35 AM, Robert Goulet wrote: > makeCommand.push_back(std::string("/p:VisualStudioVersion=")+ > this->GetIDEVersion()); > + > + // Normally this is only needed for Windows Store/Phone apps when building from command-line. > + // Fixes warning APPX2102: : File 'VisualStudioEdition' is not found or is not an executable file. > + makeCommand.push_back(std::string("/p:VisualStudioEdition=\"")+ > + this->GetName()+ > + std::string("\"")); Something like this may work, but the generator name will not always be a valid value for VisualStudioEdition. Somehow we have to look up a correct value based on the current generator and what is installed on the system. Gilles, might you be able to help with this? Thanks, -Brad From ben.boeckel at kitware.com Fri Feb 6 13:15:45 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 6 Feb 2015 13:15:45 -0500 Subject: [cmake-developers] GCC5 and C++11 ABI Message-ID: <20150206181545.GA19141@megas.kitwarein.com> Looks like compiler_feature_detection will need to normalize the _GLIBCXX_USE_CXX11_ABI preprocessor define as well: http://developerblog.redhat.com/2015/02/05/gcc5-and-the-c11-abi/ --Ben From michael.smith at puppetlabs.com Fri Feb 6 15:29:43 2015 From: michael.smith at puppetlabs.com (Michael Smith) Date: Fri, 6 Feb 2015 12:29:43 -0800 Subject: [cmake-developers] FindRuby doesn't find 64-bit Ruby on Windows Message-ID: It appears FindRuby fails to find 64-bit Ruby on Windows. Debug output is -- --------FindRuby.cmake debug------------ -- _RUBY_POSSIBLE_EXECUTABLE_NAMES: ruby1.9;ruby19;ruby;ruby2.1;ruby21;ruby2.0;ruby20;ruby1.8;ruby18 -- _RUBY_POSSIBLE_LIB_NAMES: ruby;ruby-static;ruby2.1;ruby21;ruby-2.1;ruby-2.1.0;msvcr-ruby210;msvcr-ruby210-static;msvcrt-ruby210;msvcrt-ruby210-static -- RUBY_ARCH_DIR: C:/tools/ruby215/lib/ruby/2.1.0/x64-mingw32 -- RUBY_HDR_DIR: C:/tools/ruby215/include/ruby-2.1.0 -- RUBY_POSSIBLE_LIB_DIR: C:/tools/ruby215/lib -- Found RUBY_VERSION: "2.1.0" , short: "2.1", nodot: "21" -- _RUBY_REQUIRED_VARS: RUBY_EXECUTABLE;RUBY_INCLUDE_DIR;RUBY_LIBRARY;RUBY_CONFIG_INCLUDE_DIR -- RUBY_EXECUTABLE: C:/tools/ruby215/bin/ruby.exe -- RUBY_LIBRARY: RUBY_LIBRARY-NOTFOUND -- RUBY_INCLUDE_DIR: C:/tools/ruby215/include/ruby-2.1.0 -- RUBY_CONFIG_INCLUDE_DIR: C:/tools/ruby215/include/ruby-2.1.0/x64-mingw32 -- -------------------- -- Could NOT find Ruby (missing: RUBY_LIBRARY) (found suitable version "2.1.0", minimum required is "1.9") The 64-bit ruby library names are: * lib/libx64-mscvrt-ruby210-static.a * lib/libx64-mscvrt-ruby210.dll.a * bin/x64-mscvrt-ruby210.dll I've attached a patch that adds "x64-" prefixed lookup, that addresses the issue in my environment. The new debug output is -- --------FindRuby.cmake debug------------ -- _RUBY_POSSIBLE_EXECUTABLE_NAMES: ruby1.9;ruby19;ruby;ruby2.1;ruby21;ruby2.0;ruby20;ruby1.8;ruby18 -- _RUBY_POSSIBLE_LIB_NAMES: ruby;ruby-static;ruby2.1;ruby21;ruby-2.1;ruby-2.1.0;msvcr-ruby210;msvcr-ruby210-static;msvcrt-ruby210;msvcrt-ruby210-static;x64-msvcr-ruby210;x64-msvcr-ruby210-static;x64-msvcrt-ruby210;x64-msvcrt-ruby210-static -- RUBY_ARCH_DIR: C:/tools/ruby215/lib/ruby/2.1.0/x64-mingw32 -- RUBY_HDR_DIR: C:/tools/ruby215/include/ruby-2.1.0 -- RUBY_POSSIBLE_LIB_DIR: C:/tools/ruby215/lib -- Found RUBY_VERSION: "2.1.0" , short: "2.1", nodot: "21" -- _RUBY_REQUIRED_VARS: RUBY_EXECUTABLE;RUBY_INCLUDE_DIR;RUBY_LIBRARY;RUBY_CONFIG_INCLUDE_DIR -- RUBY_EXECUTABLE: C:/tools/ruby215/bin/ruby.exe -- RUBY_LIBRARY: C:/tools/ruby215/lib/libx64-msvcrt-ruby210.dll.a -- RUBY_INCLUDE_DIR: C:/tools/ruby215/include/ruby-2.1.0 -- RUBY_CONFIG_INCLUDE_DIR: C:/tools/ruby215/include/ruby-2.1.0/x64-mingw32 -- -------------------- -- Found Ruby: C:/tools/ruby215/bin/ruby.exe (found suitable version "2.1.0", minimum required is "1.9") -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Fix-finding-64-bit-Ruby-with-FindRuby-on-Windows.patch Type: application/octet-stream Size: 1213 bytes Desc: not available URL: From brad.king at kitware.com Fri Feb 6 15:33:38 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 06 Feb 2015 15:33:38 -0500 Subject: [cmake-developers] FindRuby doesn't find 64-bit Ruby on Windows In-Reply-To: References: Message-ID: <54D52522.1090408@kitware.com> On 02/06/2015 03:29 PM, Michael Smith wrote: > The 64-bit ruby library names are: > * lib/libx64-mscvrt-ruby210-static.a > * lib/libx64-mscvrt-ruby210.dll.a > * bin/x64-mscvrt-ruby210.dll > > I've attached a patch that adds "x64-" prefixed lookup Thanks for working on this. Some of the other find modules face similar situation. In order to avoid finding 64-bit binaries when targeting a 32-bit architecture, use of such prefixes could be guarded by if(CMAKE_SIZEOF_VOID_P EQUAL 8) Please revise accordingly. Also please check whether the non-prefixed names should ever be used for 64-bit architectures. Thanks, -Brad From michael.smith at puppetlabs.com Fri Feb 6 18:00:50 2015 From: michael.smith at puppetlabs.com (Michael Smith) Date: Fri, 6 Feb 2015 15:00:50 -0800 Subject: [cmake-developers] FindRuby doesn't find 64-bit Ruby on Windows In-Reply-To: <54D52522.1090408@kitware.com> References: <54D52522.1090408@kitware.com> Message-ID: Non-prefixed names shouldn't be used for 64-bit architectures. The only major releases with 64-bit support are 2.0.0 and 2.1.5, and both use the x64- prefix. New patch attached. Follow-up question: Why doesn't FindRuby use Config::CONFIG['LIBRUBY'], 'LIBRUBY_A', 'LIBRUBY_SO' to search for libs? Ruby reports the name of its libraries. On Fri, Feb 6, 2015 at 12:33 PM, Brad King wrote: > On 02/06/2015 03:29 PM, Michael Smith wrote: > > The 64-bit ruby library names are: > > * lib/libx64-mscvrt-ruby210-static.a > > * lib/libx64-mscvrt-ruby210.dll.a > > * bin/x64-mscvrt-ruby210.dll > > > > I've attached a patch that adds "x64-" prefixed lookup > > Thanks for working on this. Some of the other find modules face > similar situation. In order to avoid finding 64-bit binaries > when targeting a 32-bit architecture, use of such prefixes could > be guarded by > > if(CMAKE_SIZEOF_VOID_P EQUAL 8) > > Please revise accordingly. Also please check whether the > non-prefixed names should ever be used for 64-bit architectures. > > Thanks, > -Brad > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Fix-finding-64-bit-Ruby-with-FindRuby-on-Windows.patch Type: application/octet-stream Size: 1436 bytes Desc: not available URL: From ben.boeckel at kitware.com Fri Feb 6 19:42:51 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 6 Feb 2015 19:42:51 -0500 Subject: [cmake-developers] FindRuby doesn't find 64-bit Ruby on Windows In-Reply-To: References: <54D52522.1090408@kitware.com> Message-ID: <20150207004251.GA32439@bronto-burt.dev.benboeckel.net> On Fri, Feb 06, 2015 at 15:00:50 -0800, Michael Smith wrote: > Non-prefixed names shouldn't be used for 64-bit architectures. The only > major releases with 64-bit support are 2.0.0 and 2.1.5, and both use the > x64- prefix. New patch attached. What about AArch64? > Follow-up question: Why doesn't FindRuby use Config::CONFIG['LIBRUBY'], > 'LIBRUBY_A', 'LIBRUBY_SO' to search for libs? Ruby reports the name of its > libraries. Doesn't work for cross-compiles. --Ben From michael.smith at puppetlabs.com Fri Feb 6 21:10:37 2015 From: michael.smith at puppetlabs.com (Michael Smith) Date: Fri, 6 Feb 2015 18:10:37 -0800 Subject: [cmake-developers] FindRuby doesn't find 64-bit Ruby on Windows In-Reply-To: <20150207004251.GA32439@bronto-burt.dev.benboeckel.net> References: <54D52522.1090408@kitware.com> <20150207004251.GA32439@bronto-burt.dev.benboeckel.net> Message-ID: On Fri, Feb 6, 2015 at 4:42 PM, Ben Boeckel wrote: > On Fri, Feb 06, 2015 at 15:00:50 -0800, Michael Smith wrote: > > Non-prefixed names shouldn't be used for 64-bit architectures. The only > > major releases with 64-bit support are 2.0.0 and 2.1.5, and both use the > > x64- prefix. New patch attached. > > What about AArch64? > This only applies to finding libraries on Windows. > > > Follow-up question: Why doesn't FindRuby use Config::CONFIG['LIBRUBY'], > > 'LIBRUBY_A', 'LIBRUBY_SO' to search for libs? Ruby reports the name of > its > > libraries. > > Doesn't work for cross-compiles. > FindRuby is already querying ruby for libdir. How does that work for cross-compiles but using some of the other config doesn't? > > --Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nuno at aeminium.org Sat Feb 7 17:23:28 2015 From: nuno at aeminium.org (Nuno Sucena Almeida) Date: Sat, 07 Feb 2015 17:23:28 -0500 Subject: [cmake-developers] [PATCH] add --sphinx-qthelp command line argument to bootstrap script. Message-ID: <54D69060.40504@aeminium.org> --- bootstrap | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bootstrap b/bootstrap index a88eb6a..e7d0496 100755 --- a/bootstrap +++ b/bootstrap @@ -72,6 +72,7 @@ cmake_bootstrap_qt_gui="" cmake_bootstrap_qt_qmake="" cmake_sphinx_man="" cmake_sphinx_html="" +cmake_sphinx_qthelp="" cmake_sphinx_build="" # Determine whether this is a Cygwin environment. @@ -410,6 +411,7 @@ Configuration: --sphinx-man build man pages with Sphinx --sphinx-html build html help with Sphinx + --sphinx-qthelp build qch help with Sphinx --sphinx-build= use as the sphinx-build executable Directory and file names: @@ -646,6 +648,7 @@ while test $# != 0; do --qt-qmake=*) cmake_bootstrap_qt_qmake=`cmake_arg "$1"` ;; --sphinx-man) cmake_sphinx_man="1" ;; --sphinx-html) cmake_sphinx_html="1" ;; + --sphinx-qthelp) cmake_sphinx_qthelp="1" ;; --sphinx-build=*) cmake_sphinx_build=`cmake_arg "$1"` ;; --help) cmake_usage ;; --version) cmake_version_display ; exit 2 ;; @@ -1661,6 +1664,11 @@ if [ "x${cmake_sphinx_html}" != "x" ]; then set (SPHINX_HTML "'"${cmake_sphinx_html}"'" CACHE FILEPATH "Build html help with Sphinx" FORCE) ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" fi +if [ "x${cmake_sphinx_qthelp}" != "x" ]; then + echo ' +set (SPHINX_QTHELP "'"${cmake_sphinx_qthelp}"'" CACHE FILEPATH "Build qch help with Sphinx" FORCE) +' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" +fi if [ "x${cmake_sphinx_build}" != "x" ]; then echo ' set (SPHINX_EXECUTABLE "'"${cmake_sphinx_build}"'" CACHE FILEPATH "Location of Qt sphinx-build" FORCE) -- 1.9.1 -- http://aeminium.org/nuno/ From domen.vrankar at gmail.com Sun Feb 8 13:43:38 2015 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Sun, 8 Feb 2015 19:43:38 +0100 Subject: [cmake-developers] fixing a bug after topic was merged to master Message-ID: Hi all, While writing tests for a new topic I found a bug in an older topic that I wrote. The that topic was already merged to master (last week) but remote stage branch still exists. The fix is trivial - one variable typo. How can I get the fix both into master and next release candidate branch? Should I create a new topic and push that to next or should I extend the old one even though it was already merged to master and push that one to next? Thanks, Domen From eike at sf-mail.de Sun Feb 8 13:49:40 2015 From: eike at sf-mail.de (Rolf Eike Beer) Date: Sun, 08 Feb 2015 19:49:40 +0100 Subject: [cmake-developers] fixing a bug after topic was merged to master In-Reply-To: References: Message-ID: <10547168.CCTxmgFtrV@eto> Domen Vrankar wrote: > Hi all, > > While writing tests for a new topic I found a bug in an older topic > that I wrote. > The that topic was already merged to master (last week) but remote > stage branch still exists. > The fix is trivial - one variable typo. > > How can I get the fix both into master and next release candidate branch? > Should I create a new topic and push that to next or should I extend > the old one even though it was already merged to master and push that > one to next? Just create a new branch based on origin/release and merge to next. Eike -- -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From mantis at public.kitware.com Mon Feb 9 10:58:10 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Mon, 9 Feb 2015 10:58:10 -0500 Subject: [cmake-developers] [CMake 0015392]: Unclear documentation for module: FindOpenMP.cmake Message-ID: The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15392 ====================================================================== Reported By: Mathieu Malaterre Assigned To: ====================================================================== Project: CMake Issue ID: 15392 Category: CMake Reproducibility: have not tried Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-09 10:58 EST Last Modified: 2015-02-09 10:58 EST ====================================================================== Summary: Unclear documentation for module: FindOpenMP.cmake Description: The FindOpenMP module states: [...] The following variables are set: OpenMP_C_FLAGS - flags to add to the C compiler for OpenMP support [...] Instead is should be stated that the OpenMP flags should be passed both to the C compiler and the linker. Eg, the following will not work (linker step will fail) cmake_minimum_required(VERSION 2.8) project(omp C) find_package(OpenMP REQUIRED) # OPENMP_FOUND # Not OK # pass OpenMP flag to C compiler (only) set_property(SOURCE tomp.c PROPERTY COMPILE_FLAGS ${OpenMP_C_FLAGS} ) # OK # pass OpenMP CFLAGS to C compiler and linker: # set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") add_executable(tomp tomp.c) Steps to Reproduce: $ cat CMakeLists.txt cmake_minimum_required(VERSION 2.8) project(omp C) find_package(OpenMP REQUIRED) # OPENMP_FOUND # Not OK # pass OpenMP flag to C compiler (only) set_property(SOURCE tomp.c PROPERTY COMPILE_FLAGS ${OpenMP_C_FLAGS} ) # OK # pass OpenMP CFLAGS to C compiler and linker: # set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") add_executable(tomp tomp.c) $ cat tomp.c #include int main() { const int size = 256; double table[size]; int n; #pragma omp parallel for for(n=0; n The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15393 ====================================================================== Reported By: Mathieu Malaterre Assigned To: ====================================================================== Project: CMake Issue ID: 15393 Category: (No Category) Reproducibility: have not tried Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-09 11:09 EST Last Modified: 2015-02-09 11:09 EST ====================================================================== Summary: undefined reference to `GOMP_parallel' Description: This is a follow-up to http://www.cmake.org/Bug/view.php?id=15392. See steps to reproduce. It make the module hard to use in a portable manner. Steps to Reproduce: $ cat CMakeLists.txt cmake_minimum_required(VERSION 2.8) project(omp C) find_package(OpenMP REQUIRED) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") add_library(tomp SHARED tomp.c) $ cat tomp.c #include int compute() { const int size = 256; double table[size]; int n; #pragma omp parallel for for(n=0; n References: <54D79A1B.1000100@cora.nwra.com> Message-ID: ---------- Forwarded message ---------- From: Orion Poplawski Date: Sun, Feb 8, 2015 at 12:17 PM Subject: Re: [cmake-developers] [ANNOUNCE] CMake 3.1.2 Released To: Robert Maynard On 02/05/2015 08:34 AM, Robert Maynard wrote: > > We are pleased to announce that CMake 3.1.2 is now available for download. I'm getting this now building cmake 3.1.2 for Fedora Rawhide with gcc 5.0.0: 32: Detecting CXX compile features - done 32: Testing feature : cxx_aggregate_default_initializers 32: Configuring 32: CMake Error at CMakeLists.txt:70 (message): 32: Feature cxx_aggregate_default_initializers expected not to work for CXX 32: GNU-5.0.0. 32: 32: Update the supported features or blacklist it. 32: Testing feature : cxx_relaxed_constexpr 32: Configuring 32: CMake Error at CMakeLists.txt:70 (message): 32: Feature cxx_relaxed_constexpr expected not to work for CXX GNU-5.0.0. 32: 32: Update the supported features or blacklist it. 32: Testing feature : cxx_variable_templates 32: Configuring 32: CMake Error at CMakeLists.txt:70 (message): 32: Feature cxx_variable_templates expected not to work for CXX GNU-5.0.0. 32: 32: Update the supported features or blacklist it. -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA/CoRA Division FAX: 303-415-9702 3380 Mitchell Lane orion at cora.nwra.com Boulder, CO 80301 http://www.cora.nwra.com From ruslan_baratov at yahoo.com Mon Feb 9 12:17:15 2015 From: ruslan_baratov at yahoo.com (Ruslan Baratov) Date: Mon, 09 Feb 2015 20:17:15 +0300 Subject: [cmake-developers] BundleUtilities check exit code Message-ID: <54D8EB9B.50305@yahoo.com> Hi, This patch let do the check that exit code is 0, i.e. install_name_tool exits successfully. Ruslan -------------- next part -------------- From 74a52160f7b74907acfcbca91b925ea5589019b7 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 9 Feb 2015 20:09:41 +0300 Subject: [PATCH] fixup_bundle: check execute_process succeed --- Modules/BundleUtilities.cmake | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index fee0a7c..ad145eb 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -776,7 +776,18 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs) # to install_name_tool: # if(changes) - execute_process(COMMAND install_name_tool ${changes} "${resolved_embedded_item}") + execute_process( + COMMAND install_name_tool ${changes} "${resolved_embedded_item}" + RESULT_VARIABLE install_name_tool_result + ) + if(NOT install_name_tool_result EQUAL 0) + set(msg install_name_tool ${changes} "${resolved_embedded_item}") + set(oneline "") + foreach(word ${msg}) + set(oneline "${oneline} ${word}") + endforeach() + message(FATAL_ERROR "Command failed: ${oneline}") + endif() endif() endfunction() -- 1.9.3 (Apple Git-50) From ben.boeckel at kitware.com Mon Feb 9 13:08:44 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 9 Feb 2015 13:08:44 -0500 Subject: [cmake-developers] Fwd: [ANNOUNCE] CMake 3.1.2 Released In-Reply-To: References: <54D79A1B.1000100@cora.nwra.com> Message-ID: <20150209180844.GA8736@megas.kitwarein.com> On Mon, Feb 09, 2015 at 11:09:32 -0500, Robert Maynard wrote: > > We are pleased to announce that CMake 3.1.2 is now available for download. > > > I'm getting this now building cmake 3.1.2 for Fedora Rawhide with gcc 5.0.0: > > 32: Detecting CXX compile features - done > 32: Testing feature : cxx_aggregate_default_initializers > 32: Configuring > 32: CMake Error at CMakeLists.txt:70 (message): > 32: Feature cxx_aggregate_default_initializers expected not to work for CXX > 32: GNU-5.0.0. > 32: > 32: Update the supported features or blacklist it. > > 32: Testing feature : cxx_relaxed_constexpr > 32: Configuring > 32: CMake Error at CMakeLists.txt:70 (message): > 32: Feature cxx_relaxed_constexpr expected not to work for CXX GNU-5.0.0. > 32: > 32: Update the supported features or blacklist it. > > 32: Testing feature : cxx_variable_templates > 32: Configuring > 32: CMake Error at CMakeLists.txt:70 (message): > 32: Feature cxx_variable_templates expected not to work for CXX GNU-5.0.0. > 32: > 32: Update the supported features or blacklist it. Yeah, the feature tables will need to be updated. I use Rawhide at home (was going to send an email about the tests as well) and was going to look at updating it there. However, it is still a pre-release build of GCC5, so we should probably just hold off on pushing something into master until an official release is made. --Ben From mantis at public.kitware.com Mon Feb 9 14:57:24 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Mon, 9 Feb 2015 14:57:24 -0500 Subject: [cmake-developers] [CMake 0015395]: NMAKE circa MSVC6 + Unix Makefiles + big project = "fatal error U1054: cannot create inline file" Message-ID: <1f6f3731b90582e5216445e581cdfe2f@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15395 ====================================================================== Reported By: Daniel Richard G. Assigned To: ====================================================================== Project: CMake Issue ID: 15395 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-09 14:57 EST Last Modified: 2015-02-09 14:57 EST ====================================================================== Summary: NMAKE circa MSVC6 + Unix Makefiles + big project = "fatal error U1054: cannot create inline file" Description: I am building a large project using CMake 3.1.2 with the Visual Studio 6 toolchain. As the IDE has not proven stable for automated building, I am using the Unix Makefiles generator with NMAKE+CL. The project build consistently fails part-way through with an error of the form [ 35%] Building C object src/lib/CMakeFiles/foo.dir/bar/baz/baz_qux.c.obj src\lib\CMakeFiles\foo.dir\build.make(66114) : fatal error U1054: cannot create inline file 'C:\tmp\nmz02696' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\VC98\BIN\NMAKE.EXE"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\VC98\BIN\nmake.exe"' : return code '0x2' Stop. Here's what I found in my investigation: Each time the build rules use an NMAKE-generated response file with the @<< ... << syntax, NMAKE creates a temporary file in the $TMP directory. The temporary file name has the form nXXNNNNN, where X is a lowercase letter and N is a digit. The first temp file created is e.g. nma12345, then nmb12345, nmc12345. (The numerical part appears to be random, but is consistent for all temp files belonging to the same NMAKE instance. It does not appear to be a PID, but effectively serves the same purpose.) After a while, it gets to nna12345, then nzz12345, it wraps back to naa12345, and then returns to nma12345. These files remain on the filesystem until the originating NMAKE process exits. So in theory, that is a maximum of 26*26 == 676 distinct temp file names that this version of NMAKE can use. Knowing that, the error above is obvious: NMAKE tried to write to an existing temp file that was still in use, and failed. I am able to work around this problem by invoking the following bit of Perl on the CMake-generated build.make file: perl -pi.orig -e 'BEGIN{$i=0} s!(\@<<)(?=\r?\n)!"$1\$(TMP)\\nmake-".($i++).".tmp"!e' /path/to/CMakeFiles/myproject.dir/build.make This assigns explicit temp-file names to the @<< ... << response files, using a naming scheme that does not top out at 676 entries. (It could still be improved, to allow multiple instances of NMAKE to run simultaneously.) Visual Studio 6 may be old, but it's still an effective way to build code that links against the original MSVCRT.DLL. CMake would benefit from knowing its way around this limitation. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-09 14:57 Daniel Richard G.New Issue ====================================================================== From domen.vrankar at gmail.com Mon Feb 9 17:14:17 2015 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Mon, 9 Feb 2015 23:14:17 +0100 Subject: [cmake-developers] old policies interfering with script provided by CPack Message-ID: Hi everyone, During testing of CPackRPM with older CMakeLists.txt I noticed that cmake_minimum_required from that script affects how CPackRPM script works. The policy that is causing problems is CMP0009 - FILE GLOB_RECURSE calls should not follow symlinks by default. To get around this problem I thought about wrapping the entire script with: cmake_policy(PUSH) cmake_policy(VERSION 3.1) cmake_policy(POP) Would this be an acceptable solution? Does anybody have a better idea? Thanks, Domen From mantis at public.kitware.com Mon Feb 9 18:53:52 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Mon, 9 Feb 2015 18:53:52 -0500 Subject: [cmake-developers] [CMake 0015398]: In a CMakeLists.txt file, a way to cause local make VERBOSE=1 Message-ID: <9a457b7c4c00a82683a99c2fb889e6b3@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15398 ====================================================================== Reported By: Dave Yost Assigned To: ====================================================================== Project: CMake Issue ID: 15398 Category: CMake Reproducibility: have not tried Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-09 18:53 EST Last Modified: 2015-02-09 18:53 EST ====================================================================== Summary: In a CMakeLists.txt file, a way to cause local make VERBOSE=1 Description: It would be very nice if there were a command we could use in a subproject CMakeLists.txt file that would cause, within that subproject only, invocation of make with VERBOSE=1 Better yet would be to be able to set this option for an individual target. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-09 18:53 Dave Yost New Issue ====================================================================== From orion at cora.nwra.com Mon Feb 9 23:18:09 2015 From: orion at cora.nwra.com (Orion Poplawski) Date: Mon, 09 Feb 2015 21:18:09 -0700 Subject: [cmake-developers] Fwd: [ANNOUNCE] CMake 3.1.2 Released In-Reply-To: <20150209180844.GA8736@megas.kitwarein.com> References: <54D79A1B.1000100@cora.nwra.com> <20150209180844.GA8736@megas.kitwarein.com> Message-ID: <54D98681.408@cora.nwra.com> On 02/09/2015 11:08 AM, Ben Boeckel wrote: > On Mon, Feb 09, 2015 at 11:09:32 -0500, Robert Maynard wrote: >>> We are pleased to announce that CMake 3.1.2 is now available for download. >> >> >> I'm getting this now building cmake 3.1.2 for Fedora Rawhide with gcc 5.0.0: >> >> 32: Detecting CXX compile features - done >> 32: Testing feature : cxx_aggregate_default_initializers >> 32: Configuring >> 32: CMake Error at CMakeLists.txt:70 (message): >> 32: Feature cxx_aggregate_default_initializers expected not to work for CXX >> 32: GNU-5.0.0. >> 32: >> 32: Update the supported features or blacklist it. >> >> 32: Testing feature : cxx_relaxed_constexpr >> 32: Configuring >> 32: CMake Error at CMakeLists.txt:70 (message): >> 32: Feature cxx_relaxed_constexpr expected not to work for CXX GNU-5.0.0. >> 32: >> 32: Update the supported features or blacklist it. >> >> 32: Testing feature : cxx_variable_templates >> 32: Configuring >> 32: CMake Error at CMakeLists.txt:70 (message): >> 32: Feature cxx_variable_templates expected not to work for CXX GNU-5.0.0. >> 32: >> 32: Update the supported features or blacklist it. > > Yeah, the feature tables will need to be updated. I use Rawhide at home > (was going to send an email about the tests as well) and was going to > look at updating it there. However, it is still a pre-release build of > GCC5, so we should probably just hold off on pushing something into > master until an official release is made. > > --Ben > According to https://fedoraproject.org/wiki/Changes/GCC5#Detailed_Description : GCC 5 is currently in stage4 - prerelease state with only regression bugfixes and documentation fixes allowed. So I think it's reasonable time to start adapting to it. -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA/CoRA Division FAX: 303-415-9702 3380 Mitchell Lane orion at cora.nwra.com Boulder, CO 80301 http://www.cora.nwra.com From mantis at public.kitware.com Tue Feb 10 05:57:18 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Tue, 10 Feb 2015 05:57:18 -0500 Subject: [cmake-developers] [CMake 0015399]: cmake xml-escapes "; " for visual studio generators resulting in malformed "ignore default libraries" Message-ID: The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15399 ====================================================================== Reported By: Florent Assigned To: ====================================================================== Project: CMake Issue ID: 15399 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-10 05:57 EST Last Modified: 2015-02-10 05:57 EST ====================================================================== Summary: cmake xml-escapes ";" for visual studio generators resulting in malformed "ignore default libraries" Description: I have the following cmakelist : set_property(TARGET MyLibraryUsingFortranRt APPEND PROPERTY LINK_FLAGS "/NODEFAULTLIB:svml_disp.lib" "libifcoremt.lib" "libcmt.lib" "libcmtd.lib" "libmmt.lib" "libifport.lib") this generates the following xml fragment with 3.1 (Visual 2010 generator) svml_disp.lib%3Blibifcoremt.lib%3Blibcmt.lib%3Blibcmtd.lib%3Blibmmt.lib%3Blibifport.lib;%(IgnoreSpecificDefaultLibraries) (notice how ";" got correctly escaped to %3B ! ) However for this specific filed VS expect to have ";" present in the xml as it is the case with 3.0 making it impossible to ignore several libraries. Additional Information: from my end-less researches, this is linked to http://www.cmake.org/Bug/view.php?id=15031 and most likely this commit : http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8fa087ab ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-10 05:57 Florent New Issue 2015-02-10 05:57 Florent File Added: VS_escaped_ignore_specific_libraries.PNG ====================================================================== From brad.king at kitware.com Tue Feb 10 09:03:14 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Feb 2015 09:03:14 -0500 Subject: [cmake-developers] old policies interfering with script provided by CPack In-Reply-To: References: Message-ID: <54DA0FA2.5000007@kitware.com> On 02/09/2015 05:14 PM, Domen Vrankar wrote: > To get around this problem I thought about wrapping the entire script with: > > cmake_policy(PUSH) > cmake_policy(VERSION 3.1) > cmake_policy(POP) > > Would this be an acceptable solution? That is currently the intended way to do it. There was once some discussion of trying to scope policies automatically for modules within CMake, but currently it must be explicit. -Brad From mantis at public.kitware.com Tue Feb 10 09:21:21 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Tue, 10 Feb 2015 09:21:21 -0500 Subject: [cmake-developers] [CMake 0015400]: fixup_bundle does not work on cpack stage Message-ID: <307fd98c4c0a46fd80e9e2c2890e3256@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15400 ====================================================================== Reported By: Ruslan Baratov Assigned To: ====================================================================== Project: CMake Issue ID: 15400 Category: Modules Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-10 09:21 EST Last Modified: 2015-02-10 09:21 EST ====================================================================== Summary: fixup_bundle does not work on cpack stage Description: fixup_bundle works as expected if cmake installs target, but not when cpack creating a package. Steps to Reproduce: Example with Visual Studio 12, Qt and NSIS generator (see attached CMakeLists.txt and main.cpp): 1. cmake -H. -B_builds "-GVisual Studio 12 2013" -DCMAKE_INSTALL_PREFIX=_install -DCPACK_GENERATOR=NSIS 2. cmake --build _builds --config Release --target install 3. dependent Qt libraries installed in local _install directory: -- fixup_bundle: copying... -- 1/14: *NOT* copying '.../_install/bin/foo.exe' -- 2/14: copying '.../bin/Qt5Core.dll' -- 3/14: copying '.../bin/Qt5Gui.dll' -- 4/14: copying '.../bin/Qt5Widgets.dll' -- 5/14: copying '.../bin/icudt53.dll' -- 6/14: copying '.../bin/icuin53.dll' -- 7/14: copying '.../bin/icuuc53.dll' -- fixup_bundle: fixing... -- 8/14: fix-up not required on this platform '.../_install/bin/foo.exe' -- 9/14: fix-up not required on this platform '.../_install/bin/Qt5Core.dll' -- 10/14: fix-up not required on this platform '.../_install/bin/Qt5Gui.dll' -- 11/14: fix-up not required on this platform '.../_install/bin/Qt5Widgets.dll' -- 12/14: fix-up not required on this platform '.../_install/bin/icudt53.dll' -- 13/14: fix-up not required on this platform '.../_install/bin/icuin53.dll' -- 14/14: fix-up not required on this platform '.../_install/bin/icuuc53.dll' 4. But not if cpack build installer: > cd _builds > cpack --verbose -C Release -GNSIS CPack Verbose: fixup_bundle: copying... CPack Verbose: 1/2: *NOT* copying '.../_builds/_CPack_Packages/win32/NSIS/Foo-1.0.0-win32/bin/foo.exe' CPack Verbose: fixup_bundle: fixing... CPack Verbose: 2/2: fix-up not required on this platform '.../_builds/_CPack_Packages/win32/NSIS/Foo-1.0.0-win32/bin/foo.exe' CPack Verbose: fixup_bundle: cleaning up... CPack Verbose: fixup_bundle: verifying... ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-10 09:21 Ruslan Baratov New Issue 2015-02-10 09:21 Ruslan Baratov File Added: CMakeLists.txt ====================================================================== From brad.king at kitware.com Tue Feb 10 09:56:24 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Feb 2015 09:56:24 -0500 Subject: [cmake-developers] FindRuby doesn't find 64-bit Ruby on Windows In-Reply-To: References: <54D52522.1090408@kitware.com> Message-ID: <54DA1C18.1080803@kitware.com> On 02/06/2015 06:00 PM, Michael Smith wrote: > New patch attached. Applied, thanks: FindRuby: Fix finding 64-bit Ruby on Windows http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5ef9271 -Brad From robert.maynard at kitware.com Tue Feb 10 09:56:11 2015 From: robert.maynard at kitware.com (Robert Maynard) Date: Tue, 10 Feb 2015 09:56:11 -0500 Subject: [cmake-developers] Fwd: [ANNOUNCE] CMake 3.1.2 Released In-Reply-To: <54D98681.408@cora.nwra.com> References: <54D79A1B.1000100@cora.nwra.com> <20150209180844.GA8736@megas.kitwarein.com> <54D98681.408@cora.nwra.com> Message-ID: So we can safely presume that the new features listed at https://gcc.gnu.org/gcc-5/changes.html will be the what gcc 5.0 will ship with? On Mon, Feb 9, 2015 at 11:18 PM, Orion Poplawski wrote: > On 02/09/2015 11:08 AM, Ben Boeckel wrote: >> >> On Mon, Feb 09, 2015 at 11:09:32 -0500, Robert Maynard wrote: >>>> >>>> We are pleased to announce that CMake 3.1.2 is now available for >>>> download. >>> >>> >>> >>> I'm getting this now building cmake 3.1.2 for Fedora Rawhide with gcc >>> 5.0.0: >>> >>> 32: Detecting CXX compile features - done >>> 32: Testing feature : cxx_aggregate_default_initializers >>> 32: Configuring >>> 32: CMake Error at CMakeLists.txt:70 (message): >>> 32: Feature cxx_aggregate_default_initializers expected not to work for >>> CXX >>> 32: GNU-5.0.0. >>> 32: >>> 32: Update the supported features or blacklist it. >>> >>> 32: Testing feature : cxx_relaxed_constexpr >>> 32: Configuring >>> 32: CMake Error at CMakeLists.txt:70 (message): >>> 32: Feature cxx_relaxed_constexpr expected not to work for CXX >>> GNU-5.0.0. >>> 32: >>> 32: Update the supported features or blacklist it. >>> >>> 32: Testing feature : cxx_variable_templates >>> 32: Configuring >>> 32: CMake Error at CMakeLists.txt:70 (message): >>> 32: Feature cxx_variable_templates expected not to work for CXX >>> GNU-5.0.0. >>> 32: >>> 32: Update the supported features or blacklist it. >> >> >> Yeah, the feature tables will need to be updated. I use Rawhide at home >> (was going to send an email about the tests as well) and was going to >> look at updating it there. However, it is still a pre-release build of >> GCC5, so we should probably just hold off on pushing something into >> master until an official release is made. >> >> --Ben >> > > According to > https://fedoraproject.org/wiki/Changes/GCC5#Detailed_Description : > > GCC 5 is currently in stage4 - prerelease state with only regression > bugfixes and documentation fixes allowed. > > So I think it's reasonable time to start adapting to it. > > > > -- > Orion Poplawski > Technical Manager 303-415-9701 x222 > NWRA/CoRA Division FAX: 303-415-9702 > 3380 Mitchell Lane orion at cora.nwra.com > Boulder, CO 80301 http://www.cora.nwra.com From brad.king at kitware.com Tue Feb 10 09:57:13 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Feb 2015 09:57:13 -0500 Subject: [cmake-developers] FindRuby doesn't find 64-bit Ruby on Windows In-Reply-To: References: <54D52522.1090408@kitware.com> <20150207004251.GA32439@bronto-burt.dev.benboeckel.net> Message-ID: <54DA1C49.8060507@kitware.com> On 02/06/2015 09:10 PM, Michael Smith wrote: > On Fri, Feb 6, 2015 at 4:42 PM, Ben Boeckel wrote: >> Doesn't work for cross-compiles. > > FindRuby is already querying ruby for libdir. How does that work > for cross-compiles but using some of the other config doesn't? That one doesn't work either, but we shouldn't add more cases. -Brad From brad.king at kitware.com Tue Feb 10 10:08:37 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Feb 2015 10:08:37 -0500 Subject: [cmake-developers] [PATCH] add --sphinx-qthelp command line argument to bootstrap script. In-Reply-To: <54D69060.40504@aeminium.org> References: <54D69060.40504@aeminium.org> Message-ID: <54DA1EF5.9020003@kitware.com> On 02/07/2015 05:23 PM, Nuno Sucena Almeida wrote: > --- > bootstrap | 8 ++++++++ > 1 file changed, 8 insertions(+) Thanks, applied: bootstrap: Add --sphinx-qthelp option to enable qthelp doc generation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85fd62ee -Brad From orion at cora.nwra.com Tue Feb 10 10:32:10 2015 From: orion at cora.nwra.com (Orion Poplawski) Date: Tue, 10 Feb 2015 08:32:10 -0700 Subject: [cmake-developers] Fwd: [ANNOUNCE] CMake 3.1.2 Released In-Reply-To: References: <54D79A1B.1000100@cora.nwra.com> <20150209180844.GA8736@megas.kitwarein.com> <54D98681.408@cora.nwra.com> Message-ID: <54DA247A.5080909@cora.nwra.com> On 02/10/2015 07:56 AM, Robert Maynard wrote: > So we can safely presume that the new features listed at > https://gcc.gnu.org/gcc-5/changes.html will be the what gcc 5.0 will > ship with? > That's how I read things. > > On Mon, Feb 9, 2015 at 11:18 PM, Orion Poplawski wrote: >> On 02/09/2015 11:08 AM, Ben Boeckel wrote: >>> >>> On Mon, Feb 09, 2015 at 11:09:32 -0500, Robert Maynard wrote: >>>>> >>>>> We are pleased to announce that CMake 3.1.2 is now available for >>>>> download. >>>> >>>> >>>> >>>> I'm getting this now building cmake 3.1.2 for Fedora Rawhide with gcc >>>> 5.0.0: >>>> >>>> 32: Detecting CXX compile features - done >>>> 32: Testing feature : cxx_aggregate_default_initializers >>>> 32: Configuring >>>> 32: CMake Error at CMakeLists.txt:70 (message): >>>> 32: Feature cxx_aggregate_default_initializers expected not to work for >>>> CXX >>>> 32: GNU-5.0.0. >>>> 32: >>>> 32: Update the supported features or blacklist it. >>>> >>>> 32: Testing feature : cxx_relaxed_constexpr >>>> 32: Configuring >>>> 32: CMake Error at CMakeLists.txt:70 (message): >>>> 32: Feature cxx_relaxed_constexpr expected not to work for CXX >>>> GNU-5.0.0. >>>> 32: >>>> 32: Update the supported features or blacklist it. >>>> >>>> 32: Testing feature : cxx_variable_templates >>>> 32: Configuring >>>> 32: CMake Error at CMakeLists.txt:70 (message): >>>> 32: Feature cxx_variable_templates expected not to work for CXX >>>> GNU-5.0.0. >>>> 32: >>>> 32: Update the supported features or blacklist it. >>> >>> >>> Yeah, the feature tables will need to be updated. I use Rawhide at home >>> (was going to send an email about the tests as well) and was going to >>> look at updating it there. However, it is still a pre-release build of >>> GCC5, so we should probably just hold off on pushing something into >>> master until an official release is made. >>> >>> --Ben >>> >> >> According to >> https://fedoraproject.org/wiki/Changes/GCC5#Detailed_Description : >> >> GCC 5 is currently in stage4 - prerelease state with only regression >> bugfixes and documentation fixes allowed. >> >> So I think it's reasonable time to start adapting to it. >> >> >> >> -- >> Orion Poplawski >> Technical Manager 303-415-9701 x222 >> NWRA/CoRA Division FAX: 303-415-9702 >> 3380 Mitchell Lane orion at cora.nwra.com >> Boulder, CO 80301 http://www.cora.nwra.com -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA/CoRA Division FAX: 303-415-9702 3380 Mitchell Lane orion at cora.nwra.com Boulder, CO 80301 http://www.cora.nwra.com From brad.king at kitware.com Tue Feb 10 11:01:20 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Feb 2015 11:01:20 -0500 Subject: [cmake-developers] BundleUtilities check exit code In-Reply-To: <54D8EB9B.50305@yahoo.com> References: <54D8EB9B.50305@yahoo.com> Message-ID: <54DA2B50.9050207@kitware.com> On 02/09/2015 12:17 PM, Ruslan Baratov via cmake-developers wrote: > This patch let do the check that exit code is 0, i.e. install_name_tool > exits successfully. Applied with minor refactoring: BundleUtilities: Teach fixup_bundle to check install_name_tool result http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a27c13f4 Please verify that this version of the change still works for you. Thanks, -Brad From ben.boeckel at kitware.com Tue Feb 10 16:19:46 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 10 Feb 2015 16:19:46 -0500 Subject: [cmake-developers] GCC5 and C++11 ABI In-Reply-To: <20150206181545.GA19141@megas.kitwarein.com> References: <20150206181545.GA19141@megas.kitwarein.com> Message-ID: <20150210211946.GA14232@megas.kitwarein.com> On Fri, Feb 06, 2015 at 13:15:45 -0500, Ben Boeckel wrote: > Looks like compiler_feature_detection will need to normalize the > _GLIBCXX_USE_CXX11_ABI preprocessor define as well: > > http://developerblog.redhat.com/2015/02/05/gcc5-and-the-c11-abi/ Followup (LWN comments will likely have interesting detail as well): https://lwn.net/Articles/632734/ --Ben From irwin at beluga.phys.uvic.ca Tue Feb 10 20:15:33 2015 From: irwin at beluga.phys.uvic.ca (Alan W. Irwin) Date: Tue, 10 Feb 2015 17:15:33 -0800 (PST) Subject: [cmake-developers] Fortran detection, issue 9220 In-Reply-To: <20150206152152.GB25916@megas.kitwarein.com> References: <54D458D3.6050705@grueninger.de> <20150206152152.GB25916@megas.kitwarein.com> Message-ID: On 2015-02-06 10:21-0500 Ben Boeckel wrote: > On Fri, Feb 06, 2015 at 07:01:55 +0100, Christoph Gr?ninger wrote: >> would you mind to tackle issue 9220 "enable_language(.... OPTIONAL) >> signature does not work correctly"? It's a shame that CMake cannot >> properly detect optional Fortran for more than 5 years! The workaround >> from Eigen works fine for me, but it's still embarrassing. >> >> BTW, is there a way to disable the optional Fortran by a flag to CMake? >> I couldn't find any... > > Here is a commit which I haven't worked on for a while which delays the > error until you request an actual build of a Fortran object: > > https://github.com/mathstuf/CMake/commit/880d783bf7fbd986b8a50a712e69ff40abbcfa07 > > While not the OPTIONAL signature, it is more accurate. Let me know how > it works for you. Some additional comments for both Christoph and Ben: This issue is for all language compilers, not just Fortran, and this issue is orthogonal to the well-known lack of support for Fortran in ninja. As the originator (almost 6 years ago) of this bug report I am still very much interested in a fundamental solution to give a WARNING message rather than an error if there is any issue with a compiler. That capability is fundamentally important for projects like PLplot that support more than one different compiled computer language (PLplot supports the compiled languages Ada, C, C++, Fortran, D, and Java) where the project developer's want users to at least have partial functionality if say the Ada compiler does not work. We do have a workaround (see early comments in http://public.kitware.com/Bug/view.php?id=9220 for details), but that approach is inefficient (you have to check compilers twice), and doesn't correctly propagate all the many different ways (e.g., environment variables, CMake cache variables) you can specify compilers and compiler flags to the special small CMake test build system used to check the compiler for each required compiled language. The most recent comment (by Brad King) at states the documentation has now been changed to state that OPTIONAL is a placeholder (in enable_language) that does not work. So at least OPTIONAL has now been clearly marked as defunct. Brad also recommends an alternative approach to using OPTIONAL in enable_language. I haven't had a chance to look into that possibility yet, but I will do so because an efficient and clean solution for providing a soft landing when a compiler test fails is important for the PLplot project. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ From mantis at public.kitware.com Tue Feb 10 20:43:49 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Tue, 10 Feb 2015 20:43:49 -0500 Subject: [cmake-developers] [CMake 0015401]: Cmake Xcode project generation doesn't support Swift language Message-ID: The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15401 ====================================================================== Reported By: Wojciech A. Koszek Assigned To: ====================================================================== Project: CMake Issue ID: 15401 Category: CMake Reproducibility: always Severity: tweak Priority: low Status: new ====================================================================== Date Submitted: 2015-02-10 20:43 EST Last Modified: 2015-02-10 20:43 EST ====================================================================== Summary: Cmake Xcode project generation doesn't support Swift language Description: I successfully use CMake for Xcode project generation. So I run cmake -GXcode followed by xcodebuild. It seems like right now cmake knows how to recognize .m files, but doesn't know how to handle .swift files. It would be great to teach it that. Steps to Reproduce: Tested on MacOSX Yosemite with cmake installed from "brew install cmake". cmake_minimum_required (VERSION 2.6) project (sample) add_executable(sample ../sample.swift) [wkoszek-macbook:~/github/macb/obj] wkoszek% cmake -GXcode -- Configuring done -- Generating done CMake Error: CMake can not determine linker language for target: sample CMake Error: CMake can not determine linker language for target: sample CMake Error: CMake can not determine linker language for target: sample CMake Error: CMake can not determine linker language for target: sample CMake Error: CMake can not determine linker language for target: sample CMake Error: CMake can not determine linker language for target: sample CMake Error: CMake can not determine linker language for target: sample CMake Error: CMake can not determine linker language for target: sample -- Build files have been written to: /Users/wkoszek/github/macb/obj ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-10 20:43 Wojciech A. KoszekNew Issue ====================================================================== From ben.boeckel at kitware.com Tue Feb 10 22:38:11 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 10 Feb 2015 22:38:11 -0500 Subject: [cmake-developers] Fortran detection, issue 9220 In-Reply-To: References: <54D458D3.6050705@grueninger.de> <20150206152152.GB25916@megas.kitwarein.com> Message-ID: <20150211033811.GA14710@bronto-burt.dev.benboeckel.net> On Tue, Feb 10, 2015 at 17:15:33 -0800, Alan W. Irwin wrote: > As the originator (almost 6 years ago) of this bug report I am still > very much interested in a fundamental solution to give a WARNING > message rather than an error if there is any issue with a compiler. This patch makes it only an error when Ninja detects a Fortran compiler rule being written (which is where the actual incompatibility lies). Other languages error out because CMake doesn't have *any* knowledge of how to build them. Java is kinda-sorta there IIRC. I haven't used it much, but I don't remember it feeling first-class. > That capability is fundamentally important for projects like PLplot > that support more than one different compiled computer language > (PLplot supports the compiled languages Ada, C, C++, Fortran, D, and > Java) You might be interested in the first-class D support here where I've been dabbling in some personal projects: https://github.com/trentforkert/cmake Other languages would need similar efforts to be fully supported. That said, putting logic behind enable_language(OPTIONAL) would be nice. --Ben From irwin at beluga.phys.uvic.ca Wed Feb 11 00:48:39 2015 From: irwin at beluga.phys.uvic.ca (Alan W. Irwin) Date: Tue, 10 Feb 2015 21:48:39 -0800 (PST) Subject: [cmake-developers] Fortran detection, issue 9220 In-Reply-To: <20150211033811.GA14710@bronto-burt.dev.benboeckel.net> References: <54D458D3.6050705@grueninger.de> <20150206152152.GB25916@megas.kitwarein.com> <20150211033811.GA14710@bronto-burt.dev.benboeckel.net> Message-ID: On 2015-02-10 22:38-0500 Ben Boeckel wrote: > On Tue, Feb 10, 2015 at 17:15:33 -0800, Alan W. Irwin wrote: >> As the originator (almost 6 years ago) of this bug report I am still >> very much interested in a fundamental solution to give a WARNING >> message rather than an error if there is any issue with a compiler. > > This patch makes it only an error when Ninja detects a Fortran compiler > rule being written (which is where the actual incompatibility lies). Sorry, but I still think the general Ninja problems with Fortran are orthogonal to this general language support issue. Or are you implying that enable_language(OPTIONAL) works for Ninja now for all languages other than Fortran? > Other languages error out because CMake doesn't have *any* knowledge of > how to build them. Java is kinda-sorta there IIRC. I haven't used it > much, but I don't remember it feeling first-class. I frankly don't understand this comment at all. I am sure you would agree with me that CMake has complete knowledge of how to build applications and libraries with a wide variety of compilers. So I probably just completely missed your point. > [...P]utting logic behind enable_language(OPTIONAL) would be nice. Agreed. It's probably an extremely tedious task to go through all the code paths (including all generators and all compiled languages) for modern CMake language support that are executed by the enable_language(... OPTIONAL) command, and change all potential CMake error exits to warnings for that case. And I don't have the C++ skill or knowledge of CMake internals to help out with this tedious task myself. So I completely understand why a fix for bug 9220 has still not been accomplished after all these years. But it sure is a "would be nice". Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ From stillcompiling at gmail.com Wed Feb 11 01:31:58 2015 From: stillcompiling at gmail.com (Joshua Clayton) Date: Tue, 10 Feb 2015 22:31:58 -0800 Subject: [cmake-developers] [PATCH] CPackRPM: Fix cross-building rpms In-Reply-To: References: <1423001041-20554-1-git-send-email-stillcompiling@gmail.com> Message-ID: I've finally had some time to read over the Tests section, and it is a bit overwhelming. I'm going to describe the use cases for my patch and perhaps you can give me some guidance on adding an actual test. There are three, maybe four use cases: 1) native rpm (e.g. x86_64) 2) noarch rpm (a noarch package should contain scripts, artwork, etc, but no compiled code) 3) a non-native, but compatible rpm (e.g. building x86 on a multilib x86_64 system) 4) incompatible cross-compiled package (e.g. building for arm or ppc) in each case the way you know it worked is a) "make package" successfully produces an rpm file b) running "rpm -qip my_rpm_file.my_arch.rpm returns a description of the rpm, including the line "Architecture: my_arch" On Tue, Feb 3, 2015 at 11:50 PM, Domen Vrankar wrote: >> Add the --target argument to rpmbuild >> Do not add a BuildArch variable to the spec file for arch specific packages >> BuildArch causes rpm building to fail except for "noarch" packages > > I'm not too familiar with cross compilation problems so could you > please also provide a simple test case to help with patch review? > > Thanks, > Domen From opensguser at web.de Wed Feb 11 04:19:16 2015 From: opensguser at web.de (opensguser at web.de) Date: Wed, 11 Feb 2015 10:19:16 +0100 Subject: [cmake-developers] [CMake 0014317]: Configuration dependent install EXPORT Message-ID: An HTML attachment was scrubbed... URL: From ruslan_baratov at yahoo.com Wed Feb 11 05:46:13 2015 From: ruslan_baratov at yahoo.com (Ruslan Baratov) Date: Wed, 11 Feb 2015 13:46:13 +0300 Subject: [cmake-developers] BundleUtilities check exit code In-Reply-To: <54DA2B50.9050207@kitware.com> References: <54D8EB9B.50305@yahoo.com> <54DA2B50.9050207@kitware.com> Message-ID: <54DB32F5.7050800@yahoo.com> On 10-Feb-15 19:01, Brad King wrote: > On 02/09/2015 12:17 PM, Ruslan Baratov via cmake-developers wrote: >> This patch let do the check that exit code is 0, i.e. install_name_tool >> exits successfully. > Applied with minor refactoring: > > BundleUtilities: Teach fixup_bundle to check install_name_tool result > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a27c13f4 > > Please verify that this version of the change still works for you. Thanks, version a27c13f4 catches error correctly. Ruslo From ben.boeckel at kitware.com Wed Feb 11 09:26:51 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 11 Feb 2015 09:26:51 -0500 Subject: [cmake-developers] Fortran detection, issue 9220 In-Reply-To: References: <54D458D3.6050705@grueninger.de> <20150206152152.GB25916@megas.kitwarein.com> <20150211033811.GA14710@bronto-burt.dev.benboeckel.net> Message-ID: <20150211142651.GA8848@bronto-burt.dev.benboeckel.net> On Tue, Feb 10, 2015 at 21:48:39 -0800, Alan W. Irwin wrote: > Sorry, but I still think the general Ninja problems with Fortran are > orthogonal to this general language support issue. Or are you > implying that enable_language(OPTIONAL) works for Ninja now for all > languages other than Fortran? No, I didn't have OPTIONAL at all. All the branch does is move the error case from "I need/want Fortran" to "I'm building this Fortran source file". > I frankly don't understand this comment at all. I am sure you would > agree with me that CMake has complete knowledge of how to build > applications and libraries with a wide variety of compilers. So I > probably just completely missed your point. CMake doesn't have any support for getting proper dependencies from Ada for example. So while you could use add_custom_command to *build* Ada files, build-time dependency scanning for things like #include or import without a reconfigure aren't supported. Supporting a language is more than just providing rules to build files of that type. > Agreed. It's probably an extremely tedious task to go through all the > code paths (including all generators and all compiled languages) for > modern CMake language support that are executed by the > enable_language(... OPTIONAL) command, and change all potential CMake > error exits to warnings for that case. And I don't have the C++ skill > or knowledge of CMake internals to help out with this tedious task > myself. So I completely understand why a fix for bug 9220 has still not been > accomplished after all these years. But it sure is a "would be nice". A sketch for anyone interested (probably still not complete, but it's things to look for): - change cmGlobalGenerator::EnableLanguage to return a bool; - add CMAKE__FOUND variables to indicate support for a language is available; - trigger an error when build rules for an unsupported language are encountered. The patch I referenced basically does the last bit for Ninja+Fortran. --Ben From brad.king at kitware.com Wed Feb 11 09:44:26 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Feb 2015 09:44:26 -0500 Subject: [cmake-developers] Fortran detection, issue 9220 In-Reply-To: <20150211142651.GA8848@bronto-burt.dev.benboeckel.net> References: <54D458D3.6050705@grueninger.de> <20150206152152.GB25916@megas.kitwarein.com> <20150211033811.GA14710@bronto-burt.dev.benboeckel.net> <20150211142651.GA8848@bronto-burt.dev.benboeckel.net> Message-ID: <54DB6ACA.8030806@kitware.com> On 02/11/2015 09:26 AM, Ben Boeckel wrote: > A sketch for anyone interested (probably still not complete, but it's > things to look for): > > - change cmGlobalGenerator::EnableLanguage to return a bool; > - add CMAKE__FOUND variables to indicate support for a language > is available; We already guarantee that CMAKE__COMPILER is set, so we could indicate failure simply by having it not set. Also one would need to decide what determines whether an optional language is not available. If a compiler is available but cannot compile binaries, should that be an error or tolerated as "not available"? As a user I would expect setting FC=/path/to/gfortran in my environment before calling CMake to cause Fortran to be enabled if the project wants it or else an error. > - trigger an error when build rules for an unsupported language are > encountered. We already treat unknown extensions like .txt files in most cases, so this would have to be specific to languages that were OPTIONAL and failed to be enabled. -Brad From brad.king at kitware.com Wed Feb 11 09:58:13 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Feb 2015 09:58:13 -0500 Subject: [cmake-developers] old policies interfering with script provided by CPack In-Reply-To: <54DA0FA2.5000007@kitware.com> References: <54DA0FA2.5000007@kitware.com> Message-ID: <54DB6E05.3080707@kitware.com> On 02/10/2015 09:03 AM, Brad King wrote: > On 02/09/2015 05:14 PM, Domen Vrankar wrote: >> To get around this problem I thought about wrapping the entire script with: >> >> cmake_policy(PUSH) >> cmake_policy(VERSION 3.1) >> cmake_policy(POP) >> >> Would this be an acceptable solution? > > That is currently the intended way to do it. I decided not to add a module-wide policy scope just before a release in case it causes other problems. Instead I converted the fix to set the policy locally: CPackRPM: Do not run file(GLOB_RECURSE) without CMP0009 set to NEW http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be36bfd6 Please verify this still works for the original problem. Thanks, -Brad From ben.boeckel at kitware.com Wed Feb 11 10:27:21 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 11 Feb 2015 10:27:21 -0500 Subject: [cmake-developers] Fortran detection, issue 9220 In-Reply-To: <54DB6ACA.8030806@kitware.com> References: <54D458D3.6050705@grueninger.de> <20150206152152.GB25916@megas.kitwarein.com> <20150211033811.GA14710@bronto-burt.dev.benboeckel.net> <20150211142651.GA8848@bronto-burt.dev.benboeckel.net> <54DB6ACA.8030806@kitware.com> Message-ID: <20150211152721.GA3561@megas.kitwarein.com> On Wed, Feb 11, 2015 at 09:44:26 -0500, Brad King wrote: > We already guarantee that CMAKE__COMPILER is set, so we could indicate > failure simply by having it not set. Well, the problem is that that is valid in Ninja. It might be available, but it isn't going to be useful. > Also one would need to decide what determines whether an optional language > is not available. If a compiler is available but cannot compile binaries, > should that be an error or tolerated as "not available"? As a user I would > expect setting FC=/path/to/gfortran in my environment before calling CMake > to cause Fortran to be enabled if the project wants it or else an error. I guess there are two different issues here. Some projects want Fortran if available (or even to just see whether it is available) while Ninja needs to error out on Fortran because it just can't get the build correct. So, IMO, my patch should be completely orthogonal to the OPTIONAL keyword logic; Ninja doesn't care whether you have Fortran or not, it just can't build it for you. > We already treat unknown extensions like .txt files in most cases, so > this would have to be specific to languages that were OPTIONAL and failed > to be enabled. Hrm. Yeah, that could be tricky. --Ben From gjasny at googlemail.com Wed Feb 11 14:48:43 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Wed, 11 Feb 2015 20:48:43 +0100 Subject: [cmake-developers] [PATCH] Add support for Generator Expressions within XCODE_ATTRIBUTE target properties In-Reply-To: <54CA39FD.8000700@kitware.com> References: <54CA39FD.8000700@kitware.com> Message-ID: <1423684123-38006-1-git-send-email-gjasny@googlemail.com> Signed-off-by: Gregor Jasny --- Help/prop_tgt/XCODE_ATTRIBUTE_an-attribute.rst | 6 ++++++ Source/cmGlobalXCodeGenerator.cxx | 5 ++++- Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 1 + Tests/RunCMake/XcodeProject/XcodeAttributeGenex-check.cmake | 6 ++++++ Tests/RunCMake/XcodeProject/XcodeAttributeGenex.cmake | 4 ++++ 5 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 Tests/RunCMake/XcodeProject/XcodeAttributeGenex-check.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeAttributeGenex.cmake diff --git a/Help/prop_tgt/XCODE_ATTRIBUTE_an-attribute.rst b/Help/prop_tgt/XCODE_ATTRIBUTE_an-attribute.rst index de98c37..d978676 100644 --- a/Help/prop_tgt/XCODE_ATTRIBUTE_an-attribute.rst +++ b/Help/prop_tgt/XCODE_ATTRIBUTE_an-attribute.rst @@ -8,3 +8,9 @@ the generated Xcode project. Ignored on other generators. See the :variable:`CMAKE_XCODE_ATTRIBUTE_` variable to set attributes on all targets in a directory tree. + +Contents of ``CMAKE_XCODE_ATTRIBUTE_`` may use +"generator expressions" with the syntax ``$<...>``. See the +:manual:`cmake-generator-expressions(7)` manual for available +expressions. See the :manual:`cmake-buildsystem(7)` manual +for more on defining buildsystem properties. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 30ed134..1f0a345 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2436,8 +2436,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, if (!attribute.empty()) { + cmListFileBacktrace backtrace = this->CurrentMakefile->GetBacktrace(); + cmGeneratorExpression ge(&backtrace); + std::string processed = ge.Parse(i->second.GetValue())->Evaluate(this->CurrentMakefile, configName); buildSettings->AddAttribute(attribute.c_str(), - this->CreateString(i->second.GetValue())); + this->CreateString(processed)); } } } diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 8e4026b..35ff5df 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -1,3 +1,4 @@ include(RunCMake) run_cmake(XcodeFileType) +run_cmake(XcodeAttributeGenex) diff --git a/Tests/RunCMake/XcodeProject/XcodeAttributeGenex-check.cmake b/Tests/RunCMake/XcodeProject/XcodeAttributeGenex-check.cmake new file mode 100644 index 0000000..4f4ba0c --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeAttributeGenex-check.cmake @@ -0,0 +1,6 @@ +set(expect "TEST_HOST = \"${RunCMake_TEST_BINARY_DIR}/.*/some\"") +file(STRINGS ${RunCMake_TEST_BINARY_DIR}/XcodeAttributeGenex.xcodeproj/project.pbxproj actual + REGEX "TEST_HOST = .*;" LIMIT_COUNT 1) +if(NOT "${actual}" MATCHES "${expect}") + message(SEND_ERROR "does not match '${expect}':\n ${actual}") +endif() diff --git a/Tests/RunCMake/XcodeProject/XcodeAttributeGenex.cmake b/Tests/RunCMake/XcodeProject/XcodeAttributeGenex.cmake new file mode 100644 index 0000000..760b882 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeAttributeGenex.cmake @@ -0,0 +1,4 @@ +enable_language(C) +add_executable(some main.c) +add_executable(another main.c) +set_property(TARGET another PROPERTY XCODE_ATTRIBUTE_TEST_HOST "$") -- 2.3.0 From irwin at beluga.phys.uvic.ca Wed Feb 11 14:54:45 2015 From: irwin at beluga.phys.uvic.ca (Alan W. Irwin) Date: Wed, 11 Feb 2015 11:54:45 -0800 (PST) Subject: [cmake-developers] Fortran detection, issue 9220 In-Reply-To: <54DB6ACA.8030806@kitware.com> References: <54D458D3.6050705@grueninger.de> <20150206152152.GB25916@megas.kitwarein.com> <20150211033811.GA14710@bronto-burt.dev.benboeckel.net> <20150211142651.GA8848@bronto-burt.dev.benboeckel.net> <54DB6ACA.8030806@kitware.com> Message-ID: On 2015-02-11 09:44-0500 Brad King wrote: > Also one would need to decide what determines whether an optional language > is not available. If a compiler is available but cannot compile binaries, > should that be an error or tolerated as "not available"? As a user I would > expect setting FC=/path/to/gfortran in my environment before calling CMake > to cause Fortran to be enabled if the project wants it or else an error. Tolerated with a warning please. Unsophisticated users could have environment variables set that they are completely unaware of. And I have run across scientific users of Fortran who assumed that Fortran compiler options (which can be set either with the FC variable or FFLAGS) were universal regardless of compiler (so they were inadvertently attempting to use some exotic solaris fortran compiler options for gfortran). >From these experiences with unsophisticated compiler users, my own feeling is OPTIONAL should mean just that, i.e., warn instead of error out for all cases. That's how we currently deploy the workaround for PLplot, and I have never had a user complaint about getting those soft landings when a compiler didn't work properly. (Maybe because our warning messages are really obvious when a compiler does not work.) Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ From domen.vrankar at gmail.com Wed Feb 11 15:12:28 2015 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Wed, 11 Feb 2015 21:12:28 +0100 Subject: [cmake-developers] old policies interfering with script provided by CPack In-Reply-To: <54DB6E05.3080707@kitware.com> References: <54DA0FA2.5000007@kitware.com> <54DB6E05.3080707@kitware.com> Message-ID: > I decided not to add a module-wide policy scope just before a release > in case it causes other problems. Instead I converted the fix to set > the policy locally: > > CPackRPM: Do not run file(GLOB_RECURSE) without CMP0009 set to NEW > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be36bfd6 > > Please verify this still works for the original problem. Patch fixes the problem. Thanks, Domen From mantis at public.kitware.com Wed Feb 11 16:36:44 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Wed, 11 Feb 2015 16:36:44 -0500 Subject: [cmake-developers] [CMake 0015402]: Add localization to CPack Bundle generator Message-ID: The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15402 ====================================================================== Reported By: Jason Erb Assigned To: ====================================================================== Project: CMake Issue ID: 15402 Category: CPack Reproducibility: have not tried Severity: feature Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-11 16:36 EST Last Modified: 2015-02-11 16:36 EST ====================================================================== Summary: Add localization to CPack Bundle generator Description: 1. Allow licenses in multiple languages to be added, causing the SLA dialog to show the language selector (whereby the license and all text in the dialog are shown in the selected language). Currently, only English is supported (hard-coded), and I need to hack this by setting CPACK_COMMAND_REZ to a script that replaces sla.r with my own. 2. Allow the name of the Applications alias to be specified via a CPACK variable. In order to name this " " (which is language-agnostic), I need to hack this by setting CPACK_COMMAND_HDIUTIL to a script that, if creating, renames the Application alias. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-11 16:36 Jason Erb New Issue ====================================================================== From mantis at public.kitware.com Wed Feb 11 21:03:24 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Wed, 11 Feb 2015 18:03:24 -0800 Subject: [cmake-developers] [CMake 0015403]: configure_file documentation could be more useful by specifing exactly where the files are generated Message-ID: <5a0de9a0aec9d582b31fff476ee72598@www.cmake.org> The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15403 ====================================================================== Reported By: Laurent Demailly Assigned To: ====================================================================== Project: CMake Issue ID: 15403 Category: CMake Reproducibility: always Severity: text Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-11 18:03 PST Last Modified: 2015-02-11 18:03 PST ====================================================================== Summary: configure_file documentation could be more useful by specifing exactly where the files are generated Description: configure_file doc's ( http://www.cmake.org/cmake/help/v3.1/command/configure_file.html ) would be more useful if we changed "If is a relative path it is evaluated with respect to the current binary directory." to one of "If is a relative path it is evaluated with respect to the current binary directory (CMAKE_CURRENT_BINARY_DIR)" or "If is a relative path it is evaluated with respect to the current binary directory (PROJECT_BINARY_DIR)" or whichever _BINARY_DIR is the correct one (which is also not super clear in the doc of those) Adding an example of which include_directories to use to use said generated file (which is often a .h) would be great (a bit like http://www.cmake.org/cmake-tutorial/ ) ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-11 18:03 Laurent DemaillyNew Issue ====================================================================== From foss at grueninger.de Thu Feb 12 02:28:16 2015 From: foss at grueninger.de (=?windows-1252?Q?Christoph_Gr=FCninger?=) Date: Thu, 12 Feb 2015 08:28:16 +0100 Subject: [cmake-developers] Fortran detection, issue 9220 In-Reply-To: References: <54D458D3.6050705@grueninger.de> <20150206152152.GB25916@megas.kitwarein.com> <20150211033811.GA14710@bronto-burt.dev.benboeckel.net> <20150211142651.GA8848@bronto-burt.dev.benboeckel.net> <54DB6ACA.8030806@kitware.com> Message-ID: <54DC5610.9060100@grueninger.de> Hi! I second Alan's view. The test should warn when it fails but still keep running. This includes Ninja, which would warn but still run through. I would like to get a variable _WORKS for every enable_language( OPTIONAL). Then I could disable features that depends on that specific language. Should I open a new bug or summarize our discussion in issue #9220? Best, Christoph -- When you die, that does not mean that you lose to cancer, you beat cancer by how you live, why you live, and in the manner in which you live. -- Stuart Scott, 1965-2015 From irwin at beluga.phys.uvic.ca Thu Feb 12 04:51:15 2015 From: irwin at beluga.phys.uvic.ca (Alan W. Irwin) Date: Thu, 12 Feb 2015 01:51:15 -0800 (PST) Subject: [cmake-developers] Fortran detection, issue 9220 In-Reply-To: <54DB6ACA.8030806@kitware.com> References: <54D458D3.6050705@grueninger.de> <20150206152152.GB25916@megas.kitwarein.com> <20150211033811.GA14710@bronto-burt.dev.benboeckel.net> <20150211142651.GA8848@bronto-burt.dev.benboeckel.net> <54DB6ACA.8030806@kitware.com> Message-ID: Here is one more extremely simple idea for solving this bug. Assuming all of CMake always errors out using the same piece of error-processing code, couldn't enable_language(OPTIONAL) immediately set an internal variable which is honored by that error-processing code to turn all further errors into warnings? Then the last thing enable_language(OPTIONAL) should do is unset that variable (so all further errors are treated as errors) before returning control to the logic that called enable_language(OPTIONAL). Of course, this idea depends on the assumption that all CMake errors are handled by the same piece of error-processing code, but if that is true this fix should be extremely easy to implement. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ From mantis at public.kitware.com Thu Feb 12 05:17:15 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Thu, 12 Feb 2015 05:17:15 -0500 Subject: [cmake-developers] [CMake 0015404]: cmake dos not set CMAKE_RC_FLAGS to include the platform defines like WIN32_WCE UNDER_CE etc. Message-ID: <5b8f38411260233589f83c062e7a9e21@www.cmake.org> The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15404 ====================================================================== Reported By: Gunnar Roth Assigned To: ====================================================================== Project: CMake Issue ID: 15404 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-12 05:17 EST Last Modified: 2015-02-12 05:17 EST ====================================================================== Summary: cmake dos not set CMAKE_RC_FLAGS to include the platform defines like WIN32_WCE UNDER_CE etc. Description: when people use things like #idef UNDER_CE in the .rc files it is not recognised as being defined because cmake dos not set CMAKE_RC_FLAGS to include the platform defines like WIN32_WCE UNDER_CE etc. my proposal is to patch windows-msvc.cmake like this: set(_RTC1 "") set(_FLAGS_CXX " /GR /EHsc") set(CMAKE_C_STANDARD_LIBRARIES_INIT "coredll.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib") set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:oldnames.lib") - + set(CMAKE_RC_FLAGS "${_PLATFORM_DEFINES} ${_PLATFORM_DEFINES_C}") + if (MSVC_VERSION LESS 1600) set(CMAKE_C_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT} corelibc.lib") endif () i had the task to report this issue on my list for a very long time now. finally done. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-12 05:17 Gunnar Roth New Issue ====================================================================== From raffi.enficiaud at free.fr Thu Feb 12 11:19:28 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Thu, 12 Feb 2015 17:19:28 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54D222A4.7090500@kitware.com> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> Message-ID: <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> Dear Brad, Please find attached the reworked patch + some more log in case of error of the matlab unit tests. I rebased the work on master rev 09cdcc5 and squashed the patch as you required. > Use Windows Task Scheduler to run a .bat script that runs ctest on the > dashboard script you create. I use Atlassian bamboo. It is really just running the commands in the page you mentioned with -DCMake_TEST_FindMatlab=1, right? I can test against several environment if you would like. I will start tomorrow. Regards, Raffi Enficiaud -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Implementation-of-the-new-FindMatlab-module.patch Type: application/octet-stream Size: 67271 bytes Desc: not available URL: -------------- next part -------------- From brad.king at kitware.com Thu Feb 12 13:00:23 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Feb 2015 13:00:23 -0500 Subject: [cmake-developers] [CMake 0014317]: Configuration dependent install EXPORT In-Reply-To: References: Message-ID: <54DCEA37.4050406@kitware.com> On 02/11/2015 04:19 AM, opensguser at web.de wrote: > Is there any chance the feature to support genex in DESTINATION the > install() command will be added? I've implemented it for install(TARGETS): http://www.cmake.org/Bug/view.php?id=14317#c37959 That is the important one AFAICT. For other install() commands more work would be needed because they do not all already have per-config actions. -Brad From brad.king at kitware.com Thu Feb 12 13:03:39 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Feb 2015 13:03:39 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> Message-ID: <54DCEAFB.6030100@kitware.com> On 02/12/2015 11:19 AM, Raffi Enficiaud wrote: > Please find attached the reworked patch Thanks. I'll take a look when I get a chance. >> Use Windows Task Scheduler to run a .bat script that runs ctest on the >> dashboard script you create. > > It is really just running the commands in the page you mentioned with > -DCMake_TEST_FindMatlab=1, right? The definition needs to be put in the cache of the CMake build itself, not passed to the ctest script. To do that, add: set(dashboard_cache " CMake_TEST_FindMatlab:BOOL=ON ") before including the common script. Thanks, -Brad From brad.king at kitware.com Thu Feb 12 13:37:02 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Feb 2015 13:37:02 -0500 Subject: [cmake-developers] [PATCH] Add support for Generator Expressions within XCODE_ATTRIBUTE target properties In-Reply-To: <1423684123-38006-1-git-send-email-gjasny@googlemail.com> References: <54CA39FD.8000700@kitware.com> <1423684123-38006-1-git-send-email-gjasny@googlemail.com> Message-ID: <54DCF2CE.1060004@kitware.com> On 02/11/2015 02:48 PM, Gregor Jasny wrote: > Signed-off-by: Gregor Jasny Thanks. Applied with minor updates and a test for the error case: Xcode: Teach XCODE_ATTRIBUTE target properties about generator expressions http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf8f9c29 -Brad From raffi.enficiaud at free.fr Thu Feb 12 17:36:43 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Thu, 12 Feb 2015 23:36:43 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54DCEAFB.6030100@kitware.com> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DCEAFB.6030100@kitware.com> Message-ID: <189D4243-7D3E-457D-92D3-43BACEAF4687@free.fr> > On 12 Feb 2015, at 19:03, Brad King wrote: > > > The definition needs to be put in the cache of the CMake build itself, > not passed to the ctest script. To do that, add: > > set(dashboard_cache " > CMake_TEST_FindMatlab:BOOL=ON > ") > > before including the common script. > Good, I am trying this now. - Is there any convention for CTEST_SITE? Would "bambooagent.raffienficiaud" do? - What is the preferred configuration to test? Debug or Release? - Should I do some configuration on the dashboard? I have not found anything in particular, except for claiming sites. - What architectures should be tested? Thanks, Raffi Enficiaud From robert.maynard at kitware.com Thu Feb 12 17:41:57 2015 From: robert.maynard at kitware.com (Robert Maynard) Date: Thu, 12 Feb 2015 17:41:57 -0500 Subject: [cmake-developers] [ANNOUNCE] CMake 3.1.3 Released Message-ID: We are pleased to announce that CMake 3.1.3 is now available for download. Please use the latest release from our download page: http://www.cmake.org/download/ Thanks for your support! ------------------------------------------------------------------------- Changes in 3.1.3 since 3.1.2: Brad King (3): Do not call setlocale() globally in CMake applications (#15377) Add setlocale() calls around use of libarchive APIs (#14934, #15377) CMake 3.1.3 Nils Gladitz (1): Makefile: Fix regression in target-bound custom command COMMENT output From raffi.enficiaud at free.fr Fri Feb 13 05:10:13 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Fri, 13 Feb 2015 11:10:13 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <189D4243-7D3E-457D-92D3-43BACEAF4687@free.fr> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DCEAFB.6030100@kitware.com> <189D4243-7D3E-457D-92D3-43BACEAF4687@free.fr> Message-ID: <4AE66E07-D09D-48B7-A0B7-3A0928FB678F@free.fr> Hi, 3 build agents (lts14.04, osx10.9 and win7x64) are now running the nightly with the CMake_TEST_FindMatlab set to ON. The site name is bambooagent.raffienficiaud @ https://open.cdash.org/viewSite.php?siteid=11851&project=1¤ttime=1423789200 Please let me know if there is anything else I should do. Best regards, Raffi Enficiaud > On 12 Feb 2015, at 23:36, Raffi Enficiaud wrote: > > >> On 12 Feb 2015, at 19:03, Brad King wrote: >> >> >> The definition needs to be put in the cache of the CMake build itself, >> not passed to the ctest script. To do that, add: >> >> set(dashboard_cache " >> CMake_TEST_FindMatlab:BOOL=ON >> ") >> >> before including the common script. >> > > Good, I am trying this now. > > - Is there any convention for CTEST_SITE? Would "bambooagent.raffienficiaud" do? > - What is the preferred configuration to test? Debug or Release? > - Should I do some configuration on the dashboard? I have not found anything in particular, except for claiming sites. > - What architectures should be tested? > > Thanks, > Raffi Enficiaud > > > -- > > 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 From brad.king at kitware.com Fri Feb 13 08:58:39 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 13 Feb 2015 08:58:39 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <4AE66E07-D09D-48B7-A0B7-3A0928FB678F@free.fr> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DCEAFB.6030100@kitware.com> <189D4243-7D3E-457D-92D3-43BACEAF4687@free.fr> <4AE66E07-D09D-48B7-A0B7-3A0928FB678F@free.fr> Message-ID: <54DE030F.6020006@kitware.com> On 02/13/2015 05:10 AM, Raffi Enficiaud wrote: > 3 build agents (lts14.04, osx10.9 and win7x64) are now running the nightly with the CMake_TEST_FindMatlab set to ON. > The site name is bambooagent.raffienficiaud @ https://open.cdash.org/viewSite.php?siteid=11851&project=1¤ttime=1423789200 Those look great! The one test failure on Windows may be because the total path length gets too deep and exceeds some internal MS tool limits of 260 characters. Please move the build to somewhere with a shorter path. Usually I keep mine under 55 characters or so to the top of the build tree. In the two that use the "Unix Makefiles" generator you can also add set(CTEST_BUILD_FLAGS "-j4") # parallel build level In all three dashboard scripts you could add: set(CTEST_TEST_ARGS PARALLEL_LEVEL 4) to get tests to run in parallel. Of course you can set the levels based on the available hardware on each machine. On 02/12/2015 05:36 PM, Raffi Enficiaud wrote:> > - Is there any convention for CTEST_SITE? Would "bambooagent.raffienficiaud" do? Yes. > - What is the preferred configuration to test? Debug or Release? The Debug you chose will be fine. > - Should I do some configuration on the dashboard? I have not found > anything in particular, except for claiming sites. Nothing more for you. Once these builds have shown up consistently for a few days I'll move them to the Nightly Expected section. > - What architectures should be tested? Anyplace that FindMatlab should be covered. I think the three you've started look good. Thanks, -Brad From raffi.enficiaud at free.fr Fri Feb 13 09:04:00 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Fri, 13 Feb 2015 15:04:00 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54DE030F.6020006@kitware.com> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DCEAFB.6030100@kitware.com> <189D4243-7D3E-457D-92D3-43BACEAF4687@free.fr> <4AE66E07-D09D-48B7-A0B7-3A0928FB678F@free.fr> <54DE030F.6020006@kitware.com> Message-ID: <5EED8DC2-F524-44F0-9D05-9965BD49A30A@free.fr> > On 13 Feb 2015, at 14:58, Brad King wrote: > > On 02/13/2015 05:10 AM, Raffi Enficiaud wrote: >> 3 build agents (lts14.04, osx10.9 and win7x64) are now running the nightly with the CMake_TEST_FindMatlab set to ON. >> The site name is bambooagent.raffienficiaud @ https://open.cdash.org/viewSite.php?siteid=11851&project=1¤ttime=1423789200 > > Those look great! > > The one test failure on Windows may be because the total path length > gets too deep and exceeds some internal MS tool limits of 260 characters. > Please move the build to somewhere with a shorter path. Usually I keep > mine under 55 characters or so to the top of the build tree. Args! I'll try to reconfigure the agent temporary build path then, but not before next week I am afraid. > > In the two that use the "Unix Makefiles" generator you can also add > > set(CTEST_BUILD_FLAGS "-j4") # parallel build level > > In all three dashboard scripts you could add: > > set(CTEST_TEST_ARGS PARALLEL_LEVEL 4) > > to get tests to run in parallel. Of course you can set the levels > based on the available hardware on each machine. I'll do that! Looks that things are on good tracks then, Thanks for driving this, Raffi Enficiaud From brad.king at kitware.com Fri Feb 13 09:33:37 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 13 Feb 2015 09:33:37 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> Message-ID: <54DE0B41.5080000@kitware.com> On 02/12/2015 11:19 AM, Raffi Enficiaud wrote: > Please find attached the reworked patch Great, thanks. Now that we have the nightly testing worked out I've committed this with minor tweaks as a draft of the change for testing: FindMatlab: Rewrite module and provide a usage API http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c7710e9 I have a few more comments to be addressed before merge to 'master'. You can base further patches on the above-linked commit. * Why is Matlab_VERSION_STRING cached? Shouldn't it be computed every time from the matlab that was found? * No find modules ever REALPATH the found values in case the user has a reason to keep the symlinks. Why do we need to resolve symlinks in Matlab_MAIN_PROGRAM? * Several if() calls are using explicit ${VAR} variable dereferences. Those should be converted to just if(VAR ...) to allow if() to implicitly dereference them and avoid surprises when their value happens to name another variable. * I will remove the conditions on CMAKE_VERSION in the final upstream version because we know it always runs with the current CMake version. You'll have to maintain a small patch on your external copy of the module for use with older CMake versions. Thanks, -Brad From raffi.enficiaud at free.fr Fri Feb 13 09:43:41 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Fri, 13 Feb 2015 15:43:41 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54DE0B41.5080000@kitware.com> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> Message-ID: <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> Hi, My comments below: > On 13 Feb 2015, at 15:33, Brad King wrote: > > On 02/12/2015 11:19 AM, Raffi Enficiaud wrote: >> Please find attached the reworked patch > > Great, thanks. Now that we have the nightly testing worked out I've > committed this with minor tweaks as a draft of the change for testing: > > FindMatlab: Rewrite module and provide a usage API > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c7710e9 > > I have a few more comments to be addressed before merge to 'master'. > You can base further patches on the above-linked commit. > > * Why is Matlab_VERSION_STRING cached? Shouldn't it be computed > every time from the matlab that was found? In case the version is not found with an obvious method (on OSX /Applications/MATLABVersion, on Win32, the version also is given by the registry key), we have to find the version of matlab by running matlab itself. I am caching the version once I have it to prevent any further execution of matlab for retrieving this information. Launching Matlab is kind of heavy, involving also network connection sometimes (due to floating license). > > * No find modules ever REALPATH the found values in case the user > has a reason to keep the symlinks. Why do we need to resolve > symlinks in Matlab_MAIN_PROGRAM? In case a symlink of the binary called "matlab" exists in /usr/local/bin for instance, I need to retrieve the path of the libraries mex, mx etc, that are relative to the real installation path of matlab. This is what is happening in my institute, the installation being made on a netshare by IT ppl, that can switch the version in demand. When matlab is launched from a symlink, it is executed in its installation path anyway (the matlab program is a stub to another script), so I need also this piece of information. > > * Several if() calls are using explicit ${VAR} variable dereferences. > Those should be converted to just if(VAR ...) to allow if() to > implicitly dereference them and avoid surprises when their value > happens to name another variable. Ok will do. > > * I will remove the conditions on CMAKE_VERSION in the final upstream > version because we know it always runs with the current CMake > version. You'll have to maintain a small patch on your external > copy of the module for use with older CMake versions. No problem, hope the informations above are clear enough and justify the choices made. Thanks, Raffi Enficiaud From brad.king at kitware.com Fri Feb 13 10:36:57 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 13 Feb 2015 10:36:57 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> Message-ID: <54DE1A19.8050403@kitware.com> On 02/13/2015 09:43 AM, Raffi Enficiaud wrote: >> * Why is Matlab_VERSION_STRING cached? Shouldn't it be computed >> every time from the matlab that was found? > > In case the version is not found with an obvious method > (on OSX /Applications/MATLABVersion, on Win32, the version also is > given by the registry key), we have to find the version of matlab > by running matlab itself. I am caching the version once I have it > to prevent any further execution of matlab for retrieving this > information. Okay. Currently the value is user-facing, but it shouldn't ever be edited manually, right? Instead the detected version could be cached in an INTERNAL cache entry. Also there should be a second internal entry that records which matlab program was executed to compute the version. If the latter does not match then the version should be re-computed. > In case a symlink of the binary called "matlab" exists in /usr/local/bin > for instance, I need to retrieve the path of the libraries mex, mx etc, > that are relative to the real installation path of matlab. In that case I think you should look for those pieces relative to the original executable location first, and if not found then resolve symlinks into a temporary variable name and then use that. The resolved path should not be made user-facing so that any user that sets Matlab_MAIN_PROGRAM explicitly will see that value persist. Thanks, -Brad From mantis at public.kitware.com Fri Feb 13 10:49:31 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Fri, 13 Feb 2015 10:49:31 -0500 Subject: [cmake-developers] [CMake 0015405]: Undefined behavior when introducing CMAKE_EXTRA_GENERATOR over a plain generator Message-ID: <93142075b08c51f571c4c942f942f001@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15405 ====================================================================== Reported By: CrumblingStatue Assigned To: ====================================================================== Project: CMake Issue ID: 15405 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-13 10:49 EST Last Modified: 2015-02-13 10:49 EST ====================================================================== Summary: Undefined behavior when introducing CMAKE_EXTRA_GENERATOR over a plain generator Description: If I generate a CodeBlocks build over a plain one, the generated .cbp file is missing entries that are present when generating a CodeBlocks build in a clean directory. The question is, is it valid to introduce extra generators over a plain one, and this is a bug with the CodeBlocks generator, or is it invalid, in which case it should fail with a descriptive error message instead of silently generating incorrect results. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-13 10:49 CrumblingStatueNew Issue ====================================================================== From brad.king at kitware.com Fri Feb 13 10:57:14 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 13 Feb 2015 10:57:14 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54DE0B41.5080000@kitware.com> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> Message-ID: <54DE1EDA.4040407@kitware.com> On 02/13/2015 09:33 AM, Brad King wrote: > FindMatlab: Rewrite module and provide a usage API > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c7710e9 > > I have a few more comments to be addressed before merge to 'master'. > You can base further patches on the above-linked commit. I had to add two commits to the topic to fix some continuous testing failures: FindMatlab: Fix ModuleNotices test for MatlabTestsRedirect http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba3057ef FindMatlab: Quote variable references in macro calls http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e91eb43 Please rebase further work on commit 5e91eb43. I will squash all this together later before merging to 'master'. Thanks, -Brad From raffi.enficiaud at free.fr Fri Feb 13 11:08:12 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Fri, 13 Feb 2015 17:08:12 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54DE1A19.8050403@kitware.com> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> Message-ID: <8F38EEE0-ABC1-44B6-8DBD-D6A64BA4833F@free.fr> Thanks for your feedback, I will address your comments this week-end. Regards, Raffi Enficiaud > On 13 Feb 2015, at 16:36, Brad King wrote: > > On 02/13/2015 09:43 AM, Raffi Enficiaud wrote: >>> * Why is Matlab_VERSION_STRING cached? Shouldn't it be computed >>> every time from the matlab that was found? >> >> In case the version is not found with an obvious method >> (on OSX /Applications/MATLABVersion, on Win32, the version also is >> given by the registry key), we have to find the version of matlab >> by running matlab itself. I am caching the version once I have it >> to prevent any further execution of matlab for retrieving this >> information. > > Okay. Currently the value is user-facing, but it shouldn't ever be > edited manually, right? Instead the detected version could be cached > in an INTERNAL cache entry. Also there should be a second internal > entry that records which matlab program was executed to compute the > version. If the latter does not match then the version should be > re-computed. > >> In case a symlink of the binary called "matlab" exists in /usr/local/bin >> for instance, I need to retrieve the path of the libraries mex, mx etc, >> that are relative to the real installation path of matlab. > > In that case I think you should look for those pieces relative to > the original executable location first, and if not found then > resolve symlinks into a temporary variable name and then use that. > The resolved path should not be made user-facing so that any user > that sets Matlab_MAIN_PROGRAM explicitly will see that value > persist. > > Thanks, > -Brad > From robert.maynard at kitware.com Fri Feb 13 15:12:33 2015 From: robert.maynard at kitware.com (Robert Maynard) Date: Fri, 13 Feb 2015 15:12:33 -0500 Subject: [cmake-developers] [ANNOUNCE] CMake 3.2.0-rc1 now ready for testing! Message-ID: I am proud to announce that CMake 3.2 has entered the release candidate stage. Sources and binaries are available at: http://www.cmake.org/download/ http://www.cmake.org/files/v3.2/?C=M;O=D Documentation is available at: http://www.cmake.org/cmake/help/v3.2 Release notes appear below and are also published at http://www.cmake.org/cmake/help/v3.2/release/3.2.html Some of the more significant features of CMake 3.2 are: * CMake learned to support unicode characters *encoded as UTF-8* on Windows. This was already supported on platforms whose system APIs accept UTF-8 encoded strings. Unicode characters may now be used in CMake code, paths to source files, configured files such as ".h.in" files, and other files read and written by CMake. Note that because CMake interoperates with many other tools, there may still be some limitations when using certain unicode characters. * The "Compile Features" functionality is now aware of features supported by more compilers, including: * Apple Clang ("AppleClang") for Xcode versions 4.4 though 6.1. * GNU compiler versions 4.4 through 5.0 on UNIX and Apple ("GNU"). * Microsoft Visual Studio ("MSVC") for versions 2010 through 2015. * Oracle SolarisStudio ("SunPro") version 12.4. * The "add_custom_command()" and "add_custom_target()" commands learned a new "BYPRODUCTS" option to specify files produced as side effects of the custom commands. These are not outputs because they do not always have to be newer than inputs. * The "file(GENERATE)" command can now generate files which are used as source files for buildsystem targets. Generated files automatically get their "GENERATED" property set to "TRUE". Deprecated and Removed Features: * Files written in the "cmake-language(7)", such as "CMakeLists.txt" or "*.cmake" files, are now expected to be encoded as UTF-8. If files are already ASCII, they will be compatible. If files were in a different encoding, including Latin 1, they will need to be converted. * The "FindOpenGL" module no longer explicitly searches for any dependency on X11 libraries with the "FindX11" module. Such dependencies should not need to be explicit. Applications using X11 APIs themselves should find and link to X11 libraries explicitly. CMake 3.2 Release Notes *********************** Changes made since CMake 3.1 include the following. New Features ============ Syntax ------ * CMake learned to support unicode characters *encoded as UTF-8* on Windows. This was already supported on platforms whose system APIs accept UTF-8 encoded strings. Unicode characters may now be used in CMake code, paths to source files, configured files such as ".h.in" files, and other files read and written by CMake. Note that because CMake interoperates with many other tools, there may still be some limitations when using certain unicode characters. Commands -------- * The "add_custom_command()" and "add_custom_target()" commands learned a new "BYPRODUCTS" option to specify files produced as side effects of the custom commands. These are not outputs because they do not always have to be newer than inputs. * The "add_custom_command()" and "add_custom_target()" commands learned a new "USES_TERMINAL" option to request that the command be given direct access to the terminal if possible. The "Ninja" generator will places such commands in the "console" "pool". Build targets provided by CMake that are meant for individual interactive use, such as "install", are now placed in this pool. * A new "continue()" command was added that can be called inside loop contexts to end the current iteration and start the next one at the top of the loop block. * The "file(LOCK)" subcommand was created to allow CMake processes to synchronize through file and directory locks. * The "file(STRINGS)" now supports UTF-16LE, UTF-16BE, UTF-32LE, UTF- 32BE as "ENCODING" options. * The "install(EXPORT)" command now works with an absolute "DESTINATION" even if targets in the export set are installed with a destination or *usage requirements* specified relative to the install prefix. The value of the "CMAKE_INSTALL_PREFIX" variable is hard-coded into the installed export file as the base for relative references. * The "try_compile()" command source file signature now honors link flags (e.g. "CMAKE_EXE_LINKER_FLAGS") in the generated test project. See policy "CMP0056". * The "try_run()" command learned to honor the "LINK_LIBRARIES" option just as "try_compile()" already does. * The "file(GENERATE)" command now generates the output file with the same permissions as the input file if set. * The "file(GENERATE)" command can now generate files which are used as source files for buildsystem targets. Generated files automatically get their "GENERATED" property set to "TRUE". Variables --------- * The "CMAKE_MATCH_COUNT" variable was introduced to record the number of matches made in the last regular expression matched in an "if()" command or a "string()" command. Properties ---------- * An "ANDROID_API_MIN" target property was introduced to specify the minimum version to be targeted by the toolchain. * A "VS_SHADER_FLAGS" source file property was added to specify additional shader flags to ".hlsl" files, for the Visual Studio generators. Modules ------- * The "ExternalData" module learned to support *Custom Fetch Scripts*. This allows projects to specify custom ".cmake" scripts for fetching data objects during the build. * The "ExternalProject" module learned options to create independent external project step targets that do not depend on the builtin steps. * The "ExternalProject" module "ExternalProject_Add()" command learned a new "CMAKE_CACHE_DEFAULT_ARGS" option to initialize cache values in the external project without setting them on future builds. * The "ExternalProject" module "ExternalProject_Add()" command learned a new "TEST_EXCLUDE_FROM_MAIN" option to exclude tests from the main build. * The "ExternalProject" module "ExternalProject_Add()" command learned a new "UPDATE_DISCONNECTED" option to avoid automatically updating the source tree checkout from version control. * The "FindCUDA" module learned about the "cusolver" library in CUDA 7.0. * The "FindGit" module learned to find the "git" command-line tool that comes with GitHub for Windows installed in user home directories. * A "FindGSL" module was introduced to find the GNU Scientific Library. * A "FindIntl" module was introduced to find the Gettext "libintl" library. * A "FindJsonCpp" module was introduced to find the JsonCpp package. * The "FindLATEX" module learned to support components. * The "FindMPI" module learned to find MS-MPI on Windows. * The "FindOpenSSL" module now reports "crypto" and "ssl" libraries separately in "OPENSSL_CRYPTO_LIBRARY" and "OPENSSL_SSL_LIBRARY", respectively, to allow applications to link to one without the other. * The "WriteCompilerDetectionHeader" module learned to create a define for portability of the "cxx_thread_local" feature. The define expands to either the C++11 "thread_local" keyword, or a pre- standardization compiler-specific equivalent, as appropriate. * The "WriteCompilerDetectionHeader" module learned to create multiple output files per compiler and per language, instead of creating one large file. CTest ----- * The "ctest_coverage()" command learned to support Delphi coverage. * The "ctest_coverage()" command learned to support Javascript coverage. * The "CTestCoverageCollectGCOV" module was introduced as an alternative to the "ctest_coverage()" command for collecting "gcov" results for submission to CDash. CPack ----- * The "CPackRPM" module learned options to set per-component descriptions and summaries. See the "CPACK_RPM__PACKAGE_DESCRIPTION" and "CPACK_RPM__PACKAGE_SUMMARY" variables. * The "CPackRPM" module learned options to specify requirements for pre- and post-install scripts. See the "CPACK_RPM_PACKAGE_REQUIRES_PRE" and "CPACK_RPM_PACKAGE_REQUIRES_POST" variables. * The "CPackRPM" module learned options to specify requirements for pre- and post-uninstall scripts. See the "CPACK_RPM_PACKAGE_REQUIRES_PREUN" and "CPACK_RPM_PACKAGE_REQUIRES_POSTUN" variables. * The "CPackRPM" module learned a new "CPACK_RPM__PACKAGE_PREFIX" variable to specify a component-specific value to use instead of "CPACK_PACKAGING_INSTALL_PREFIX". * The "CPackRPM" module learned a new "CPACK_RPM_RELOCATION_PATHS" variable to specify multiple relocation prefixes for a single rpm package. Other ----- * The "cmake(1)" "-E tar" command now supports creating ".xz"-compressed archives with the "J" flag. * The "cmake(1)" "-E tar" command learned a new "--files- from=" option to specify file names using lines in a file to overcome command-line length limits. * The "cmake(1)" "-E tar" command learned a new "--mtime=" option to specify the modification time recorded in tarball entries. * The "Compile Features" functionality is now aware of features supported by more compilers, including: * Apple Clang ("AppleClang") for Xcode versions 4.4 though 6.1. * GNU compiler versions 4.4 through 5.0 on UNIX and Apple ("GNU"). * Microsoft Visual Studio ("MSVC") for versions 2010 through 2015. * Oracle SolarisStudio ("SunPro") version 12.4. * The *AUTORCC* feature now tracks files listed in ".qrc" files as dependencies. If an input file to the "rcc" tool is changed, the tool is automatically re-run. New Diagnostics =============== * The "break()" command now rejects calls outside of a loop context or that pass arguments to the command. See policy "CMP0055". Deprecated and Removed Features =============================== * Files written in the "cmake-language(7)", such as "CMakeLists.txt" or "*.cmake" files, are now expected to be encoded as UTF-8. If files are already ASCII, they will be compatible. If files were in a different encoding, including Latin 1, they will need to be converted. * The "FindOpenGL" module no longer explicitly searches for any dependency on X11 libraries with the "FindX11" module. Such dependencies should not need to be explicit. Applications using X11 APIs themselves should find and link to X11 libraries explicitly. * The implementation of CMake now relies on some C++ compiler features which are not supported by some older compilers. As a result, those old compilers can no longer be used to build CMake itself. CMake continues to be able to generate Makefiles and project files for users of those old compilers however. Compilers known to no longer be capable of building CMake are: * Visual Studio 6 and 7.0 -- superseded by VisualStudio 7.1 and newer. * GCC 2.95 -- superseded by GCC 3 and newer compilers. * Borland compilers -- superseded by other Windows compilers. * Compaq compilers -- superseded by other compilers. * SGI compilers -- IRIX was dropped as a host platform. Other Changes ============= * On Windows and OS X, commands supporting network communication via "https", such as "file(DOWNLOAD)", "file(UPLOAD)", and "ctest_submit()", now support SSL/TLS even when CMake is not built against OpenSSL. The Windows or OS X native SSL/TLS implementation is used by default. OS-configured certificate authorities will be trusted automatically. On other platforms, when CMake is built with OpenSSL, these commands now search for OS-configured certificate authorities in a few "/etc" paths to be trusted automatically. * On OS X with Makefile and Ninja generators, when a compiler is found in "/usr/bin" it is now mapped to the corresponding compiler inside the Xcode application folder, if any. This allows such build trees to continue to work with their original compiler even when "xcode- select" switches to a different Xcode installation. * The Visual Studio generators now write solution and project files in UTF-8 instead of Windows-1252. Windows-1252 supported Latin 1 languages such as those found in North and South America and Western Europe. With UTF-8, additional languages are now supported. * The "Xcode" generator no longer requires a value for the "CMAKE_MAKE_PROGRAM" variable to be located up front. It now locates "xcodebuild" when needed at build time. * When building CMake itself using SolarisStudio 12, the default "libCStd" standard library is not sufficient to build CMake. The SolarisStudio distribution supports compiler options to use "STLPort4" or "libstdc++". An appropriate option to select the standard library is now added automatically when building CMake with SolarisStudio compilers. From aleixpol at kde.org Fri Feb 13 19:09:08 2015 From: aleixpol at kde.org (Aleix Pol) Date: Sat, 14 Feb 2015 01:09:08 +0100 Subject: [cmake-developers] Extracting target metadata, IDE integration In-Reply-To: References: <54C65C0F.9090902@kitware.com> Message-ID: On Thu, Feb 5, 2015 at 6:03 PM, Aleix Pol wrote: > On Mon, Feb 2, 2015 at 5:36 PM, Aleix Pol wrote: >> On Mon, Jan 26, 2015 at 9:15 PM, Tobias Hunger wrote: >>> I gave this patch a try with the cmake project data. >>> >>> I had hoped that this file would contain all the information an IDE >>> might need, but there seems quite a bit missing for that. E.g. there >>> is no information on which files are used to build a target. What am I >>> missing? >>> >>> Best Regards, >>> Tobias >>> >>> On Mon, Jan 26, 2015 at 4:23 PM, Brad King wrote: >>>> On 01/25/2015 08:26 AM, Tobias Hunger wrote: >>>>> I just had a bit of time to play with cmake this weekend: Is this >>>>> patch available somewhere by now? >>>> >>>> Aleix sent it in a message of this thread on 2015-01-09: >>>> >>>> http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10711/focus=12061 >>>> >>>> Some review comments elsewhere in this thread are still pending. >>>> >>>> -Brad >>>> >> >> It does provide them. For example [1]. >> >> Isn't that what you meant? >> >> Aleix >> >> [1] >> { >> "name": "kdevcmakebuilder", >> "type": "MODULE_LIBRARY", >> "configs": [ >> { >> "name": "debug", >> "sources": [ >> "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilder.cpp", >> "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakejob.cpp", >> "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/prunejob.cpp", >> "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilderpreferences.cpp", >> "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/ui_cmakebuildersettings.h", >> "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilderconfig.cpp", >> "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilderconfig.h", >> "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/kdevcmakebuilder_automoc.cpp", >> "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuildersettings.ui", >> "/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/cmakebuilderconfig.kcfgc" >> ] >> } >> ], >> "directory": >> "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder", >> "location": >> "/home/kde-devel/build-frameworks/kdevelop/projectbuilders/cmakebuilder/kdevcmakebuilder.so", >> "backtrace": >> ["/home/kde-devel/frameworks/kdevelop/projectbuilders/cmakebuilder/CMakeLists.txt:20"], >> "installed": true >> } > > Bump? > > Aleix Hi guys, It's been since August with this. I understand we're all busy but this step is important for KDevelop as well as for other IDE's and I wouldn't like this to rot. Please, let's keep it moving forward. Aleix From steveire at gmail.com Sat Feb 14 07:02:53 2015 From: steveire at gmail.com (Stephen Kelly) Date: Sat, 14 Feb 2015 13:02:53 +0100 Subject: [cmake-developers] Extracting target metadata, IDE integration References: <54C65C0F.9090902@kitware.com> Message-ID: Aleix Pol wrote: > Hi guys, > It's been since August with this. I understand we're all busy but this > step is important for KDevelop as well as for other IDE's and I > wouldn't like this to rot. > > Please, let's keep it moving forward. As far as I'm aware, it needs to move forward from this point: http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10711/focus=12151 I'm not certain the design is finished (eg what the file should contain now or eventually). I asked for tests/documentation as a way to trigger getting the design finished. Having either would give us a list of use-cases and we would know what's in scope and what's not in scope (eg whether compile options/link options are in scope and why). Another question: do you have any opinion about whether this should be one global file or one file per directory? I don't know - it seems like something that might or might not be relevant for tooling. Is the size of the generated file a consideration? How well does this feature work with large projects like VTK or a combined build of LLVM/Clang/lldb/libcxx/other ll projects. Thanks, Steve. From gjasny at googlemail.com Sat Feb 14 15:32:54 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sat, 14 Feb 2015 21:32:54 +0100 Subject: [cmake-developers] [PATCH 0/5] XCTest Bundles v3 Message-ID: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> Hello, I made some more progress with XCTest bundles. The major difference to the last patch series is that I don't set any target properties on the testee from within the generator anymore. Instead I utilizes some helper functions (in XCTestUtilities.cmake). This also sanitizes error handling because everything happens in Script context. For now I focussed on XCTest bundles for Frameworks because they are better testable than Cocoa App Bundles. I will add missing functionality to XCTestUtilities.cmake later. This won't require any new changes to the cmake binary because genrator expression for XCODE attributes were already merged. (Thanks Brad!). The first three patches add some plumbing to the cmake binary. The fourth one adds the helper and the last one the example. You could test the patches as follows: cd Tests/XCTest mkdir _build_make _build_xcode cd _build_make ../../../bin/cmake .. ../../../bin/cmake --build . ../../../bin/ctest --verbose cd ../_build_xcode ../../../bin/cmake -GXcode .. ../../../bin/cmake --build . --config Debug ../../../bin/ctest --verbose -C Debug (or within Xcode) open XCTestFramework.xcodeproj Select Framework.example scheme Product->Test (or CMD-U) View->Navigator->Test (CMD-5) I could need a helping hand with creating and wiring up tests for the patches. For example the Platform Framework search path: It should only get tested if the sysroot belongs to XCode 5 or later. I fear this is a rather complex condition to test for. It would be easier to check if the SDK is greater or equal to 10.9. Unfortunately the SDK version is not exported from Platform/Darwin.cmake. Similar for Tests/XCTest. One question about ctest: If I built cmake with command line make or ninja (which bootstraps far faster than Xcode), can I tell ctest to generate projects with Xcode? Or use a certain CMAKE_OSX_SYSROOT? Thanks, Gregor Gregor Jasny (5): Add handling for XCTest bundles Shorten CFBundleExecutable to file name only Also add Platform specific Frameworks to Darwin Framework search path Add XCTest helper utilities Add XCTest example to test Frameworks Help/manual/cmake-properties.7.rst | 1 + Help/prop_tgt/XCTEST.rst | 10 ++++ Modules/Platform/Darwin.cmake | 5 ++ Modules/XCTestUtilities.cmake | 58 ++++++++++++++++++++++ Source/cmGlobalXCodeGenerator.cxx | 12 ++++- Source/cmOSXBundleGenerator.cxx | 3 +- Source/cmTarget.cxx | 16 +++++- Source/cmTarget.h | 3 ++ Tests/XCTest/CMakeLists.txt | 38 ++++++++++++++ Tests/XCTest/FrameworkExample/FrameworkExample.c | 6 +++ Tests/XCTest/FrameworkExample/FrameworkExample.h | 1 + Tests/XCTest/FrameworkExample/Info.plist | 28 +++++++++++ .../FrameworkExampleTests/FrameworkExampleTests.m | 16 ++++++ Tests/XCTest/FrameworkExampleTests/Info.plist | 24 +++++++++ Tests/XcodePlatformFrameworks/CMakeLists.txt | 38 ++++++++++++++ 15 files changed, 255 insertions(+), 4 deletions(-) create mode 100644 Help/prop_tgt/XCTEST.rst create mode 100644 Modules/XCTestUtilities.cmake create mode 100644 Tests/XCTest/CMakeLists.txt create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.c create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.h create mode 100644 Tests/XCTest/FrameworkExample/Info.plist create mode 100644 Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m create mode 100644 Tests/XCTest/FrameworkExampleTests/Info.plist create mode 100644 Tests/XcodePlatformFrameworks/CMakeLists.txt -- 2.3.0 From gjasny at googlemail.com Sat Feb 14 15:32:55 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sat, 14 Feb 2015 21:32:55 +0100 Subject: [cmake-developers] [PATCH 1/5] Add handling for XCTest bundles In-Reply-To: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> References: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> Message-ID: <1423945979-17397-2-git-send-email-gjasny@googlemail.com> 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. add_library(CocoaExampleTest MODULE ...) set_target_properties(CocoaExampleTest PROPERTIES BUNDLE TRUE XCTEST TRUE) Signed-off-by: Gregor Jasny --- Help/manual/cmake-properties.7.rst | 1 + Help/prop_tgt/XCTEST.rst | 10 ++++++++++ Source/cmGlobalXCodeGenerator.cxx | 12 ++++++++++-- Source/cmTarget.cxx | 16 +++++++++++++++- Source/cmTarget.h | 3 +++ 5 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 Help/prop_tgt/XCTEST.rst diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 25f989f..d795c6e 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -243,6 +243,7 @@ Properties on Targets /prop_tgt/VS_WINRT_REFERENCES /prop_tgt/WIN32_EXECUTABLE /prop_tgt/XCODE_ATTRIBUTE_an-attribute + /prop_tgt/XCTEST Properties on Tests =================== diff --git a/Help/prop_tgt/XCTEST.rst b/Help/prop_tgt/XCTEST.rst new file mode 100644 index 0000000..3a3adf6 --- /dev/null +++ b/Help/prop_tgt/XCTEST.rst @@ -0,0 +1,10 @@ +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 depends on :prop_tgt:`BUNDLE` to be effective. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index aea134e..784bc24 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -804,6 +804,10 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext, { sourcecode = "compiled.mach-o.objfile"; } + else if(ext == "xctest") + { + sourcecode = "wrapper.cfbundle"; + } else if(ext == "xib") { keepLastKnownFileType = true; @@ -2598,7 +2602,9 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget) case cmTarget::STATIC_LIBRARY: return "archive.ar"; case cmTarget::MODULE_LIBRARY: - if (cmtarget.IsCFBundleOnApple()) + if (cmtarget.IsXCTestOnApple()) + return "wrapper.cfbundle"; + else if (cmtarget.IsCFBundleOnApple()) return "wrapper.plug-in"; else return ((this->XcodeVersion >= 22)? @@ -2622,7 +2628,9 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(cmTarget& cmtarget) case cmTarget::STATIC_LIBRARY: return "com.apple.product-type.library.static"; case cmTarget::MODULE_LIBRARY: - if (cmtarget.IsCFBundleOnApple()) + if (cmtarget.IsXCTestOnApple()) + return "com.apple.product-type.bundle.unit-test"; + else if (cmtarget.IsCFBundleOnApple()) return "com.apple.product-type.bundle"; else return ((this->XcodeVersion >= 22)? diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 526a923..6ce165a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -615,6 +615,13 @@ bool cmTarget::IsCFBundleOnApple() const } //---------------------------------------------------------------------------- +bool cmTarget::IsXCTestOnApple() const +{ + return (this->IsCFBundleOnApple() && + this->GetPropertyAsBool("XCTEST")); +} + +//---------------------------------------------------------------------------- bool cmTarget::IsBundleOnApple() const { return this->IsFrameworkOnApple() || this->IsAppBundleOnApple() || @@ -6781,7 +6788,14 @@ std::string cmTarget::GetCFBundleDirectory(const std::string& config, const char *ext = this->GetProperty("BUNDLE_EXTENSION"); if (!ext) { - ext = "bundle"; + if (this->IsXCTestOnApple()) + { + ext = "xctest"; + } + else + { + ext = "bundle"; + } } fpath += ext; fpath += "/Contents"; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index ddd9859..b58e0a0 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -526,6 +526,9 @@ public: /** Return whether this target is a CFBundle (plugin) on Apple. */ bool IsCFBundleOnApple() const; + /** Return whether this target is a XCTest on Apple. */ + bool IsXCTestOnApple() const; + /** Return whether this target is an executable Bundle on Apple. */ bool IsAppBundleOnApple() const; -- 2.3.0 From gjasny at googlemail.com Sat Feb 14 15:32:56 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sat, 14 Feb 2015 21:32:56 +0100 Subject: [cmake-developers] [PATCH 2/5] Shorten CFBundleExecutable to file name only In-Reply-To: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> References: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> Message-ID: <1423945979-17397-3-git-send-email-gjasny@googlemail.com> Shorten the CFBundleExecutable in the PList file of Bundles to the file name only as it is done for Frameworks, too. Signed-off-by: Gregor Jasny --- Source/cmOSXBundleGenerator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index 55e20ab..a8eef82 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -181,8 +181,9 @@ void cmOSXBundleGenerator::CreateCFBundle(const std::string& targetName, std::string plist = root + "/" + this->GT->Target->GetCFBundleDirectory(this->ConfigName, true); plist += "/Info.plist"; + std::string name = cmSystemTools::GetFilenameName(targetName); this->LocalGenerator->GenerateAppleInfoPList(this->GT->Target, - targetName, + name, plist.c_str()); this->Makefile->AddCMakeOutputFile(plist); } -- 2.3.0 From gjasny at googlemail.com Sat Feb 14 15:32:57 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sat, 14 Feb 2015 21:32:57 +0100 Subject: [cmake-developers] [PATCH 3/5] Also add Platform specific Frameworks to Darwin Framework search path In-Reply-To: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> References: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> Message-ID: <1423945979-17397-4-git-send-email-gjasny@googlemail.com> Otherwise find_library is unable to lookup the XCTest framework which is not located in the SDK serach path: In the 10.10 SDK the SDK frameworks are located here: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/ Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/ whereas the Platform SDKs are located here: Developer/Library/Frameworks Signed-off-by: Gregor Jasny --- Modules/Platform/Darwin.cmake | 5 ++++ Tests/XcodePlatformFrameworks/CMakeLists.txt | 38 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 Tests/XcodePlatformFrameworks/CMakeLists.txt diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index e5c5f36..e3d705d 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -166,6 +166,11 @@ if(_CMAKE_OSX_SYSROOT_PATH) ${_CMAKE_OSX_SYSROOT_PATH}/Network/Library/Frameworks ${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks ) + if(IS_DIRECTORY ${_CMAKE_OSX_SYSROOT_PATH}/../../Library/Frameworks) + list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH + ${_CMAKE_OSX_SYSROOT_PATH}/../../Library/Frameworks + ) + endif() endif() list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH /Library/Frameworks diff --git a/Tests/XcodePlatformFrameworks/CMakeLists.txt b/Tests/XcodePlatformFrameworks/CMakeLists.txt new file mode 100644 index 0000000..09e374a --- /dev/null +++ b/Tests/XcodePlatformFrameworks/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.1) + +set(CMAKE_OSX_SYSROOT macosx) + +project(XcodePlatformFrameworks) + +# detect Xcode version + +execute_process( + COMMAND xcodebuild -version + OUTPUT_VARIABLE _stdout + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE _stderr + RESULT_VARIABLE _failed + ) + +if(_failed) + message(FATAL_ERROR "Error while running xcodebuild: ${_stderr}") +endif() + +set(XCODE_VERSION_REGEX ".*Xcode +([0-9.]+).*") + +if(NOT _stdout MATCHES ${XCODE_VERSION_REGEX}) + message(FATAL_ERROR "Cannot find Xcode version in ${_stdout}") +endif() + +string(REGEX REPLACE "${XCODE_VERSION_REGEX}" "\\1" XCODE_VERSION ${_stdout}) + +message(STATUS "Xcode version: ${XCODE_VERSION}") + +if(NOT XCODE_VERSION VERSION_LESS "5.0") + find_library(XCTEST_LIBRARY XCTest) + if(XCTEST_LIBRARY) + message(STATUS "XCTest found: ${XCTEST_LIBRARY}") + else() + message(FATAL_ERROR "XCTest Framework not found.") + endif() +endif() -- 2.3.0 From gjasny at googlemail.com Sat Feb 14 15:32:58 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sat, 14 Feb 2015 21:32:58 +0100 Subject: [cmake-developers] [PATCH 4/5] Add XCTest helper utilities In-Reply-To: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> References: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> Message-ID: <1423945979-17397-5-git-send-email-gjasny@googlemail.com> Signed-off-by: Gregor Jasny --- Modules/XCTestUtilities.cmake | 58 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Modules/XCTestUtilities.cmake diff --git a/Modules/XCTestUtilities.cmake b/Modules/XCTestUtilities.cmake new file mode 100644 index 0000000..6b1de92 --- /dev/null +++ b/Modules/XCTestUtilities.cmake @@ -0,0 +1,58 @@ +function(add_xctest target testee) + + if(NOT CMAKE_OSX_SYSROOT) + message(STATUS "Adding XCTest bundles requires CMAKE_OSX_SYSROOT to be set.") + endif() + + # check that testee is a valid target type + get_target_property(TESTEE_TYPE ${testee} TYPE) + get_target_property(TESTEE_FRAMEWORK ${testee} FRAMEWORK) + if(TESTEE_TYPE STREQUAL "SHARED_LIBRARY" AND TESTEE_FRAMEWORK) + # found a framework + else() + message(FATAL_ERROR "Testee ${testee} is of unsupported type: ${TESTEE_TYPE}") + endif() + + add_library(${target} MODULE ${ARGN}) + + set_target_properties(${target} PROPERTIES + BUNDLE TRUE + XCTEST TRUE) + + find_library(FOUNDATION_LIBRARY Foundation) + if(NOT FOUNDATION_LIBRARY) + message(STATUS "Could not find Foundation Framework.") + endif() + + find_library(XCTEST_LIBRARY XCTest) + if(NOT XCTEST_LIBRARY) + message(STATUS "Could not find XCTest Framework.") + endif() + + target_link_libraries(${target} PRIVATE ${testee} ${FOUNDATION_LIBRARY} ${XCTEST_LIBRARY}) + + # set rpath to find testee + target_link_libraries(${target} PRIVATE "${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}$") +endfunction(add_xctest) + +function(add_test_xctest target) + get_target_property(TARGET_TYPE ${target} TYPE) + get_target_property(TARGET_XCTEST ${target} XCTEST) + + if(NOT TARGET_TYPE STREQUAL "MODULE_LIBRARY" OR NOT TARGET_XCTEST) + message(FATAL_ERROR "Test ${target} is not a XCTest") + endif() + + execute_process( + COMMAND xcrun --find xctest + OUTPUT_VARIABLE XCTEST_EXECUTABLE + OUTPUT_STRIP_TRAILING_WHITESPACE) + + if(NOT XCTEST_EXECUTABLE) + message(STATUS "Unable to finc xctest binary.") + endif() + + add_test( + NAME FrameworkExampleTests + COMMAND ${XCTEST_EXECUTABLE} $/../..) +endfunction(add_test_xctest) \ No newline at end of file -- 2.3.0 From gjasny at googlemail.com Sat Feb 14 15:32:59 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sat, 14 Feb 2015 21:32:59 +0100 Subject: [cmake-developers] [PATCH 5/5] Add XCTest example to test Frameworks In-Reply-To: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> References: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> Message-ID: <1423945979-17397-6-git-send-email-gjasny@googlemail.com> Signed-off-by: Gregor Jasny --- Tests/XCTest/CMakeLists.txt | 38 ++++++++++++++++++++++ Tests/XCTest/FrameworkExample/FrameworkExample.c | 6 ++++ Tests/XCTest/FrameworkExample/FrameworkExample.h | 1 + Tests/XCTest/FrameworkExample/Info.plist | 28 ++++++++++++++++ .../FrameworkExampleTests/FrameworkExampleTests.m | 16 +++++++++ Tests/XCTest/FrameworkExampleTests/Info.plist | 24 ++++++++++++++ 6 files changed, 113 insertions(+) create mode 100644 Tests/XCTest/CMakeLists.txt create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.c create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.h create mode 100644 Tests/XCTest/FrameworkExample/Info.plist create mode 100644 Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m create mode 100644 Tests/XCTest/FrameworkExampleTests/Info.plist diff --git a/Tests/XCTest/CMakeLists.txt b/Tests/XCTest/CMakeLists.txt new file mode 100644 index 0000000..aeaccc4 --- /dev/null +++ b/Tests/XCTest/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.1) + +set(CMAKE_OSX_SYSROOT macosx) + +project(XCTestFramework) + +include(XCTestUtilities) + +enable_testing() + +# Framework + +add_library(FrameworkExample SHARED + FrameworkExample/FrameworkExample.c + FrameworkExample/FrameworkExample.h + FrameworkExample/Info.plist) + +target_include_directories(FrameworkExample PUBLIC .) + +set_target_properties(FrameworkExample PROPERTIES + FRAMEWORK TRUE + VERSION "1.0.0" + SOVERSION "1.0.0" + FRAMEWORK_VERSION "A" + MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/FrameworkExample/Info.plist + PUBLIC_HEADER FrameworkExample/FrameworkExample.h) + +# XCTest for Framework + +add_xctest(FrameworkExampleTests FrameworkExample + FrameworkExampleTests/FrameworkExampleTests.m + FrameworkExampleTests/Info.plist) + +set_target_properties(FrameworkExampleTests PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/FrameworkExampleTests/Info.plist + ) + +add_test_xctest(FrameworkExampleTests) diff --git a/Tests/XCTest/FrameworkExample/FrameworkExample.c b/Tests/XCTest/FrameworkExample/FrameworkExample.c new file mode 100644 index 0000000..2da78da --- /dev/null +++ b/Tests/XCTest/FrameworkExample/FrameworkExample.c @@ -0,0 +1,6 @@ +#include "FrameworkExample.h" + +int FourtyTwo() +{ + return 42; +} diff --git a/Tests/XCTest/FrameworkExample/FrameworkExample.h b/Tests/XCTest/FrameworkExample/FrameworkExample.h new file mode 100644 index 0000000..2e0b499 --- /dev/null +++ b/Tests/XCTest/FrameworkExample/FrameworkExample.h @@ -0,0 +1 @@ +int FourtyTwo(); diff --git a/Tests/XCTest/FrameworkExample/Info.plist b/Tests/XCTest/FrameworkExample/Info.plist new file mode 100644 index 0000000..a22acea --- /dev/null +++ b/Tests/XCTest/FrameworkExample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + FrameworkExample + CFBundleIdentifier + org.cmake.FrameworkExample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + FrameworkExample + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + + NSHumanReadableCopyright + + NSPrincipalClass + + + diff --git a/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m b/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m new file mode 100644 index 0000000..7cba23e --- /dev/null +++ b/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m @@ -0,0 +1,16 @@ +#import + +#import "FrameworkExample/FrameworkExample.h" + + at interface FrameworkExampleTests : XCTestCase + + at end + + at implementation FrameworkExampleTests + +- (void)testFourtyTwo { + // This is an example of a functional test case. + XCTAssertEqual(42, FourtyTwo()); +} + + at end diff --git a/Tests/XCTest/FrameworkExampleTests/Info.plist b/Tests/XCTest/FrameworkExampleTests/Info.plist new file mode 100644 index 0000000..293921b --- /dev/null +++ b/Tests/XCTest/FrameworkExampleTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + FrameworkExampleTests + CFBundleIdentifier + org.cmake.FrameworkExampleTests + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + FrameworkExampleTests + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + -- 2.3.0 From vynewsum at gmail.com Sat Feb 14 15:56:37 2015 From: vynewsum at gmail.com (Vincent Newsum) Date: Sat, 14 Feb 2015 21:56:37 +0100 Subject: [cmake-developers] [PATCH] VS Fortran project file: Fix mismatch between OutputDirectory and OutputFile Message-ID: When executing test VSGNUFortran using Intel Fortran Compiler 15.xx, the following warning is issued just before compilation: TargetPath(...) 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). Subsequently, an error is reported during linking. The fix involves setting 'OutputDirectory' using the same method as is used to set the 'OutputFile' in the generated project file. Signed-off-by: Vincent Newsum > --- Source/cmLocalVisualStudio7Generator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 914df5f..a071492 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -670,7 +670,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, fout << "\t\tGetPlatformName() << "\"\n" - << "\t\t\tOutputDirectory=\"" << configName << "\"\n"; + << "\t\t\tOutputDirectory=\"" << target.GetDirectory(configName) << "\"\n"; // This is an internal type to Visual Studio, it seems that: // 4 == static library // 2 == dll -- 1.9.4.msysgit.0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From vano at mail.mipt.ru Sun Feb 15 05:47:12 2015 From: vano at mail.mipt.ru (vano at mail.mipt.ru) Date: Sun, 15 Feb 2015 14:47:12 +0400 (MSK) Subject: [cmake-developers] "Conflicting types for 'cmsysProcess_SetPipeNative'" compiling in MinGW In-Reply-To: <127470377.2104013.1423996999099.JavaMail.zimbra@mail.mipt.ru> Message-ID: <1876040877.2104357.1423997232804.JavaMail.zimbra@mail.mipt.ru> Completely puzzled by this: a declaration conflicts with... itself?! $ uname -a MINGW32_NT-6.1 IVAN-POWERPC 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 Msys The error part follows, full output is attached. This happens with both cmake-3.2.0-rc1 and cmake-3.1.3. <...> gcc -I/c/Users/native_api/Documents/cmake-3.2.0-rc1/Bootstrap.cmk -I/c/Users/native_api/Documents/cmake-3.2.0-rc1/Source -I/c/Users/native_api/Documents/cmake-3.2.0-rc1/Bootstrap.cmk -DKWSYS_NAMESPACE=cmsys -c /c/Users/native_api/Documents/cmake-3.2.0-rc1/Source/kwsys/ProcessWin32.c -o ProcessWin32.o In file included from c:/Users/native_api/Documents/cmake-3.2.0-rc1/Bootstrap.cmk/cmsys/Process.h:15:0, from c:/Users/native_api/Documents/cmake-3.2.0-rc1/Source/kwsys/ProcessWin32.c:13: c:/Users/native_api/Documents/cmake-3.2.0-rc1/Bootstrap.cmk/cmsys/Configure.h:40:22: error: conflicting types for 'cmsysProcess_SetPipeNative' # define kwsys_ns(x) cmsys##x ^ c:/Users/native_api/Documents/cmake-3.2.0-rc1/Bootstrap.cmk/cmsys/Process.h:35:43: note: in expansion of macro 'kwsys_ns' # define kwsysProcess_SetPipeNative kwsys_ns(Process_SetPipeNative) ^ c:/Users/native_api/Documents/cmake-3.2.0-rc1/Source/kwsys/ProcessWin32.c:749:6: note: in expansion of macro 'kwsysProcess_SetPipeNative' void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe, HANDLE p[2]) ^ c:/Users/native_api/Documents/cmake-3.2.0-rc1/Bootstrap.cmk/cmsys/Configure.h:40:22: note: previous declaration of 'cmsysProcess_SetPipeNative' was here # define kwsys_ns(x) cmsys##x ^ c:/Users/native_api/Documents/cmake-3.2.0-rc1/Bootstrap.cmk/cmsys/Process.h:35:43: note: in expansion of macro 'kwsys_ns' # define kwsysProcess_SetPipeNative kwsys_ns(Process_SetPipeNative) ^ c:/Users/native_api/Documents/cmake-3.2.0-rc1/Bootstrap.cmk/cmsys/Process.h:175:18: note: in expansion of macro 'kwsysProcess_SetPipeNative' kwsysEXPORT void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe, ^ make: *** [ProcessWin32.o] Error 1 --------------------------------------------- Error when bootstrapping CMake: Problem while running make --------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: bootstrap.tar.xz Type: application/x-xz-compressed-tar Size: 7220 bytes Desc: not available URL: From rcdailey.lists at gmail.com Sun Feb 15 12:12:28 2015 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Sun, 15 Feb 2015 11:12:28 -0600 Subject: [cmake-developers] How to work with QtDialog? Message-ID: I'm making minor modifications to add -T support to cmake-gui. However, I'm not familiar with how to develop CMake's GUI application. Do I generate for Visual Studio 2013 (I'm on windows)? I'm able to compile the QT dialog application and run it from Visual Studio, however if I have to add new signals, i end up having to manually edit the moc_* files. I assume those are generated. Could I get some workflow tips? Thanks. From gjasny at googlemail.com Sun Feb 15 14:54:54 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 15 Feb 2015 20:54:54 +0100 Subject: [cmake-developers] [PATCH] Also add xctest support for Cocoa App Bundles In-Reply-To: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> References: <1423945979-17397-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424030094-27225-1-git-send-email-gjasny@googlemail.com> Signed-off-by: Gregor Jasny --- Modules/XCTestUtilities.cmake | 23 +- Tests/XCTest/CMakeLists.txt | 25 +- Tests/XCTest/CocoaExample/AppDelegate.h | 7 + Tests/XCTest/CocoaExample/AppDelegate.m | 18 + Tests/XCTest/CocoaExample/Info.plist | 30 + Tests/XCTest/CocoaExample/MainMenu.xib | 680 +++++++++++++++++++++ Tests/XCTest/CocoaExample/main.m | 5 + Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m | 13 + 8 files changed, 797 insertions(+), 4 deletions(-) create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.h create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.m create mode 100644 Tests/XCTest/CocoaExample/Info.plist create mode 100644 Tests/XCTest/CocoaExample/MainMenu.xib create mode 100644 Tests/XCTest/CocoaExample/main.m create mode 100644 Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m diff --git a/Modules/XCTestUtilities.cmake b/Modules/XCTestUtilities.cmake index 6b1de92..437a6dd 100644 --- a/Modules/XCTestUtilities.cmake +++ b/Modules/XCTestUtilities.cmake @@ -7,8 +7,12 @@ function(add_xctest target testee) # check that testee is a valid target type get_target_property(TESTEE_TYPE ${testee} TYPE) get_target_property(TESTEE_FRAMEWORK ${testee} FRAMEWORK) + get_target_property(TESTEE_MACOSX_BUNDLE ${testee} MACOSX_BUNDLE) + if(TESTEE_TYPE STREQUAL "SHARED_LIBRARY" AND TESTEE_FRAMEWORK) # found a framework + elseif(TESTEE_TYPE STREQUAL "EXECUTABLE" AND TESTEE_MACOSX_BUNDLE) + # found an app bundle else() message(FATAL_ERROR "Testee ${testee} is of unsupported type: ${TESTEE_TYPE}") endif() @@ -29,10 +33,23 @@ function(add_xctest target testee) message(STATUS "Could not find XCTest Framework.") endif() - target_link_libraries(${target} PRIVATE ${testee} ${FOUNDATION_LIBRARY} ${XCTEST_LIBRARY}) + target_link_libraries(${target} PRIVATE ${FOUNDATION_LIBRARY} ${XCTEST_LIBRARY}) + + if(TESTEE_TYPE STREQUAL "SHARED_LIBRARY" AND TESTEE_FRAMEWORK) + target_link_libraries(${target} PRIVATE ${testee}) - # set rpath to find testee - target_link_libraries(${target} PRIVATE "${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}$") + # set rpath to find testee + target_link_libraries(${target} PRIVATE "${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}$") + elseif(TESTEE_TYPE STREQUAL "EXECUTABLE" AND TESTEE_MACOSX_BUNDLE) + add_dependencies(${target} ${testee}) + if(XCODE) + set_target_properties(${target} PROPERTIES + XCODE_ATTRIBUTE_BUNDLE_LOADER "$(TEST_HOST)" + XCODE_ATTRIBUTE_TEST_HOST "$") + else(XCODE) + target_link_libraries(${target} PRIVATE "-bundle_loader $") + endif(XCODE) + endif() endfunction(add_xctest) function(add_test_xctest target) diff --git a/Tests/XCTest/CMakeLists.txt b/Tests/XCTest/CMakeLists.txt index aeaccc4..dbfe23f 100644 --- a/Tests/XCTest/CMakeLists.txt +++ b/Tests/XCTest/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.1) set(CMAKE_OSX_SYSROOT macosx) -project(XCTestFramework) +project(XCTestExamples) include(XCTestUtilities) @@ -36,3 +36,26 @@ set_target_properties(FrameworkExampleTests PROPERTIES ) add_test_xctest(FrameworkExampleTests) + +# Cocoa App Bundle + +add_executable(CocoaExample MACOSX_BUNDLE + CocoaExample/main.m + CocoaExample/AppDelegate.m + CocoaExample/AppDelegate.h + CocoaExample/MainMenu.xib +) + +find_library(FOUNDATION_LIBRARY Foundation) +find_library(APPKIT_LIBRARY AppKit) + +target_link_libraries(CocoaExample PRIVATE ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY}) + +set_target_properties(CocoaExample PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/CocoaExample/Info.plist + RESOURCE "CocoaExample/MainMenu.xib") + +# XCTest for Cocoa App Bundle + +add_xctest(CocoaExampleTest CocoaExample + CocoaExampleTests/CocoaExampleTests.m) diff --git a/Tests/XCTest/CocoaExample/AppDelegate.h b/Tests/XCTest/CocoaExample/AppDelegate.h new file mode 100644 index 0000000..69b6e0f --- /dev/null +++ b/Tests/XCTest/CocoaExample/AppDelegate.h @@ -0,0 +1,7 @@ +#import + + at interface AppDelegate : NSObject + + + at end + diff --git a/Tests/XCTest/CocoaExample/AppDelegate.m b/Tests/XCTest/CocoaExample/AppDelegate.m new file mode 100644 index 0000000..07af62f --- /dev/null +++ b/Tests/XCTest/CocoaExample/AppDelegate.m @@ -0,0 +1,18 @@ +#import "AppDelegate.h" + + at interface AppDelegate () + + at property (assign) IBOutlet NSWindow *window; + at end + + at implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application +} + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + + at end diff --git a/Tests/XCTest/CocoaExample/Info.plist b/Tests/XCTest/CocoaExample/Info.plist new file mode 100644 index 0000000..5267c63 --- /dev/null +++ b/Tests/XCTest/CocoaExample/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + CocoaExample + CFBundleIconFile + + CFBundleIdentifier + org.cmake.CocoaExample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + CocoaExample + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/Tests/XCTest/CocoaExample/MainMenu.xib b/Tests/XCTest/CocoaExample/MainMenu.xib new file mode 100644 index 0000000..9498a0a --- /dev/null +++ b/Tests/XCTest/CocoaExample/MainMenu.xib @@ -0,0 +1,680 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/XCTest/CocoaExample/main.m b/Tests/XCTest/CocoaExample/main.m new file mode 100644 index 0000000..8a6799b --- /dev/null +++ b/Tests/XCTest/CocoaExample/main.m @@ -0,0 +1,5 @@ +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m b/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m new file mode 100644 index 0000000..70d61d6 --- /dev/null +++ b/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m @@ -0,0 +1,13 @@ +#import + + at interface CocoaExampleTests : XCTestCase + + at end + + at implementation CocoaExampleTests + +- (void)testExample { + XCTAssert(YES, @"Pass"); +} + + at end -- 2.3.0 From domen.vrankar at gmail.com Sun Feb 15 15:04:45 2015 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Sun, 15 Feb 2015 21:04:45 +0100 Subject: [cmake-developers] KWSys patches Message-ID: Hi everyone, I am having problems with a patch for Glob functionality because Glob is part of KWSys repository. I tried to register to http://review.source.kitware.com so that I would be able to commit patches to KWSys repository but after I put in my OpenID I got a "Not Found" error. How can I contribute this patch? Attached are KWSys patch and KWSys+CMake patch. Thanks, Domen -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-glob-recurse-handle-cyclic-recursion.patch Type: text/x-diff Size: 7854 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-kwsys-glob-recurse-handle-cyclic-recursion.patch Type: text/x-diff Size: 5344 bytes Desc: not available URL: From rcdailey.lists at gmail.com Sun Feb 15 15:27:58 2015 From: rcdailey.lists at gmail.com (rcdailey.lists at gmail.com) Date: Sun, 15 Feb 2015 14:27:58 -0600 Subject: [cmake-developers] [PATCH] User may now specify toolset through CMake GUI Message-ID: <1424032078-7144-1-git-send-email-rcdailey.lists@gmail.com> From: Robert Dailey The -T parameter to CMake may now be specified through QtDialog (cmake-gui) via a new text field in the first-time configure wizard (below the generator chooser). --- Source/QtDialog/CMakeSetupDialog.cxx | 1 + Source/QtDialog/FirstConfigure.cxx | 18 +++++++++++++++++- Source/QtDialog/FirstConfigure.h | 3 +++ Source/QtDialog/QCMake.cxx | 12 +++++++++++- Source/QtDialog/QCMake.h | 5 +++++ 5 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index b8077f2..dfe1e7c 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -705,6 +705,7 @@ bool CMakeSetupDialog::setupFirstConfigure() { dialog.saveToSettings(); this->CMakeThread->cmakeInstance()->setGenerator(dialog.getGenerator()); + this->CMakeThread->cmakeInstance()->setToolset(dialog.getToolset()); QCMakeCacheModel* m = this->CacheValues->cacheModel(); diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx index 6de9f00..d22acd0 100644 --- a/Source/QtDialog/FirstConfigure.cxx +++ b/Source/QtDialog/FirstConfigure.cxx @@ -15,6 +15,12 @@ StartCompilerSetup::StartCompilerSetup(QWidget* p) l->addWidget(new QLabel(tr("Specify the generator for this project"))); this->GeneratorOptions = new QComboBox(this); l->addWidget(this->GeneratorOptions); + + // Add the ability to specify toolset (-T parameter) + l->addWidget(new QLabel(tr("Optional toolset to use (-T parameter)"))); + this->Toolset = new QLineEdit(this); + l->addWidget(this->Toolset); + l->addSpacing(6); this->CompilerSetupOptions[0] = new QRadioButton(tr("Use default native compilers"), this); @@ -59,7 +65,12 @@ void StartCompilerSetup::setCurrentGenerator(const QString& gen) QString StartCompilerSetup::getGenerator() const { - return this->GeneratorOptions->currentText(); + return this->GeneratorOptions->currentText(); +}; + +QString StartCompilerSetup::getToolset() const +{ + return this->Toolset->text(); }; bool StartCompilerSetup::defaultSetup() const @@ -335,6 +346,11 @@ QString FirstConfigure::getGenerator() const return this->mStartCompilerSetupPage->getGenerator(); } +QString FirstConfigure::getToolset() const +{ + return this->mStartCompilerSetupPage->getToolset(); +} + void FirstConfigure::loadFromSettings() { QSettings settings; diff --git a/Source/QtDialog/FirstConfigure.h b/Source/QtDialog/FirstConfigure.h index be390b0..1848a9d 100644 --- a/Source/QtDialog/FirstConfigure.h +++ b/Source/QtDialog/FirstConfigure.h @@ -30,6 +30,7 @@ class StartCompilerSetup : public QWizardPage void setGenerators(const QStringList& gens); void setCurrentGenerator(const QString& gen); QString getGenerator() const; + QString getToolset() const; bool defaultSetup() const; bool compilerSetup() const; @@ -46,6 +47,7 @@ class StartCompilerSetup : public QWizardPage protected: QComboBox* GeneratorOptions; + QLineEdit* Toolset; QRadioButton* CompilerSetupOptions[4]; }; @@ -142,6 +144,7 @@ public: void setGenerators(const QStringList& gens); QString getGenerator() const; + QString getToolset() const; bool defaultSetup() const; bool compilerSetup() const; diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index b833648..b05b06d 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -125,7 +125,6 @@ void QCMake::setBinaryDirectory(const QString& _dir) } } - void QCMake::setGenerator(const QString& gen) { if(this->Generator != gen) @@ -135,6 +134,15 @@ void QCMake::setGenerator(const QString& gen) } } +void QCMake::setToolset(const QString& toolset) +{ + if(this->Toolset != toolset) + { + this->Toolset = toolset; + emit this->toolsetChanged(this->Toolset); + } +} + void QCMake::configure() { #ifdef Q_OS_WIN @@ -147,6 +155,8 @@ void QCMake::configure() this->CMakeInstance->SetStartOutputDirectory(this->BinaryDirectory.toLocal8Bit().data()); this->CMakeInstance->SetGlobalGenerator( this->CMakeInstance->CreateGlobalGenerator(this->Generator.toLocal8Bit().data())); + this->CMakeInstance->SetGeneratorToolset( + this->Toolset.toLocal8Bit().data()); this->CMakeInstance->LoadCache(); this->CMakeInstance->SetSuppressDevWarnings(this->SuppressDevWarnings); this->CMakeInstance->SetWarnUninitialized(this->WarnUninitializedMode); diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index d910eb7..e25430d 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -73,6 +73,8 @@ public slots: void setBinaryDirectory(const QString& dir); /// set the desired generator to use void setGenerator(const QString& generator); + /// set the desired generator to use + void setToolset(const QString& toolset); /// do the configure step void configure(); /// generate the files @@ -130,6 +132,8 @@ signals: void errorMessage(const QString& msg); /// signal when debug output changes void debugOutputChanged(bool); + /// signal when the toolset changes + void toolsetChanged(const QString& toolset); protected: cmake* CMakeInstance; @@ -147,6 +151,7 @@ protected: QString SourceDirectory; QString BinaryDirectory; QString Generator; + QString Toolset; QStringList AvailableGenerators; QString CMakeExecutable; QAtomicInt InterruptFlag; -- 2.1.0.msysgit.1 From domen.vrankar at gmail.com Sun Feb 15 15:38:27 2015 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Sun, 15 Feb 2015 21:38:27 +0100 Subject: [cmake-developers] [PATCH] CPackRPM: Fix cross-building rpms In-Reply-To: References: <1423001041-20554-1-git-send-email-stillcompiling@gmail.com> Message-ID: > I've finally had some time to read over the Tests section, and it is a > bit overwhelming. > I'm going to describe the use cases for my patch and perhaps you can > give me some guidance on adding an actual test. > > There are three, maybe four use cases: > 1) native rpm (e.g. x86_64) > 2) noarch rpm (a noarch package should contain scripts, artwork, etc, > but no compiled code) > 3) a non-native, but compatible rpm (e.g. building x86 on a multilib > x86_64 system) > 4) incompatible cross-compiled package (e.g. building for arm or ppc) > > in each case the way you know it worked is > a) "make package" successfully produces an rpm file > b) running "rpm -qip my_rpm_file.my_arch.rpm returns a description of the rpm, > including the line "Architecture: my_arch" Sorry for the late reply. I've finally had some time to go through the patch: 1) If I understand you correctly BuildArch should never be set except in noarch case. This would mean that CPACK_RPM_PACKAGE_ARCHITECTURE value should set --target and if set to noarch should also (if necessary) set BuildArch as before. Your patch currently silently ignores all user settings of CPACK_RPM_PACKAGE_ARCHITECTURE except noarch, 2) Since you are already writing a patch for CPACK_RPM_PACKAGE_ARCHITECTURE you should also add CPACK_RPM__PACKAGE_ARCHITECTURE so that you can set the architecture per component. Regarding the tests: 1) You should add the test setup for noarch and auto defined and auto detected architecture in Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in - just define architecture for headers component (implement 2. from above for this) and leave the rest of components to auto detection provided by your patch, 2) Write result verification in Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake - just extend the tests at the bottom of this file since pqy query is already used there. I am not certain regarding where to put cross-compiled package test... If rpmbuild is not testing the binaries that will get packed you can simply set a nonexisting XYZ architecture to only one component - like with noarch. Regards, Domen From gjasny at googlemail.com Sun Feb 15 15:52:57 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 15 Feb 2015 21:52:57 +0100 Subject: [cmake-developers] [PATCH 0/6] XCTest Bundles v4 Message-ID: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> Hello, this series contains the latest XCTest patches. Changes since v3: Added Cocoa App Bundle Test example Added documentation to XCTestUtilities.cmake Some minor cleanups This patch set is also available on github: URL: https://github.com/gjasny/CMake.git Branch: feature/xctest-for-frameworks Thanks, Gregor Gregor Jasny (6): Add handling for XCTest bundles Shorten CFBundleExecutable to file name only Also add Platform specific Frameworks to Darwin Framework search path Add XCTest helper utilities Add XCTest example to test Frameworks Add XCTest example to test Cocoa App Bundles Help/manual/cmake-modules.7.rst | 1 + Help/manual/cmake-properties.7.rst | 1 + Help/module/XCTestUtilities.rst | 1 + Help/prop_tgt/XCTEST.rst | 10 + Modules/Platform/Darwin.cmake | 5 + Modules/XCTestUtilities.cmake | 120 ++++ Source/cmGlobalXCodeGenerator.cxx | 12 +- Source/cmOSXBundleGenerator.cxx | 3 +- Source/cmTarget.cxx | 16 +- Source/cmTarget.h | 3 + Tests/XCTest/CMakeLists.txt | 63 ++ Tests/XCTest/CocoaExample/AppDelegate.h | 7 + Tests/XCTest/CocoaExample/AppDelegate.m | 18 + Tests/XCTest/CocoaExample/Info.plist | 30 + Tests/XCTest/CocoaExample/MainMenu.xib | 680 +++++++++++++++++++++ Tests/XCTest/CocoaExample/main.m | 5 + Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m | 13 + Tests/XCTest/FrameworkExample/FrameworkExample.c | 6 + Tests/XCTest/FrameworkExample/FrameworkExample.h | 1 + Tests/XCTest/FrameworkExample/Info.plist | 28 + .../FrameworkExampleTests/FrameworkExampleTests.m | 16 + Tests/XCTest/FrameworkExampleTests/Info.plist | 24 + Tests/XcodePlatformFrameworks/CMakeLists.txt | 38 ++ 23 files changed, 1097 insertions(+), 4 deletions(-) create mode 100644 Help/module/XCTestUtilities.rst create mode 100644 Help/prop_tgt/XCTEST.rst create mode 100644 Modules/XCTestUtilities.cmake create mode 100644 Tests/XCTest/CMakeLists.txt create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.h create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.m create mode 100644 Tests/XCTest/CocoaExample/Info.plist create mode 100644 Tests/XCTest/CocoaExample/MainMenu.xib create mode 100644 Tests/XCTest/CocoaExample/main.m create mode 100644 Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.c create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.h create mode 100644 Tests/XCTest/FrameworkExample/Info.plist create mode 100644 Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m create mode 100644 Tests/XCTest/FrameworkExampleTests/Info.plist create mode 100644 Tests/XcodePlatformFrameworks/CMakeLists.txt -- 2.3.0 From gjasny at googlemail.com Sun Feb 15 15:52:58 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 15 Feb 2015 21:52:58 +0100 Subject: [cmake-developers] [PATCH 1/6] Add handling for XCTest bundles In-Reply-To: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> References: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424033583-40360-2-git-send-email-gjasny@googlemail.com> 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. add_library(CocoaExampleTest MODULE ...) set_target_properties(CocoaExampleTest PROPERTIES BUNDLE TRUE XCTEST TRUE) Signed-off-by: Gregor Jasny --- Help/manual/cmake-properties.7.rst | 1 + Help/prop_tgt/XCTEST.rst | 10 ++++++++++ Source/cmGlobalXCodeGenerator.cxx | 12 ++++++++++-- Source/cmTarget.cxx | 16 +++++++++++++++- Source/cmTarget.h | 3 +++ 5 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 Help/prop_tgt/XCTEST.rst diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 25f989f..d795c6e 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -243,6 +243,7 @@ Properties on Targets /prop_tgt/VS_WINRT_REFERENCES /prop_tgt/WIN32_EXECUTABLE /prop_tgt/XCODE_ATTRIBUTE_an-attribute + /prop_tgt/XCTEST Properties on Tests =================== diff --git a/Help/prop_tgt/XCTEST.rst b/Help/prop_tgt/XCTEST.rst new file mode 100644 index 0000000..3a3adf6 --- /dev/null +++ b/Help/prop_tgt/XCTEST.rst @@ -0,0 +1,10 @@ +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 depends on :prop_tgt:`BUNDLE` to be effective. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index aea134e..784bc24 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -804,6 +804,10 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext, { sourcecode = "compiled.mach-o.objfile"; } + else if(ext == "xctest") + { + sourcecode = "wrapper.cfbundle"; + } else if(ext == "xib") { keepLastKnownFileType = true; @@ -2598,7 +2602,9 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget) case cmTarget::STATIC_LIBRARY: return "archive.ar"; case cmTarget::MODULE_LIBRARY: - if (cmtarget.IsCFBundleOnApple()) + if (cmtarget.IsXCTestOnApple()) + return "wrapper.cfbundle"; + else if (cmtarget.IsCFBundleOnApple()) return "wrapper.plug-in"; else return ((this->XcodeVersion >= 22)? @@ -2622,7 +2628,9 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(cmTarget& cmtarget) case cmTarget::STATIC_LIBRARY: return "com.apple.product-type.library.static"; case cmTarget::MODULE_LIBRARY: - if (cmtarget.IsCFBundleOnApple()) + if (cmtarget.IsXCTestOnApple()) + return "com.apple.product-type.bundle.unit-test"; + else if (cmtarget.IsCFBundleOnApple()) return "com.apple.product-type.bundle"; else return ((this->XcodeVersion >= 22)? diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 526a923..6ce165a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -615,6 +615,13 @@ bool cmTarget::IsCFBundleOnApple() const } //---------------------------------------------------------------------------- +bool cmTarget::IsXCTestOnApple() const +{ + return (this->IsCFBundleOnApple() && + this->GetPropertyAsBool("XCTEST")); +} + +//---------------------------------------------------------------------------- bool cmTarget::IsBundleOnApple() const { return this->IsFrameworkOnApple() || this->IsAppBundleOnApple() || @@ -6781,7 +6788,14 @@ std::string cmTarget::GetCFBundleDirectory(const std::string& config, const char *ext = this->GetProperty("BUNDLE_EXTENSION"); if (!ext) { - ext = "bundle"; + if (this->IsXCTestOnApple()) + { + ext = "xctest"; + } + else + { + ext = "bundle"; + } } fpath += ext; fpath += "/Contents"; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index ddd9859..b58e0a0 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -526,6 +526,9 @@ public: /** Return whether this target is a CFBundle (plugin) on Apple. */ bool IsCFBundleOnApple() const; + /** Return whether this target is a XCTest on Apple. */ + bool IsXCTestOnApple() const; + /** Return whether this target is an executable Bundle on Apple. */ bool IsAppBundleOnApple() const; -- 2.3.0 From gjasny at googlemail.com Sun Feb 15 15:53:00 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 15 Feb 2015 21:53:00 +0100 Subject: [cmake-developers] [PATCH 3/6] Also add Platform specific Frameworks to Darwin Framework search path In-Reply-To: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> References: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424033583-40360-4-git-send-email-gjasny@googlemail.com> Otherwise find_library is unable to lookup the XCTest framework which is not located in the SDK serach path: In the 10.10 SDK the SDK frameworks are located here: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/ Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/ whereas the Platform SDKs are located here: Developer/Library/Frameworks Signed-off-by: Gregor Jasny --- Modules/Platform/Darwin.cmake | 5 ++++ Tests/XcodePlatformFrameworks/CMakeLists.txt | 38 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 Tests/XcodePlatformFrameworks/CMakeLists.txt diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index e5c5f36..e3d705d 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -166,6 +166,11 @@ if(_CMAKE_OSX_SYSROOT_PATH) ${_CMAKE_OSX_SYSROOT_PATH}/Network/Library/Frameworks ${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks ) + if(IS_DIRECTORY ${_CMAKE_OSX_SYSROOT_PATH}/../../Library/Frameworks) + list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH + ${_CMAKE_OSX_SYSROOT_PATH}/../../Library/Frameworks + ) + endif() endif() list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH /Library/Frameworks diff --git a/Tests/XcodePlatformFrameworks/CMakeLists.txt b/Tests/XcodePlatformFrameworks/CMakeLists.txt new file mode 100644 index 0000000..09e374a --- /dev/null +++ b/Tests/XcodePlatformFrameworks/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.1) + +set(CMAKE_OSX_SYSROOT macosx) + +project(XcodePlatformFrameworks) + +# detect Xcode version + +execute_process( + COMMAND xcodebuild -version + OUTPUT_VARIABLE _stdout + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE _stderr + RESULT_VARIABLE _failed + ) + +if(_failed) + message(FATAL_ERROR "Error while running xcodebuild: ${_stderr}") +endif() + +set(XCODE_VERSION_REGEX ".*Xcode +([0-9.]+).*") + +if(NOT _stdout MATCHES ${XCODE_VERSION_REGEX}) + message(FATAL_ERROR "Cannot find Xcode version in ${_stdout}") +endif() + +string(REGEX REPLACE "${XCODE_VERSION_REGEX}" "\\1" XCODE_VERSION ${_stdout}) + +message(STATUS "Xcode version: ${XCODE_VERSION}") + +if(NOT XCODE_VERSION VERSION_LESS "5.0") + find_library(XCTEST_LIBRARY XCTest) + if(XCTEST_LIBRARY) + message(STATUS "XCTest found: ${XCTEST_LIBRARY}") + else() + message(FATAL_ERROR "XCTest Framework not found.") + endif() +endif() -- 2.3.0 From gjasny at googlemail.com Sun Feb 15 15:52:59 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 15 Feb 2015 21:52:59 +0100 Subject: [cmake-developers] [PATCH 2/6] Shorten CFBundleExecutable to file name only In-Reply-To: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> References: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424033583-40360-3-git-send-email-gjasny@googlemail.com> Shorten the CFBundleExecutable in the PList file of Bundles to the file name only as it is done for Frameworks, too. Signed-off-by: Gregor Jasny --- Source/cmOSXBundleGenerator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index 55e20ab..a8eef82 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -181,8 +181,9 @@ void cmOSXBundleGenerator::CreateCFBundle(const std::string& targetName, std::string plist = root + "/" + this->GT->Target->GetCFBundleDirectory(this->ConfigName, true); plist += "/Info.plist"; + std::string name = cmSystemTools::GetFilenameName(targetName); this->LocalGenerator->GenerateAppleInfoPList(this->GT->Target, - targetName, + name, plist.c_str()); this->Makefile->AddCMakeOutputFile(plist); } -- 2.3.0 From gjasny at googlemail.com Sun Feb 15 15:53:01 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 15 Feb 2015 21:53:01 +0100 Subject: [cmake-developers] [PATCH 4/6] Add XCTest helper utilities In-Reply-To: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> References: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424033583-40360-5-git-send-email-gjasny@googlemail.com> Signed-off-by: Gregor Jasny --- Help/manual/cmake-modules.7.rst | 1 + Help/module/XCTestUtilities.rst | 1 + Modules/XCTestUtilities.cmake | 120 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 Help/module/XCTestUtilities.rst create mode 100644 Modules/XCTestUtilities.cmake diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 76058f9..ea0d1c1 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -240,5 +240,6 @@ All Modules /module/UseSWIG /module/UsewxWidgets /module/Use_wxWindows + /module/XCTestUtilities /module/WriteBasicConfigVersionFile /module/WriteCompilerDetectionHeader diff --git a/Help/module/XCTestUtilities.rst b/Help/module/XCTestUtilities.rst new file mode 100644 index 0000000..c96f515 --- /dev/null +++ b/Help/module/XCTestUtilities.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../Modules/XCTestUtilities.cmake diff --git a/Modules/XCTestUtilities.cmake b/Modules/XCTestUtilities.cmake new file mode 100644 index 0000000..33124fe --- /dev/null +++ b/Modules/XCTestUtilities.cmake @@ -0,0 +1,120 @@ +#.rst: +# XCTestUtilities +# --------------- +# +# Functions to help creating and executing XCTest bundles. +# +# An XCTest bundle is a CFBundle with a special product-type +# and bundle extension. For more information about XCTest visit +# the Mac Developer library at: +# http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/ +# +# The following functions are provided by this module: +# +# :: +# +# add_xctest +# add_test_xctest +# +# :: +# +# add_xctest( ) +# +# Create a XCTest bundle named which will test the target +# . Supported target types for testee are Frameworks and +# App Bundles. +# +# :: +# +# add_test_xctest() +# +# Add an XCTest bundle to the project to be run by :manual:`ctest(1)`. + +#============================================================================= +# Copyright 2015 Gregor Jasny +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +function(add_xctest target testee) + + if(NOT CMAKE_OSX_SYSROOT) + message(STATUS "Adding XCTest bundles requires CMAKE_OSX_SYSROOT to be set.") + endif() + + # check that testee is a valid target type + get_target_property(TESTEE_TYPE ${testee} TYPE) + get_target_property(TESTEE_FRAMEWORK ${testee} FRAMEWORK) + get_target_property(TESTEE_MACOSX_BUNDLE ${testee} MACOSX_BUNDLE) + + if(TESTEE_TYPE STREQUAL "SHARED_LIBRARY" AND TESTEE_FRAMEWORK) + # found a framework + elseif(TESTEE_TYPE STREQUAL "EXECUTABLE" AND TESTEE_MACOSX_BUNDLE) + # found an app bundle + else() + message(FATAL_ERROR "Testee ${testee} is of unsupported type: ${TESTEE_TYPE}") + endif() + + add_library(${target} MODULE ${ARGN}) + + set_target_properties(${target} PROPERTIES + BUNDLE TRUE + XCTEST TRUE) + + find_library(FOUNDATION_LIBRARY Foundation) + if(NOT FOUNDATION_LIBRARY) + message(STATUS "Could not find Foundation Framework.") + endif() + + find_library(XCTEST_LIBRARY XCTest) + if(NOT XCTEST_LIBRARY) + message(STATUS "Could not find XCTest Framework.") + endif() + + target_link_libraries(${target} PRIVATE ${FOUNDATION_LIBRARY} ${XCTEST_LIBRARY}) + + if(TESTEE_TYPE STREQUAL "SHARED_LIBRARY" AND TESTEE_FRAMEWORK) + target_link_libraries(${target} PRIVATE ${testee}) + + # set rpath to find testee + target_link_libraries(${target} PRIVATE "${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}$") + elseif(TESTEE_TYPE STREQUAL "EXECUTABLE" AND TESTEE_MACOSX_BUNDLE) + add_dependencies(${target} ${testee}) + if(XCODE) + set_target_properties(${target} PROPERTIES + XCODE_ATTRIBUTE_BUNDLE_LOADER "$(TEST_HOST)" + XCODE_ATTRIBUTE_TEST_HOST "$") + else(XCODE) + target_link_libraries(${target} PRIVATE "-bundle_loader $") + endif(XCODE) + endif() +endfunction(add_xctest) + +function(add_test_xctest target) + get_target_property(TARGET_TYPE ${target} TYPE) + get_target_property(TARGET_XCTEST ${target} XCTEST) + + if(NOT TARGET_TYPE STREQUAL "MODULE_LIBRARY" OR NOT TARGET_XCTEST) + message(FATAL_ERROR "Test ${target} is not a XCTest") + endif() + + execute_process( + COMMAND xcrun --find xctest + OUTPUT_VARIABLE XCTEST_EXECUTABLE + OUTPUT_STRIP_TRAILING_WHITESPACE) + + if(NOT XCTEST_EXECUTABLE) + message(STATUS "Unable to finc xctest binary.") + endif() + + add_test( + NAME ${target} + COMMAND ${XCTEST_EXECUTABLE} $/../..) +endfunction(add_test_xctest) -- 2.3.0 From gjasny at googlemail.com Sun Feb 15 15:53:02 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 15 Feb 2015 21:53:02 +0100 Subject: [cmake-developers] [PATCH 5/6] Add XCTest example to test Frameworks In-Reply-To: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> References: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424033583-40360-6-git-send-email-gjasny@googlemail.com> Signed-off-by: Gregor Jasny --- Tests/XCTest/CMakeLists.txt | 38 ++++++++++++++++++++++ Tests/XCTest/FrameworkExample/FrameworkExample.c | 6 ++++ Tests/XCTest/FrameworkExample/FrameworkExample.h | 1 + Tests/XCTest/FrameworkExample/Info.plist | 28 ++++++++++++++++ .../FrameworkExampleTests/FrameworkExampleTests.m | 16 +++++++++ Tests/XCTest/FrameworkExampleTests/Info.plist | 24 ++++++++++++++ 6 files changed, 113 insertions(+) create mode 100644 Tests/XCTest/CMakeLists.txt create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.c create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.h create mode 100644 Tests/XCTest/FrameworkExample/Info.plist create mode 100644 Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m create mode 100644 Tests/XCTest/FrameworkExampleTests/Info.plist diff --git a/Tests/XCTest/CMakeLists.txt b/Tests/XCTest/CMakeLists.txt new file mode 100644 index 0000000..e31e9ab --- /dev/null +++ b/Tests/XCTest/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.1) + +set(CMAKE_OSX_SYSROOT macosx) + +project(XCTestExamples) + +include(XCTestUtilities) + +enable_testing() + +# Framework + +add_library(FrameworkExample SHARED + FrameworkExample/FrameworkExample.c + FrameworkExample/FrameworkExample.h + FrameworkExample/Info.plist) + +target_include_directories(FrameworkExample PUBLIC .) + +set_target_properties(FrameworkExample PROPERTIES + FRAMEWORK TRUE + VERSION "1.0.0" + SOVERSION "1.0.0" + FRAMEWORK_VERSION "A" + MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/FrameworkExample/Info.plist + PUBLIC_HEADER FrameworkExample/FrameworkExample.h) + +# XCTest for Framework + +add_xctest(FrameworkExampleTests FrameworkExample + FrameworkExampleTests/FrameworkExampleTests.m + FrameworkExampleTests/Info.plist) + +set_target_properties(FrameworkExampleTests PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/FrameworkExampleTests/Info.plist + ) + +add_test_xctest(FrameworkExampleTests) diff --git a/Tests/XCTest/FrameworkExample/FrameworkExample.c b/Tests/XCTest/FrameworkExample/FrameworkExample.c new file mode 100644 index 0000000..2da78da --- /dev/null +++ b/Tests/XCTest/FrameworkExample/FrameworkExample.c @@ -0,0 +1,6 @@ +#include "FrameworkExample.h" + +int FourtyTwo() +{ + return 42; +} diff --git a/Tests/XCTest/FrameworkExample/FrameworkExample.h b/Tests/XCTest/FrameworkExample/FrameworkExample.h new file mode 100644 index 0000000..2e0b499 --- /dev/null +++ b/Tests/XCTest/FrameworkExample/FrameworkExample.h @@ -0,0 +1 @@ +int FourtyTwo(); diff --git a/Tests/XCTest/FrameworkExample/Info.plist b/Tests/XCTest/FrameworkExample/Info.plist new file mode 100644 index 0000000..a22acea --- /dev/null +++ b/Tests/XCTest/FrameworkExample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + FrameworkExample + CFBundleIdentifier + org.cmake.FrameworkExample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + FrameworkExample + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + + NSHumanReadableCopyright + + NSPrincipalClass + + + diff --git a/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m b/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m new file mode 100644 index 0000000..7cba23e --- /dev/null +++ b/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m @@ -0,0 +1,16 @@ +#import + +#import "FrameworkExample/FrameworkExample.h" + + at interface FrameworkExampleTests : XCTestCase + + at end + + at implementation FrameworkExampleTests + +- (void)testFourtyTwo { + // This is an example of a functional test case. + XCTAssertEqual(42, FourtyTwo()); +} + + at end diff --git a/Tests/XCTest/FrameworkExampleTests/Info.plist b/Tests/XCTest/FrameworkExampleTests/Info.plist new file mode 100644 index 0000000..293921b --- /dev/null +++ b/Tests/XCTest/FrameworkExampleTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + FrameworkExampleTests + CFBundleIdentifier + org.cmake.FrameworkExampleTests + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + FrameworkExampleTests + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + -- 2.3.0 From gjasny at googlemail.com Sun Feb 15 15:53:03 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 15 Feb 2015 21:53:03 +0100 Subject: [cmake-developers] [PATCH 6/6] Add XCTest example to test Cocoa App Bundles In-Reply-To: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> References: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424033583-40360-7-git-send-email-gjasny@googlemail.com> Signed-off-by: Gregor Jasny --- Tests/XCTest/CMakeLists.txt | 25 + Tests/XCTest/CocoaExample/AppDelegate.h | 7 + Tests/XCTest/CocoaExample/AppDelegate.m | 18 + Tests/XCTest/CocoaExample/Info.plist | 30 + Tests/XCTest/CocoaExample/MainMenu.xib | 680 +++++++++++++++++++++ Tests/XCTest/CocoaExample/main.m | 5 + Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m | 13 + 7 files changed, 778 insertions(+) create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.h create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.m create mode 100644 Tests/XCTest/CocoaExample/Info.plist create mode 100644 Tests/XCTest/CocoaExample/MainMenu.xib create mode 100644 Tests/XCTest/CocoaExample/main.m create mode 100644 Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m diff --git a/Tests/XCTest/CMakeLists.txt b/Tests/XCTest/CMakeLists.txt index e31e9ab..f42020d 100644 --- a/Tests/XCTest/CMakeLists.txt +++ b/Tests/XCTest/CMakeLists.txt @@ -36,3 +36,28 @@ set_target_properties(FrameworkExampleTests PROPERTIES ) add_test_xctest(FrameworkExampleTests) + +# Cocoa App Bundle + +add_executable(CocoaExample MACOSX_BUNDLE + CocoaExample/main.m + CocoaExample/AppDelegate.m + CocoaExample/AppDelegate.h + CocoaExample/MainMenu.xib +) + +find_library(FOUNDATION_LIBRARY Foundation) +find_library(APPKIT_LIBRARY AppKit) + +target_link_libraries(CocoaExample PRIVATE ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY}) + +set_target_properties(CocoaExample PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/CocoaExample/Info.plist + RESOURCE "CocoaExample/MainMenu.xib") + +# XCTest for Cocoa App Bundle + +add_xctest(CocoaExampleTests CocoaExample + CocoaExampleTests/CocoaExampleTests.m) + +add_test_xctest(CocoaExampleTests) diff --git a/Tests/XCTest/CocoaExample/AppDelegate.h b/Tests/XCTest/CocoaExample/AppDelegate.h new file mode 100644 index 0000000..69b6e0f --- /dev/null +++ b/Tests/XCTest/CocoaExample/AppDelegate.h @@ -0,0 +1,7 @@ +#import + + at interface AppDelegate : NSObject + + + at end + diff --git a/Tests/XCTest/CocoaExample/AppDelegate.m b/Tests/XCTest/CocoaExample/AppDelegate.m new file mode 100644 index 0000000..07af62f --- /dev/null +++ b/Tests/XCTest/CocoaExample/AppDelegate.m @@ -0,0 +1,18 @@ +#import "AppDelegate.h" + + at interface AppDelegate () + + at property (assign) IBOutlet NSWindow *window; + at end + + at implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application +} + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + + at end diff --git a/Tests/XCTest/CocoaExample/Info.plist b/Tests/XCTest/CocoaExample/Info.plist new file mode 100644 index 0000000..5267c63 --- /dev/null +++ b/Tests/XCTest/CocoaExample/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + CocoaExample + CFBundleIconFile + + CFBundleIdentifier + org.cmake.CocoaExample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + CocoaExample + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/Tests/XCTest/CocoaExample/MainMenu.xib b/Tests/XCTest/CocoaExample/MainMenu.xib new file mode 100644 index 0000000..9498a0a --- /dev/null +++ b/Tests/XCTest/CocoaExample/MainMenu.xib @@ -0,0 +1,680 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/XCTest/CocoaExample/main.m b/Tests/XCTest/CocoaExample/main.m new file mode 100644 index 0000000..8a6799b --- /dev/null +++ b/Tests/XCTest/CocoaExample/main.m @@ -0,0 +1,5 @@ +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m b/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m new file mode 100644 index 0000000..70d61d6 --- /dev/null +++ b/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m @@ -0,0 +1,13 @@ +#import + + at interface CocoaExampleTests : XCTestCase + + at end + + at implementation CocoaExampleTests + +- (void)testExample { + XCTAssert(YES, @"Pass"); +} + + at end -- 2.3.0 From brad.king at kitware.com Mon Feb 16 10:06:11 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 16 Feb 2015 10:06:11 -0500 Subject: [cmake-developers] KWSys patches In-Reply-To: References: Message-ID: <54E20763.2070306@kitware.com> On 02/15/2015 03:04 PM, Domen Vrankar wrote: > I tried to register to http://review.source.kitware.com so that I > would be able to commit patches to KWSys repository but after I put in > my OpenID I got a "Not Found" error. I'll be in touch off-list about this. > How can I contribute this patch? > > Attached are KWSys patch and KWSys+CMake patch. I'll get the KWSys patch through. Once it is integrated into CMake then you can rebase the CMake part of the change on that. However, please revise the logic in the KWSys patch to avoid using exceptions. Thanks, -Brad From brad.king at kitware.com Mon Feb 16 10:06:25 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 16 Feb 2015 10:06:25 -0500 Subject: [cmake-developers] "Conflicting types for 'cmsysProcess_SetPipeNative'" compiling in MinGW In-Reply-To: <1876040877.2104357.1423997232804.JavaMail.zimbra@mail.mipt.ru> References: <1876040877.2104357.1423997232804.JavaMail.zimbra@mail.mipt.ru> Message-ID: <54E20771.7020400@kitware.com> On 02/15/2015 05:47 AM, vano at mail.mipt.ru wrote: > c:/Users/native_api/Documents/cmake-3.2.0-rc1/Source/kwsys/ProcessWin32.c:749:6: note: in expansion of macro 'kwsysProcess_SetPipeNative' > void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe, HANDLE p[2]) [snip] > c:/Users/native_api/Documents/cmake-3.2.0-rc1/Bootstrap.cmk/cmsys/Process.h:175:18: note: in expansion of macro 'kwsysProcess_SetPipeNative' > kwsysEXPORT void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe, One of these is in the header and one is in the implementation file. The code has been this way for years and we do have nightly testing on some (likely older) versions of MinGW tools. Something about the environment may have changed. The one in the header is: typedef void* kwsysProcess_Pipe_Handle; ... void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe, kwsysProcess_Pipe_Handle p[2]); to avoid exposing clients to . The one in the implementation file is void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe, HANDLE p[2]) Is HANDLE not "void*"? Is this compiler picky about the different typedef names for the same type? Thanks, -Brad From brad.king at kitware.com Mon Feb 16 11:35:47 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 16 Feb 2015 11:35:47 -0500 Subject: [cmake-developers] [PATCH] User may now specify toolset through CMake GUI In-Reply-To: <1424032078-7144-1-git-send-email-rcdailey.lists@gmail.com> References: <1424032078-7144-1-git-send-email-rcdailey.lists@gmail.com> Message-ID: <54E21C63.8030706@kitware.com> On 02/15/2015 03:27 PM, rcdailey.lists at gmail.com wrote: > From: Robert Dailey > > The -T parameter to CMake may now be specified through QtDialog > (cmake-gui) via a new text field in the first-time configure > wizard (below the generator chooser). Thanks for working on this. I think QCMake::setBinaryDirectory also needs to check for CMAKE_GENERATOR_TOOLSET from an existing cache file much like it already does for CMAKE_GENERATOR. One may currently use the "Add Entry" button to pre-define an entry for CMAKE_GENERATOR_TOOLSET to set this from the GUI indirectly. Since not all generators support this field, we should not present it when a non-supporting generator is selected. This will need some type of query on the selected generator to be added. Thanks, -Brad From rcdailey.lists at gmail.com Mon Feb 16 11:59:38 2015 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Mon, 16 Feb 2015 10:59:38 -0600 Subject: [cmake-developers] [PATCH] User may now specify toolset through CMake GUI In-Reply-To: <54E21C63.8030706@kitware.com> References: <1424032078-7144-1-git-send-email-rcdailey.lists@gmail.com> <54E21C63.8030706@kitware.com> Message-ID: Fair points, I will make the changes. What is the recommended practice for updating patches on mailing lists? With pull requests it's easy because it picks up my changes I push to my branch automatically. I think if I push another patch to the mailing list it will start another email thread, which may cause lost context since this email chain won't be connected to the new one (not sure if that matters). Thanks Brad. On Mon, Feb 16, 2015 at 10:35 AM, Brad King wrote: > On 02/15/2015 03:27 PM, rcdailey.lists at gmail.com wrote: >> From: Robert Dailey >> >> The -T parameter to CMake may now be specified through QtDialog >> (cmake-gui) via a new text field in the first-time configure >> wizard (below the generator chooser). > > Thanks for working on this. I think QCMake::setBinaryDirectory > also needs to check for CMAKE_GENERATOR_TOOLSET from an existing > cache file much like it already does for CMAKE_GENERATOR. One > may currently use the "Add Entry" button to pre-define an entry > for CMAKE_GENERATOR_TOOLSET to set this from the GUI indirectly. > > Since not all generators support this field, we should not present > it when a non-supporting generator is selected. This will need > some type of query on the selected generator to be added. > > Thanks, > -Brad > From clinton at elemtech.com Mon Feb 16 12:28:02 2015 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 16 Feb 2015 10:28:02 -0700 Subject: [cmake-developers] [PATCH] User may now specify toolset through CMake GUI In-Reply-To: <54E21C63.8030706@kitware.com> References: <1424032078-7144-1-git-send-email-rcdailey.lists@gmail.com> <54E21C63.8030706@kitware.com> Message-ID: <2446080.j9MiVOKyg6@stryke> On Monday, February 16, 2015 11:35:47 AM Brad King wrote: > On 02/15/2015 03:27 PM, rcdailey.lists at gmail.com wrote: > > From: Robert Dailey > > > > The -T parameter to CMake may now be specified through QtDialog > > (cmake-gui) via a new text field in the first-time configure > > wizard (below the generator chooser). > > Thanks for working on this. I think QCMake::setBinaryDirectory > also needs to check for CMAKE_GENERATOR_TOOLSET from an existing > cache file much like it already does for CMAKE_GENERATOR. One > may currently use the "Add Entry" button to pre-define an entry > for CMAKE_GENERATOR_TOOLSET to set this from the GUI indirectly. > > Since not all generators support this field, we should not present > it when a non-supporting generator is selected. This will need > some type of query on the selected generator to be added. > > Thanks, > -Brad In addition to Brad's comments, QCMake::deleteCache() should reset the Toolset member. Thanks, Clint From orion at cora.nwra.com Mon Feb 16 12:27:21 2015 From: orion at cora.nwra.com (Orion Poplawski) Date: Mon, 16 Feb 2015 10:27:21 -0700 Subject: [cmake-developers] [ANNOUNCE] CMake 3.2.0-rc1 now ready for testing! In-Reply-To: References: Message-ID: <54E22879.6010605@cora.nwra.com> On 02/13/2015 01:12 PM, Robert Maynard wrote: > I am proud to announce that CMake 3.2 has entered the release candidate stage. We're getting a fair number of test failures on Fedora Rawhide (with gcc 5 c++11): The following tests FAILED: 25 - FindPackageTest (Failed) 27 - StringFileTest (Failed) 44 - ObjectLibrary (Failed) 60 - ExportImport (Failed) 142 - ExternalProject (Failed) 143 - ExternalProjectLocal (Failed) 162 - Plugin (Failed) 264 - CMakeOnly.MajorVersionSelection-PythonLibs_2 (Failed) 265 - CMakeOnly.MajorVersionSelection-PythonLibs_3 (Failed) 280 - RunCMake.CMP0043 (Failed) 287 - RunCMake.CMP0054 (Failed) 292 - RunCMake.CompilerChange (Failed) 298 - RunCMake.FPHSA (Failed) 301 - RunCMake.GeneratorToolset (Failed) 308 - RunCMake.CompileFeatures (Failed) 309 - RunCMake.WriteCompilerDetectionHeader (Failed) 317 - RunCMake.build_command (Failed) 325 - RunCMake.get_property (Failed) 328 - RunCMake.include_directories (Failed) 342 - RunCMake.no_install_prefix (Failed) 344 - RunCMake.ObsoleteQtMacros (Failed) 346 - RunCMake.File_Generate (Failed) 351 - RunCMake.CommandLine (Failed) 367 - CMake.ImplicitLinkInfo (Failed) Full logs here: https://kojipkgs.fedoraproject.org//work/tasks/2902/8952902/build.log It builds fine on F22 which also has gcc 5, but not the c++11 ABI, so that seems like the likely culprit. -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA/CoRA Division FAX: 303-415-9702 3380 Mitchell Lane orion at cora.nwra.com Boulder, CO 80301 http://www.cora.nwra.com From brad.king at kitware.com Mon Feb 16 12:54:50 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 16 Feb 2015 12:54:50 -0500 Subject: [cmake-developers] [PATCH] User may now specify toolset through CMake GUI In-Reply-To: References: <1424032078-7144-1-git-send-email-rcdailey.lists@gmail.com> <54E21C63.8030706@kitware.com> Message-ID: <54E22EEA.10802@kitware.com> On 02/16/2015 11:59 AM, Robert Dailey wrote: > What is the recommended practice for updating patches on mailing > lists? With pull requests it's easy because it picks up my changes I > push to my branch automatically. I think if I push another patch to > the mailing list it will start another email thread, which may cause > lost context since this email chain won't be connected to the new one > (not sure if that matters). Please squash the changes and send a revised patch. You can just use the normal "Reply" operation in your mailer and attach the patch. You don't have to use "git send-email". If you do want to use "git send-email" then with "git format-patch" you can pass "-v 2 --in-reply-to=''" where is the value of the "Message-ID: ..." header field in the message to which you're replying. That will keep it in the same thread. Thanks, -Brad From brad.king at kitware.com Mon Feb 16 13:01:30 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 16 Feb 2015 13:01:30 -0500 Subject: [cmake-developers] [PATCH] VS Fortran project file: Fix mismatch between OutputDirectory and OutputFile In-Reply-To: References: Message-ID: <54E2307A.4090103@kitware.com> On 02/14/2015 03:56 PM, Vincent Newsum wrote: > - << "\t\t\tOutputDirectory=\"" << configName << "\"\n"; > + << "\t\t\tOutputDirectory=\"" << target.GetDirectory(configName) << "\"\n"; Thanks. The OutputFile is computed differently for different target types. We also need to encode the value for XML. Furthermore the value of OutputDirectory is used for $(OutDir), and that is used as CMAKE_CFG_INTDIR. The latter should be $(ConfigurationName) instead so that we can change $(OutDir). I've fixed both problems: VS: Use $(ConfigurationName) as CMAKE_CFG_INTDIR in VS 7, 8, 9 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa2ba121 VS: Fix .vcproj and .vfproj file OutputDirectory generation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa8b30eb -Brad From brad.king at kitware.com Mon Feb 16 13:07:20 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 16 Feb 2015 13:07:20 -0500 Subject: [cmake-developers] GCC5 and C++11 ABI (was: CMake 3.2.0-rc1 now ready for testing) In-Reply-To: <54E22879.6010605@cora.nwra.com> References: <54E22879.6010605@cora.nwra.com> Message-ID: <54E231D8.9070009@kitware.com> On 02/16/2015 12:27 PM, Orion Poplawski wrote: > We're getting a fair number of test failures on Fedora Rawhide (with gcc > 5 c++11): > It builds fine on F22 which also has gcc 5, but not the c++11 ABI, so > that seems like the likely culprit. To see if this has anything to do with the way CMake itself is compiled, please add this to the end of the bootstrap command line: -- -DCMAKE_C_STANDARD=90 -DCMAKE_CXX_STANDARD=98 Thanks, -Brad From domen.vrankar at gmail.com Mon Feb 16 14:47:41 2015 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Mon, 16 Feb 2015 20:47:41 +0100 Subject: [cmake-developers] KWSys patches In-Reply-To: <54E20763.2070306@kitware.com> References: <54E20763.2070306@kitware.com> Message-ID: > I'll get the KWSys patch through. Once it is integrated into > CMake then you can rebase the CMake part of the change on that. > > However, please revise the logic in the KWSys patch to avoid > using exceptions. I've noticed that exceptions are not used but was not certain how else to handle this (and CMake at least printed out the error message before exiting - did not know that this is common code for different projects at the time). I have a few ideas but they all seem semi optimal to me so I'll need some guidance regarding this... One option would be to return empty string from Directory::GetCanonicalPath if an error occurs but currently when Glob::FindFiles returns false error checking in CMake code treats it as if no files were found so I don't think that returning false would be the way to go. Other option would be to call exit() inside the Directory::GetCanonicalPath function but I guess that this would be even worse than throwing an exception... Third option that came to mid was to return empty string Directory::GetCanonicalPath if an error occurs and simply ignore it in Glob class - since the error should occur only rarely/never and circular recursion is a corner case this is probably the best solution... One more question... When I first started writing the patch I thought about printing out a warning if circular recursion is detected but was not certain if it would be OK to just write the output to std::cerr (or the kwsys wrapper equivalent) with canonical paths that caused it. Should I leave out such message or would it be better to add it and how? Thanks, Domen From brad.king at kitware.com Mon Feb 16 14:57:13 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 16 Feb 2015 14:57:13 -0500 Subject: [cmake-developers] KWSys patches In-Reply-To: References: <54E20763.2070306@kitware.com> Message-ID: <54E24B99.3010709@kitware.com> On 02/16/2015 02:47 PM, Domen Vrankar wrote: > I've noticed that exceptions are not used but was not certain how else > to handle this FYI, the proposed GetCanonicalPath already exists in KWSys as SystemTools::GetRealPath. It returns the unchanged path on error. That could be extended to take an optional second argument as a pointer to a buffer describing the error. If the argument is NULL use the current behavior. Otherwise return an empty string and populate the error info. Then make your new call sites use the new argument. > One more question... When I first started writing the patch I thought > about printing out a warning if circular recursion is detected but was > not certain if it would be OK to just write the output to std::cerr > (or the kwsys wrapper equivalent) with canonical paths that caused it. > Should I leave out such message or would it be better to add it and > how? Since KWSys is a library it shouldn't print anything on behalf of the application. The Glob API could also take an optional pointer to an error description buffer. Thanks, -Brad From aleixpol at kde.org Mon Feb 16 15:31:45 2015 From: aleixpol at kde.org (Aleix Pol) Date: Mon, 16 Feb 2015 21:31:45 +0100 Subject: [cmake-developers] Extracting target metadata, IDE integration In-Reply-To: References: <54C65C0F.9090902@kitware.com> Message-ID: On Sat, Feb 14, 2015 at 1:02 PM, Stephen Kelly wrote: > Aleix Pol wrote: > >> Hi guys, >> It's been since August with this. I understand we're all busy but this >> step is important for KDevelop as well as for other IDE's and I >> wouldn't like this to rot. >> >> Please, let's keep it moving forward. > > As far as I'm aware, it needs to move forward from this point: > > http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10711/focus=12151 > > I'm not certain the design is finished (eg what the file should contain now > or eventually). I asked for tests/documentation as a way to trigger getting > the design finished. Having either would give us a list of use-cases and we > would know what's in scope and what's not in scope (eg whether compile > options/link options are in scope and why). I can look further into documentation, if that's what holding us back. > > Another question: do you have any opinion about whether this should be one > global file or one file per directory? I don't know - it seems like > something that might or might not be relevant for tooling. Is the size of > the generated file a consideration? I think the best is to have it all in 1 directory. You don't really want to have watchers on many files over there. > > How well does this feature work with large projects like VTK or a combined > build of LLVM/Clang/lldb/libcxx/other ll projects. I just generated the file for LLVM: https://paste.kde.org/pxl8ozwah It's a 127KiB file, I don't think it's too mental considering it's a 330 MiB repository. Aleix From orion at cora.nwra.com Mon Feb 16 16:26:43 2015 From: orion at cora.nwra.com (Orion Poplawski) Date: Mon, 16 Feb 2015 14:26:43 -0700 Subject: [cmake-developers] GCC5 and C++11 ABI In-Reply-To: <54E231D8.9070009@kitware.com> References: <54E22879.6010605@cora.nwra.com> <54E231D8.9070009@kitware.com> Message-ID: <54E26093.8050606@cora.nwra.com> On 02/16/2015 11:07 AM, Brad King wrote: > On 02/16/2015 12:27 PM, Orion Poplawski wrote: >> We're getting a fair number of test failures on Fedora Rawhide (with gcc >> 5 c++11): >> It builds fine on F22 which also has gcc 5, but not the c++11 ABI, so >> that seems like the likely culprit. > > To see if this has anything to do with the way CMake itself is compiled, > please add this to the end of the bootstrap command line: > > -- -DCMAKE_C_STANDARD=90 -DCMAKE_CXX_STANDARD=98 > > Thanks, > -Brad > That does indeed make the tests succeed. -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA/CoRA Division FAX: 303-415-9702 3380 Mitchell Lane orion at cora.nwra.com Boulder, CO 80301 http://www.cora.nwra.com From brad.king at kitware.com Mon Feb 16 16:48:00 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 16 Feb 2015 16:48:00 -0500 Subject: [cmake-developers] GCC5 and C++11 ABI In-Reply-To: <54E26093.8050606@cora.nwra.com> References: <54E22879.6010605@cora.nwra.com> <54E231D8.9070009@kitware.com> <54E26093.8050606@cora.nwra.com> Message-ID: <54E26590.3090001@kitware.com> On 02/16/2015 04:26 PM, Orion Poplawski wrote: > On 02/16/2015 11:07 AM, Brad King wrote: >> To see if this has anything to do with the way CMake itself is compiled, >> please add this to the end of the bootstrap command line: >> >> -- -DCMAKE_C_STANDARD=90 -DCMAKE_CXX_STANDARD=98 > > That does indeed make the tests succeed. Great. It *is* safe for you to package that way while we figure this out upstream. Thanks, -Brad From neundorf at kde.org Mon Feb 16 16:44:01 2015 From: neundorf at kde.org (Alexander Neundorf) Date: Mon, 16 Feb 2015 22:44:01 +0100 Subject: [cmake-developers] Extracting target metadata, IDE integration In-Reply-To: References: Message-ID: <3598487.BMqLxZv4oP@tuxedo.neundorf.net> On Monday, February 16, 2015 21:31:45 Aleix Pol wrote: > On Sat, Feb 14, 2015 at 1:02 PM, Stephen Kelly wrote: > > Aleix Pol wrote: > >> Hi guys, > >> It's been since August with this. I understand we're all busy but this > >> step is important for KDevelop as well as for other IDE's and I > >> wouldn't like this to rot. > >> > >> Please, let's keep it moving forward. > > > > As far as I'm aware, it needs to move forward from this point: > > http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10711/fo > > cus=12151> > > I'm not certain the design is finished (eg what the file should contain > > now > > or eventually). I asked for tests/documentation as a way to trigger > > getting > > the design finished. Having either would give us a list of use-cases and > > we > > would know what's in scope and what's not in scope (eg whether compile > > options/link options are in scope and why). > > I can look further into documentation, if that's what holding us back. > > > Another question: do you have any opinion about whether this should be one > > global file or one file per directory? I don't know - it seems like > > something that might or might not be relevant for tooling. Is the size of > > the generated file a consideration? > > I think the best is to have it all in 1 directory. You don't really > want to have watchers on many files over there. > > > How well does this feature work with large projects like VTK or a combined > > build of LLVM/Clang/lldb/libcxx/other ll projects. > > I just generated the file for LLVM: https://paste.kde.org/pxl8ozwah > It's a 127KiB file, I don't think it's too mental considering it's a > 330 MiB repository. I didn't follow the whole thread, just a few quick questions from looking at the file: { "name": "obj2yaml", "type": "EXECUTABLE", "configs": [ ], "directory": "/home/kde-devel/tmp/llvm/build/bin", "location": "/home/kde-devel/tmp/llvm/build/bin/obj2yaml", "backtrace": ["/home/kde-devel/tmp/llvm/cmake/modules/AddLLVM.cmake:452", "/home/kde-devel/tmp/llvm/cmake/modules/AddLLVM.cmake:485", "/home/kde-devel/tmp/llvm/tools/obj2yaml/CMakeLists.txt:6"], "installed": true }, I guess "name" is the name of the target, type, configs, location, backtrace and installed seem to be clear. What about "directory" ? This is not the build dir where the target is defined (i.e. cmake_binary_dir(llvm/tools/obj2yaml/), is it ? This directory would seem useful to me, e.g. you can run "make help" there to get the list of targets to compile/assemble/preprocess the files for that target. Or you can run the clean-script for that target. Alex From orion at cora.nwra.com Mon Feb 16 17:03:18 2015 From: orion at cora.nwra.com (Orion Poplawski) Date: Mon, 16 Feb 2015 15:03:18 -0700 Subject: [cmake-developers] GCC5 and C++11 ABI In-Reply-To: <54E26590.3090001@kitware.com> References: <54E22879.6010605@cora.nwra.com> <54E231D8.9070009@kitware.com> <54E26093.8050606@cora.nwra.com> <54E26590.3090001@kitware.com> Message-ID: <54E26926.5070605@cora.nwra.com> On 02/16/2015 02:48 PM, Brad King wrote: > On 02/16/2015 04:26 PM, Orion Poplawski wrote: >> On 02/16/2015 11:07 AM, Brad King wrote: >>> To see if this has anything to do with the way CMake itself is compiled, >>> please add this to the end of the bootstrap command line: >>> >>> -- -DCMAKE_C_STANDARD=90 -DCMAKE_CXX_STANDARD=98 >> >> That does indeed make the tests succeed. > > Great. > > It *is* safe for you to package that way while we figure this out upstream. > > Thanks, > -Brad > Thanks, will do. -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA/CoRA Division FAX: 303-415-9702 3380 Mitchell Lane orion at cora.nwra.com Boulder, CO 80301 http://www.cora.nwra.com From steveire at gmail.com Tue Feb 17 02:41:45 2015 From: steveire at gmail.com (Stephen Kelly) Date: Tue, 17 Feb 2015 08:41:45 +0100 Subject: [cmake-developers] [ANNOUNCE] CMake 3.2.0-rc1 now ready for testing! References: <54E22879.6010605@cora.nwra.com> Message-ID: Orion Poplawski wrote: > On 02/13/2015 01:12 PM, Robert Maynard wrote: >> I am proud to announce that CMake 3.2 has entered the release candidate >> stage. > > We're getting a fair number of test failures on Fedora Rawhide (with gcc > 5 c++11): This is a bug in GCC. I filed a bug and committed a workaround: http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aaad0bf3 Work around bug in pre-release GNU CXX 5.0. Thanks, Steve. From brad.king at kitware.com Tue Feb 17 09:16:13 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 17 Feb 2015 09:16:13 -0500 Subject: [cmake-developers] [ANNOUNCE] CMake 3.2.0-rc1 now ready for testing! In-Reply-To: References: <54E22879.6010605@cora.nwra.com> Message-ID: <54E34D2D.3060402@kitware.com> On 02/17/2015 02:41 AM, Stephen Kelly wrote: > Orion Poplawski wrote: >> We're getting a fair number of test failures on Fedora Rawhide (with gcc >> 5 c++11): > > This is a bug in GCC. I filed a bug and committed a workaround: > > http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aaad0bf3 > Work around bug in pre-release GNU CXX 5.0. Thanks for tracking that down, Steve! -Brad From mantis at public.kitware.com Tue Feb 17 09:17:04 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Tue, 17 Feb 2015 09:17:04 -0500 Subject: [cmake-developers] [CMake 0015407]: source_group: Multiple REGEX and Checking Message-ID: <1321cbafb6ebf5863095a0c9f4aba921@www.cmake.org> The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15407 ====================================================================== Reported By: S. Paris Assigned To: ====================================================================== Project: CMake Issue ID: 15407 Category: CMake Reproducibility: always Severity: feature Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-17 09:17 EST Last Modified: 2015-02-17 09:17 EST ====================================================================== Summary: source_group: Multiple REGEX and Checking Description: It would be really convenient to have the possibility for source_group to: 1. Specify multiple regular expressions in one or multiple commands: source_group("foo" REGULAR_EXPRESSIONS reg0 reg1) source_group("foo" REGULAR_EXPRESSION reg2) # Would result in "foo" being selected for files matching reg0, reg1, or reg2 2. Check if a source_group has been specified: get_source_group("foo" FILES result0 REGULAR_EXPRESSION result1) # Would fill result0 with the files defined for "foo" and result1 with the regexps defined for "foo" Steps to Reproduce: source_group("foo" REGULAR_EXPRESSION reg0) source_group("foo" REGULAR_EXPRESSION reg1) # from here "foo" group will not be selected anymore for files matching reg0 but not reg1 Additional Information: 1. should really be a piece of cake to implement, just make "cmsys::RegularExpression GroupRegex" in cmSourceGroup.h a "std::set" as it is for GroupFiles; update cmSourceGroupCommand.cxx accordingly. 2. is using Makefile->GetSourceGroup() and is even simpler to implement isn't it? ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-17 09:17 S. Paris New Issue ====================================================================== From brad.king at kitware.com Tue Feb 17 09:30:52 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 17 Feb 2015 09:30:52 -0500 Subject: [cmake-developers] [PATCH 0/6] XCTest Bundles v4 In-Reply-To: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> References: <1424033583-40360-1-git-send-email-gjasny@googlemail.com> Message-ID: <54E3509C.2080108@kitware.com> On 02/15/2015 03:52 PM, Gregor Jasny wrote: > this series contains the latest XCTest patches. Thanks. The primary remaining work is to figure out how to get these tests activated. IIRC in earlier discussion you said that some local machine setup is required. For that we need some kind of option/condition in Tests/CMakeLists.txt to activate these tests. See existing options like "CMake_TEST_FindJsonCpp" for similar examples of tests that require explicit local configuration on the test machine. Please also add a "Help/release/dev/xcode-xctest.rst" file with release notes describing the features added by this patch series. See other files in that directory for examples. For the ${_CMAKE_OSX_SYSROOT_PATH}/../../Library/Frameworks path, please look at using get_filename_component to strip components instead of using "../" components in the path. In Tests/XcodePlatformFrameworks for detecting the Xcode version you can use XCODE_VERSION: http://www.cmake.org/cmake/help/v3.2/variable/XCODE_VERSION.html Also this test could move to Tests/RunCMake/XcodeProject. In Tests/RunCMake/CMakeLists.txt one could pass XCODE_VERSION into the test's RunCMakeTest. Thanks, -Brad From brad.king at kitware.com Tue Feb 17 10:16:16 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 17 Feb 2015 10:16:16 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54DE1EDA.4040407@kitware.com> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <54DE1EDA.4040407@kitware.com> Message-ID: <54E35B40.3080701@kitware.com> On 02/13/2015 10:57 AM, Brad King wrote: > I had to add two commits to the topic to fix some continuous > testing failures: > > Please rebase further work on commit 5e91eb43. I will squash > all this together later before merging to 'master'. After a few more fixes for other nightly testing failures I squashed all the changes into: FindMatlab: Rewrite module and provide a usage API http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d414ca2 On your nightly submissions all the tests are passing on Windows. However, all FindMatlab-related tests fail on the other platforms. I've reverted the whole topic from 'next' for now until you have time to address these failures. Please base further patches on commit 9d414ca2. Thanks, -Brad From raffi.enficiaud at free.fr Tue Feb 17 10:20:33 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Tue, 17 Feb 2015 16:20:33 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54E35B40.3080701@kitware.com> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <54DE1EDA.4040407@kitware.com> <54E35B40.3080701@kitware.com> Message-ID: <55D72A2B-5CEC-42E2-919E-301E845B7B31@free.fr> Dear Brad, Yes, thank you, you did well. And sorry for the delay, it takes more time than expected. Best regards, Raffi Enficiaud > On 17 Feb 2015, at 16:16, Brad King wrote: > > On 02/13/2015 10:57 AM, Brad King wrote: >> I had to add two commits to the topic to fix some continuous >> testing failures: >> >> Please rebase further work on commit 5e91eb43. I will squash >> all this together later before merging to 'master'. > > After a few more fixes for other nightly testing failures I > squashed all the changes into: > > FindMatlab: Rewrite module and provide a usage API > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d414ca2 > > On your nightly submissions all the tests are passing on Windows. > However, all FindMatlab-related tests fail on the other platforms. > I've reverted the whole topic from 'next' for now until you have > time to address these failures. Please base further patches on > commit 9d414ca2. > > Thanks, > -Brad > From brad.king at kitware.com Tue Feb 17 11:01:56 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 17 Feb 2015 11:01:56 -0500 Subject: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support In-Reply-To: References: <0543633b28c7431f93808182fc1e26e1@CO1PR07MB208.namprd07.prod.outlook.com> <543D2BBC.1010306@kitware.com> <0b5b33c4d1f0472782e260f9e5bce980@CO1PR07MB208.namprd07.prod.outlook.com> <544E4C9F.3050408@kitware.com> <64abd7ba273245b686146aa67acb7e8a@DM2PR0701MB1020.namprd07.prod.outlook.com> <545A7C44.6040305@kitware.com> <5474E132.2010705@kitware.com> <54D129E3.60101@kitware.com> Message-ID: <54E365F4.3030104@kitware.com> On 02/17/2015 10:47 AM, Geoffrey Viola wrote: > I submitted a test report with all the tests passing. > https://open.cdash.org/buildSummary.php?buildid=3698090. Great, thanks. However, we really need to have the cmake_common.cmake script used to drive it. What I was asking in my previous response was for you to get a normal nightly testing dashboard submission configured and working independent of your changes. For that using the common script with ctest_update is okay. > I'm not sure how to handle cases where the user wants to run all > the test and expects all to pass, but does not have Green Hills installed. Any tests depending on local system configuration need to have an option to explicitly enable them on such systems. See the existing CMake_TEST_FindJsonCpp option for example. Just put your new test(s) inside a condition on a CMake_TEST_GreenHillsMULTI variable. Then add to your dashboard script:: set(dashboard_cache " CMake_TEST_GreenHillsMULTI:BOOL=ON ") before including cmake_common.cmake and the tests will be enabled once they are in the repo. Thanks, -Brad From Geoffrey.Viola at asirobots.com Tue Feb 17 10:47:32 2015 From: Geoffrey.Viola at asirobots.com (Geoffrey Viola) Date: Tue, 17 Feb 2015 15:47:32 +0000 Subject: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support In-Reply-To: <54D129E3.60101@kitware.com> References: <0543633b28c7431f93808182fc1e26e1@CO1PR07MB208.namprd07.prod.outlook.com> <543D2BBC.1010306@kitware.com> <0b5b33c4d1f0472782e260f9e5bce980@CO1PR07MB208.namprd07.prod.outlook.com> <544E4C9F.3050408@kitware.com> <64abd7ba273245b686146aa67acb7e8a@DM2PR0701MB1020.namprd07.prod.outlook.com> <545A7C44.6040305@kitware.com> <5474E132.2010705@kitware.com> <54D129E3.60101@kitware.com> Message-ID: I submitted a test report with all the tests passing. https://open.cdash.org/buildSummary.php?buildid=3698090. This test report includes the extra tests that I added. It looks like things are running even though I haven't made any changes specifically to fix those failing tests. One of the issues I had before was that I used the auto generated CTestScript.cmake script that ran "CTEST_UPDATE(SOURCE "${CTEST_SOURCE_DIRECTORY}")." In addition, I found it unusual that the "CMakeOnly.MajorVersionSelection-PythonInterp_2" test will fail if there is a path to the python 3.3 executable. Also, the "CMake.GetPrerequisites" will sometimes timeout on my machine. > You can use Windows Task Scheduler to run a .bat file that calls ctest with the dashboard script. I set up a nightly build on my machine. I'm not sure how to handle cases where the user wants to run all the test and expects all to pass, but does not have Green Hills installed. Geoffrey Viola SOFTWARE ENGINEER asirobots.com -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Tuesday, February 03, 2015 1:05 PM To: Geoffrey Viola Cc: cmake-developers at cmake.org Subject: Re: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support On 01/28/2015 10:51 PM, Geoffrey Viola wrote: > I submitted some builds. > I'm not sure why 9 fail. Okay, let's get your builds submitting cleanly with no local changes first. That way we can identify whether any of your changes cause the failures. There are basic instructions for setting up a nightly build here: http://www.cmake.org/Wiki/CMake/Git/Dashboard You can use Windows Task Scheduler to run a .bat file that calls ctest with the dashboard script. Once we get your submission to a clean state then we can continue looking at the changes for the new generator and whether they cause any failures. Thanks, -Brad This message contains confidential information and is intended only for the recipient. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately if you have received this e-mail by mistake and delete this e-mail from your system. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Added-some-support-for-a-Green-Hills-MULTI.patch Type: application/octet-stream Size: 63138 bytes Desc: 0001-Added-some-support-for-a-Green-Hills-MULTI.patch URL: From rcdailey.lists at gmail.com Tue Feb 17 12:21:53 2015 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Tue, 17 Feb 2015 11:21:53 -0600 Subject: [cmake-developers] [PATCH] User may now specify toolset through CMake GUI In-Reply-To: <54E22EEA.10802@kitware.com> References: <1424032078-7144-1-git-send-email-rcdailey.lists@gmail.com> <54E21C63.8030706@kitware.com> <54E22EEA.10802@kitware.com> Message-ID: What would be the best way to handle detecting which generators support toolset? The confusing piece I had to figure out last night is that there is simply no "generator" base class from which everything derives, there are 2 types: extra generators and generators. So far the best thing I can think of is to add a new method to the cmake class to return a list of strings of all generators (both extra and base generators) that support toolsets. Then I would propagate this list up to QCMake and then to the Initial setup dialog so that it can compare the toolset selection with the contents of that string list. Is there a better way, design-wise? I'm still learning the overall architecture. On Mon, Feb 16, 2015 at 11:54 AM, Brad King wrote: > On 02/16/2015 11:59 AM, Robert Dailey wrote: >> What is the recommended practice for updating patches on mailing >> lists? With pull requests it's easy because it picks up my changes I >> push to my branch automatically. I think if I push another patch to >> the mailing list it will start another email thread, which may cause >> lost context since this email chain won't be connected to the new one >> (not sure if that matters). > > Please squash the changes and send a revised patch. > > You can just use the normal "Reply" operation in your mailer > and attach the patch. You don't have to use "git send-email". > > If you do want to use "git send-email" then with "git format-patch" > you can pass "-v 2 --in-reply-to=''" where > is the value of the "Message-ID: ..." header field in the message > to which you're replying. That will keep it in the same thread. > > Thanks, > -Brad > From brad.king at kitware.com Tue Feb 17 13:08:23 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 17 Feb 2015 13:08:23 -0500 Subject: [cmake-developers] [PATCH] User may now specify toolset through CMake GUI In-Reply-To: References: <1424032078-7144-1-git-send-email-rcdailey.lists@gmail.com> <54E21C63.8030706@kitware.com> <54E22EEA.10802@kitware.com> Message-ID: <54E38397.8050909@kitware.com> On 02/17/2015 12:21 PM, Robert Dailey wrote: > What would be the best way to handle detecting which generators support toolset? > > The confusing piece I had to figure out last night is that there is > simply no "generator" base class from which everything derives, there > are 2 types: extra generators and generators. The "extra generators" are not of concern here. They are only ever used in conjunction with real "generators". The base class for the latter is cmGlobalGenerator. However, cmGlobalGeneratorFactory is also a candidate for this check since it exists before the actual generator is created. You'll have to pick whichever works more cleanly for this use case. -Brad From rcdailey.lists at gmail.com Tue Feb 17 13:43:11 2015 From: rcdailey.lists at gmail.com (Robert Dailey) Date: Tue, 17 Feb 2015 12:43:11 -0600 Subject: [cmake-developers] [PATCH] User may now specify toolset through CMake GUI In-Reply-To: <54E38397.8050909@kitware.com> References: <1424032078-7144-1-git-send-email-rcdailey.lists@gmail.com> <54E21C63.8030706@kitware.com> <54E22EEA.10802@kitware.com> <54E38397.8050909@kitware.com> Message-ID: On Tue, Feb 17, 2015 at 12:08 PM, Brad King wrote: > On 02/17/2015 12:21 PM, Robert Dailey wrote: >> What would be the best way to handle detecting which generators support toolset? >> >> The confusing piece I had to figure out last night is that there is >> simply no "generator" base class from which everything derives, there >> are 2 types: extra generators and generators. > > The "extra generators" are not of concern here. They are only ever > used in conjunction with real "generators". The base class for the > latter is cmGlobalGenerator. However, cmGlobalGeneratorFactory is > also a candidate for this check since it exists before the actual > generator is created. You'll have to pick whichever works more > cleanly for this use case. Of course right now only Visual Studio and XCode support the toolset parameter (according to the docs). These both happen to be global generators. However, I was thinking of a case in the future where Eclipse CDT4 or Code Blocks may support toolsets. Would these be implemented through global generators anyway? Does it make sense for extra generators to support toolset? Some educational explanation here for my benefit would be appreciated. From brad.king at kitware.com Tue Feb 17 13:46:07 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 17 Feb 2015 13:46:07 -0500 Subject: [cmake-developers] [PATCH] User may now specify toolset through CMake GUI In-Reply-To: References: <1424032078-7144-1-git-send-email-rcdailey.lists@gmail.com> <54E21C63.8030706@kitware.com> <54E22EEA.10802@kitware.com> <54E38397.8050909@kitware.com> Message-ID: <54E38C6F.2030500@kitware.com> On 02/17/2015 01:43 PM, Robert Dailey wrote: > Of course right now only Visual Studio and XCode support the toolset > parameter Correct. Furthermore it is supported only for VS >= 10. > I was thinking of a case in the future where > Eclipse CDT4 or Code Blocks may support toolsets. Would these be > implemented through global generators anyway? Does it make sense for > extra generators to support toolset? No. Extra generators only ever work in conjunction with a normal generator like Unix Makefiles. The main generator determines the toolchain. The "extra" generators just write out information for an IDE to browse the sources of the targets. The only "build" operation these generators have is that the IDEs may offer a button to run "make" to drive the main generator's build rules. -Brad From raffi.enficiaud at free.fr Tue Feb 17 19:28:57 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Wed, 18 Feb 2015 01:28:57 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54DE1A19.8050403@kitware.com> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> Message-ID: Dear Brad, Please find attached a patch addressing the issues mentioned in your email. The tests were failing because of the following modification: - matlab_get_version_from_matlab_run(${Matlab_MAIN_PROGRAM} matlab_list_of_all_versions) + matlab_get_version_from_matlab_run("${Matlab_MAIN_PROGRAM}" matlab_list_of_all_versions) Apparently the quotes here are interpreted as part of the binary name, which prevents the proper call to matlab using the execute_process function. I kept the symlink resolution, but I narrowed the case those should be resolved. I added a variable pointing to the (symlink resolved) location of the binary from which the version is retrieved. I compare paths symlink resolved for that purpose. I hope this is in line with what you would like to have. Note that I only tested on LinuxLTS14.04 locally, I will test further tomorrow morning. I also changed the build path of the Windows agent, the build should be clear on Windows now. Best regards, Raffi Enficiaud -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Addressing-the-visibility-of-the-internal-variables-.patch Type: application/octet-stream Size: 9138 bytes Desc: not available URL: -------------- next part -------------- > On 13 Feb 2015, at 16:36, Brad King wrote: > > On 02/13/2015 09:43 AM, Raffi Enficiaud wrote: >>> * Why is Matlab_VERSION_STRING cached? Shouldn't it be computed >>> every time from the matlab that was found? >> >> In case the version is not found with an obvious method >> (on OSX /Applications/MATLABVersion, on Win32, the version also is >> given by the registry key), we have to find the version of matlab >> by running matlab itself. I am caching the version once I have it >> to prevent any further execution of matlab for retrieving this >> information. > > Okay. Currently the value is user-facing, but it shouldn't ever be > edited manually, right? Instead the detected version could be cached > in an INTERNAL cache entry. Also there should be a second internal > entry that records which matlab program was executed to compute the > version. If the latter does not match then the version should be > re-computed. > >> In case a symlink of the binary called "matlab" exists in /usr/local/bin >> for instance, I need to retrieve the path of the libraries mex, mx etc, >> that are relative to the real installation path of matlab. > > In that case I think you should look for those pieces relative to > the original executable location first, and if not found then > resolve symlinks into a temporary variable name and then use that. > The resolved path should not be made user-facing so that any user > that sets Matlab_MAIN_PROGRAM explicitly will see that value > persist. > > Thanks, > -Brad > From mantis at public.kitware.com Wed Feb 18 01:12:57 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Wed, 18 Feb 2015 01:12:57 -0500 Subject: [cmake-developers] [CMake 0015408]: FindJNI missing JAVA_AWT_LIBRARY on JDK9 as jdk/lib/ is not included in JAVA_AWT_LIBRARY_DIRECTORIES Message-ID: <6fcf0e02328bf19027798a2009f1423e@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15408 ====================================================================== Reported By: Tiago St?rmer Daitx Assigned To: ====================================================================== Project: CMake Issue ID: 15408 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-18 01:12 EST Last Modified: 2015-02-18 01:12 EST ====================================================================== Summary: FindJNI missing JAVA_AWT_LIBRARY on JDK9 as jdk/lib/ is not included in JAVA_AWT_LIBRARY_DIRECTORIES Description: JDK9's directory structure changes and no jdk/jre exists. The right arch lib path is now jdk/lib/ (instead of jdk/jre/lib/). CMake error when building hadoop-common: [exec] CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message): [exec] Could NOT find JNI (missing: JAVA_AWT_LIBRARY) [exec] Call Stack (most recent call first): [exec] /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FA-- Detecting CXX compiler ABI info - done [exec] -- Configuring incomplete, errors occurred! [exec] See also "/home/tdaitx/hadoop-2.6.0-src/hadoop-common-project/hadoop-common/target/native/CMakeFiles/CMakeOutput.log". [exec] ILURE_MESSAGE) [exec] /usr/share/cmake-2.8/Modules/FindJNI.cmake:252 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) [exec] CMakeLists.txt:103 (find_p [exec] ackage) Steps to Reproduce: 1. Build JDK9 2. Compile hadoop-common-project/hadoop-common Additional Information: hadoop-common has its own bug and might require a patch, see https://issues.apache.org/jira/browse/HADOOP-11610 ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-18 01:12 Tiago St?rmer DaitxNew Issue ====================================================================== From mantis at public.kitware.com Wed Feb 18 03:52:50 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Wed, 18 Feb 2015 03:52:50 -0500 Subject: [cmake-developers] [CMake 0015409]: FindOpenSSL does not find correct libraries with MinGW Message-ID: <32a8fbb443103fd6608219cf426b2c55@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15409 ====================================================================== Reported By: David Demelier Assigned To: ====================================================================== Project: CMake Issue ID: 15409 Category: Modules Reproducibility: always Severity: major Priority: high Status: new ====================================================================== Date Submitted: 2015-02-18 03:52 EST Last Modified: 2015-02-18 03:52 EST ====================================================================== Summary: FindOpenSSL does not find correct libraries with MinGW Description: When using MinGW Generator, FindOpenSSL locate the following DLL as OPENSSL_LIBRARIES: C:\Program Files (x86)\CMake\bin\libeay32.dll C:\Program Files (x86)\CMake\bin\ssleay32.dll It indeed makes ld.exe crash since these are not import libraries. And OpenSSL built with mingw are named libssl.dll.a and libcrypto.dll.a. Steps to Reproduce: Use find_package(OpenSSL) with MinGW Generator. Ends with: -- Found OpenSSL: C:/Program Files (x86)/CMake/bin/ssleay32.dll;C:/Program Files (x86)/CMake/bin/libeay32.dll (found version "1.0.1h") ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-18 03:52 David Demelier New Issue ====================================================================== From raffi.enficiaud at free.fr Wed Feb 18 04:23:19 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Wed, 18 Feb 2015 10:23:19 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> Message-ID: <674A1E46-6DF7-42C4-9E0D-937C76D6FA16@free.fr> Dear Brad, I just tested the patch I sent you on OSX and Win32 and all the tests are clear. Best, Raffi Enficiaud > On 18 Feb 2015, at 01:28, Raffi Enficiaud wrote: > > Dear Brad, > > Please find attached a patch addressing the issues mentioned in your email. > The tests were failing because of the following modification: > > - matlab_get_version_from_matlab_run(${Matlab_MAIN_PROGRAM} matlab_list_of_all_versions) > + matlab_get_version_from_matlab_run("${Matlab_MAIN_PROGRAM}" matlab_list_of_all_versions) > > Apparently the quotes here are interpreted as part of the binary name, which prevents the proper call to matlab using the execute_process function. > > I kept the symlink resolution, but I narrowed the case those should be resolved. I added a variable pointing to the (symlink resolved) location of the binary from which the version is retrieved. I compare paths symlink resolved for that purpose. I hope this is in line with what you would like to have. > > Note that I only tested on LinuxLTS14.04 locally, I will test further tomorrow morning. > I also changed the build path of the Windows agent, the build should be clear on Windows now. > > Best regards, > Raffi Enficiaud > > <0001-Addressing-the-visibility-of-the-internal-variables-.patch> >> On 13 Feb 2015, at 16:36, Brad King wrote: >> >> On 02/13/2015 09:43 AM, Raffi Enficiaud wrote: >>>> * Why is Matlab_VERSION_STRING cached? Shouldn't it be computed >>>> every time from the matlab that was found? >>> >>> In case the version is not found with an obvious method >>> (on OSX /Applications/MATLABVersion, on Win32, the version also is >>> given by the registry key), we have to find the version of matlab >>> by running matlab itself. I am caching the version once I have it >>> to prevent any further execution of matlab for retrieving this >>> information. >> >> Okay. Currently the value is user-facing, but it shouldn't ever be >> edited manually, right? Instead the detected version could be cached >> in an INTERNAL cache entry. Also there should be a second internal >> entry that records which matlab program was executed to compute the >> version. If the latter does not match then the version should be >> re-computed. >> >>> In case a symlink of the binary called "matlab" exists in /usr/local/bin >>> for instance, I need to retrieve the path of the libraries mex, mx etc, >>> that are relative to the real installation path of matlab. >> >> In that case I think you should look for those pieces relative to >> the original executable location first, and if not found then >> resolve symlinks into a temporary variable name and then use that. >> The resolved path should not be made user-facing so that any user >> that sets Matlab_MAIN_PROGRAM explicitly will see that value >> persist. >> >> 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 From brad.king at kitware.com Wed Feb 18 09:13:22 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 18 Feb 2015 09:13:22 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> Message-ID: <54E49E02.5030105@kitware.com> On 02/17/2015 07:28 PM, Raffi Enficiaud wrote: > The tests were failing because of the following modification: > > - matlab_get_version_from_matlab_run(${Matlab_MAIN_PROGRAM} matlab_list_of_all_versions) > + matlab_get_version_from_matlab_run("${Matlab_MAIN_PROGRAM}" matlab_list_of_all_versions) > > Apparently the quotes here are interpreted as part of the binary name, > which prevents the proper call to matlab using the execute_process function. That should not be possible. The quotes are needed in case the variable value is an empty string. They will not be treated as part of the value passed to the function argument. > I kept the symlink resolution, but I narrowed the case those should be > resolved. I added a variable pointing to the (symlink resolved) location > of the binary from which the version is retrieved. Yes, thanks. I squashed the changes into 9d414ca2 and rebased again. Everything so far is now in: FindMatlab: Rewrite module and provide a usage API http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5dae6cfc and merged to 'next' for testing. Please base fixes for the below on that. More comments: Why do you need so many different find_program calls for matlab? There should be exactly one for Matlab_MAIN_PROGRAM, and it does not need to be guarded by if(NOT Matlab_MAIN_PROGRAM) because find_program does that already. Any symlink resolution can be done on the result. The get_filename_component(PROGRAM) mode is intended to take a command line string and figure out which leading piece is an existing program in case it is an unquoted path with spaces. While it may be a bug that this can return a directory, there should be no use case for this functionality in FindMatlab. > # list the keys under HKEY_LOCAL_MACHINE\SOFTWARE\mathworks but the call to > # reg does not work from cmake, curiously, as is. The command provides the > # desired result under the command line though. > # Fix: this is because "/reg:64" should appended to the command, otherwise > # it gets on the 32 bits software key (curiously again) This is because the default registry view depends on which "reg" tool gets executed. These comments do not belong in the final version of the module. > find_program(MATLAB_REG_EXE_LOCATION "reg") Many projects just execute_process() the "reg" tool directly without finding it first. It is reliably available on Windows. > execute_process( > COMMAND ${matlab_binary_program} -nosplash -nojvm ${_matlab_additional_commands} -logfile ${_matlab_temporary_folder}/matlabVersionLog.cmaketmp -nodesktop -nodisplay -r "version, exit" > OUTPUT_VARIABLE _matlab_version_from_cmd_dummy > RESULT_VARIABLE _matlab_result_version_call > TIMEOUT 30 > ) This should quote "${matlab_binary_program}" in case it is empty for some reason. Also you should capture the stderr output with ERROR_VARIABLE so it does not leak to the output of the CMake configuration process. Thanks, -Brad From raffi.enficiaud at free.fr Wed Feb 18 17:11:50 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Wed, 18 Feb 2015 23:11:50 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54E49E02.5030105@kitware.com> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> Message-ID: Please find attached the patch addressing the issues + some others, rebased against 5dae6cf. I tested it on the 3 target platforms. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: application/octet-stream Size: 6174 bytes Desc: not available URL: -------------- next part -------------- > On 18 Feb 2015, at 15:13, Brad King wrote: > > On 02/17/2015 07:28 PM, Raffi Enficiaud wrote: >> The tests were failing because of the following modification: >> >> - matlab_get_version_from_matlab_run(${Matlab_MAIN_PROGRAM} matlab_list_of_all_versions) >> + matlab_get_version_from_matlab_run("${Matlab_MAIN_PROGRAM}" matlab_list_of_all_versions) >> >> Apparently the quotes here are interpreted as part of the binary name, >> which prevents the proper call to matlab using the execute_process function. > > That should not be possible. The quotes are needed in case the variable > value is an empty string. They will not be treated as part of the value > passed to the function argument. I restored the quotes. Maybe I experienced a caching issue: I run ctest with "FindMatlab" regex, and from time to time the cache is messed while I am working and I do not clean the folders systematically. > >> I kept the symlink resolution, but I narrowed the case those should be >> resolved. I added a variable pointing to the (symlink resolved) location >> of the binary from which the version is retrieved. > > Yes, thanks. > > I squashed the changes into 9d414ca2 and rebased again. Everything > so far is now in: > > FindMatlab: Rewrite module and provide a usage API > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5dae6cfc > > and merged to 'next' for testing. Please base fixes for the below > on that. Couple of questions: - does the script of the dashboard clean the folders? Or I have to do that manually? (cf caching issues above) - is it the "next" branch that is tested on the "nightly" section of the dashboard? > > More comments: > > Why do you need so many different find_program calls for matlab? > There should be exactly one for Matlab_MAIN_PROGRAM, and it does > not need to be guarded by if(NOT Matlab_MAIN_PROGRAM) because > find_program does that already. Any symlink resolution can be > done on the result. I wanted to separate the parts in some kind of modules. - The first part is supposed to output the Matlab_ROOT and nothing else, and the other parts are relying on that. Finding a matlab_program is an implementation "detail", which is not cross platform. Yet, the method is kind of robust to find a proper installation ROOT. - The second part deals with the version, in case we have no other way than from asking Matlab. Since at this point, we have a ROOT, either given by the user or from the first part, we search for the matlab program using this information alone. In case the user gave the ROOT but not the version, we still have to find the program under this ROOT. In case the user gave nothing, we have to find the ROOT and the version, the former maybe implying a matlab_program search. Again, I think this is an implementation detail that the second part should not rely on. - The third part is the user facing matlab_program, that we find on demand. I agree this can be "optimized" in terms of find_program calls, but I would like to keep this structure for finding in the appropriate sequence all the information needed by the module. The symlink resolutions are made on the appropriate places now. > > The get_filename_component(PROGRAM) mode is intended to take a > command line string and figure out which leading piece is an > existing program in case it is an unquoted path with spaces. > While it may be a bug that this can return a directory, there > should be no use case for this functionality in FindMatlab. I did not understood that from the documentation ("the program in filename will be found in the system search path"): I thought it was another way of finding programs. I removed the corresponding lines. > >> # list the keys under HKEY_LOCAL_MACHINE\SOFTWARE\mathworks but the call to >> # reg does not work from cmake, curiously, as is. The command provides the >> # desired result under the command line though. >> # Fix: this is because "/reg:64" should appended to the command, otherwise >> # it gets on the 32 bits software key (curiously again) > > This is because the default registry view depends on which "reg" > tool gets executed. These comments do not belong in the final > version of the module. Yes, we exchanged on this point already. I removed the comments. Basically, at some point I thought it would have been useful to use cmake as a make that can run matlab commands through the matlab_program (and not obliged to link anything to it). This is not possible in the current state of the module, but would be possible readily in the future. BTW, I volunteered for the maintenance of the module, so I guess these would be future extensions. > >> find_program(MATLAB_REG_EXE_LOCATION "reg") > > Many projects just execute_process() the "reg" tool directly > without finding it first. It is reliably available on Windows. Ok, I made the change. I thought it would be the "proper" method to find things first. > >> execute_process( >> COMMAND ${matlab_binary_program} -nosplash -nojvm ${_matlab_additional_commands} -logfile ${_matlab_temporary_folder}/matlabVersionLog.cmaketmp -nodesktop -nodisplay -r "version, exit" >> OUTPUT_VARIABLE _matlab_version_from_cmd_dummy >> RESULT_VARIABLE _matlab_result_version_call >> TIMEOUT 30 >> ) > > This should quote "${matlab_binary_program}" in case it is > empty for some reason. Also you should capture the stderr > output with ERROR_VARIABLE so it does not leak to the output > of the CMake configuration process. Done (+ all other calls). From mantis at public.kitware.com Wed Feb 18 17:13:31 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Wed, 18 Feb 2015 17:13:31 -0500 Subject: [cmake-developers] [CMake 0015410]: Allow more characters in generator expression for config (dash, dot etc.) Message-ID: <8ff37264d60169b5fd68efb91ec2e421@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15410 ====================================================================== Reported By: peclik Assigned To: ====================================================================== Project: CMake Issue ID: 15410 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-18 17:13 EST Last Modified: 2015-02-18 17:13 EST ====================================================================== Summary: Allow more characters in generator expression for config (dash, dot etc.) Description: Currently probably [a-zA-Z_] set is allowed. Other are needed too (dash, dot, hash etc.) Probably now with cmake in UTF-8, even national chars could be allowed. Steps to Reproduce: Use generator $ Results in error "Expression syntax not recognized". E.g. target_compile_definitions(tgt PRIVATE $<$:${PROJ_TESTS_DEFS}>) ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-18 17:13 peclik New Issue ====================================================================== From tim at klingt.org Thu Feb 19 01:54:25 2015 From: tim at klingt.org (Tim Blechmann) Date: Thu, 19 Feb 2015 14:54:25 +0800 Subject: [cmake-developers] [vc12/idl] output directory problem Message-ID: hi all, i'm having troubles with the midl compiler of generated msvc2013 project files: the generated projects contain a hardcoded output directory: $(IntDir). however having this property, the midl call fails for me. if i remove this property, or replace it with $(ProjectDir)/$(IntDir) it compiles fine. attached patch resolves this issue for me, though i'm not sure if this is a good solution in general. also, have to add this include directory: "${CMAKE_CURRENT_BINARY_DIR}/MyProject.dir/${CMAKE_CFG_INTDIR}" i'm not an expert on msvc toolchains, so it would be great if someone could review this patch. thanks, tim -------------- next part -------------- From a9f83bd54c8d7e073c4d8faee7e5b8dd68738fdc Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Thu, 19 Feb 2015 14:35:02 +0800 Subject: [PATCH] cmake: Midl - set OutputDir via absolute path --- Source/cmVisualStudio10TargetGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index b265c0e..6c09702 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2509,7 +2509,7 @@ WriteMidlOptions(std::string const& /*config*/, } this->WriteString("%(AdditionalIncludeDirectories)" "\n", 0); - this->WriteString("$(IntDir)\n", 3); + this->WriteString("$(ProjectDir)/$(IntDir)\n", 3); this->WriteString("%(Filename).h\n", 3); this->WriteString( "%(Filename).tlb\n", 3); -- 2.3.0 From stillcompiling at gmail.com Thu Feb 19 03:01:13 2015 From: stillcompiling at gmail.com (Joshua A Clayton) Date: Thu, 19 Feb 2015 00:01:13 -0800 Subject: [cmake-developers] [PATCH 0/3] CPACK_RPM_PACKAGE_ARCHITECTURE Message-ID: This patch series extends CPackRPM to support cross-built rpms Previously only native and "noarch" rpms were possible. Other architecture choices resulted in an error from rpmbuild. Also included at no extra charge, is component support through CPACK_RPM__PACKAGE_ARCHITECTURE, and unit tests for component architecture. Improvements suggested by Rolf Eike Beer: Drop WORKING_DIRECTORY and add OUTPUT_STRIP_TRAILING_WHITESPACE to uname command. Improvements suggested by Domen Vrankar: Add component support Add unit tests Joshua A Clayton (3): CPackRPM: Fix CPACK_RPM_PACKAGE_ARCHITECTURE CPackRPM: Support rpm architecture in components Tests: CpackRPM test component architecture Modules/CPackRPM.cmake | 33 ++++++++++++++++++---- .../MyLibCPackConfig-IgnoreGroup.cmake.in | 6 ++++ .../RunCPackVerifyResult.cmake | 8 ++++++ 3 files changed, 41 insertions(+), 6 deletions(-) -- 2.2.2 From stillcompiling at gmail.com Thu Feb 19 03:01:14 2015 From: stillcompiling at gmail.com (Joshua A Clayton) Date: Thu, 19 Feb 2015 00:01:14 -0800 Subject: [cmake-developers] [PATCH 1/3] CPackRPM: Fix CPACK_RPM_PACKAGE_ARCHITECTURE In-Reply-To: References: Message-ID: BuildArch must only be added to a spec file for a "noarch" package or rpmbuild will fail. For all others, the --target argument sets the package architecture In the process of Fixing rpm architecture, we make it mandatory, adding a default value of native architecture (the same as if no --target argument is present) Update the documentation at the top of the file to mandatory. --- Modules/CPackRPM.cmake | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 7516393..5135893 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -54,8 +54,8 @@ # # The RPM package architecture. # -# * Mandatory : NO -# * Default : - +# * Mandatory : YES +# * Default : Native architecture output by "uname -m" # # This may be set to "noarch" if you know you are building a noarch package. # @@ -619,12 +619,21 @@ endif() # RPM "Version" from RPM "Release" string(REPLACE "-" "_" CPACK_RPM_PACKAGE_VERSION ${CPACK_RPM_PACKAGE_VERSION}) -# CPACK_RPM_PACKAGE_ARCHITECTURE (optional) -if(CPACK_RPM_PACKAGE_ARCHITECTURE) - set(TMP_RPM_BUILDARCH "Buildarch: ${CPACK_RPM_PACKAGE_ARCHITECTURE}") +# CPACK_RPM_PACKAGE_ARCHITECTURE (mandatory) +if (NOT CPACK_RPM_PACKAGE_ARCHITECTURE) + execute_process(COMMAND uname "-m" + OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE + OUTPUT_STRIP_TRAILING_WHITESPACE) +else() if(CPACK_RPM_PACKAGE_DEBUG) message("CPackRPM:Debug: using user-specified build arch = ${CPACK_RPM_PACKAGE_ARCHITECTURE}") endif() +endif() +if (NOT CPACK_RPM_PACKAGE_ARCHITECTURE_) + set(CPACK_RPM_PACKAGE_ARCHITECTURE_ ${CPACK_RPM_PACKAGE_ARCHITECTURE}) +endif() +if(${CPACK_RPM_PACKAGE_ARCHITECTURE_} STREQUAL "noarch") + set(TMP_RPM_BUILDARCH "Buildarch: ${CPACK_RPM_PACKAGE_ARCHITECTURE_}") else() set(TMP_RPM_BUILDARCH "") endif() @@ -934,7 +943,7 @@ file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SOURCES) file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SPECS) file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SRPMS) -#set(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${CPACK_RPM_PACKAGE_ARCHITECTURE}.rpm") +#set(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${CPACK_RPM_PACKAGE_ARCHITECTURE_}.rpm") set(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}") # it seems rpmbuild can't handle spaces in the path # neither escaping (as below) nor putting quotes around the path seem to help @@ -1282,6 +1291,7 @@ if(RPMBUILD_EXECUTABLE) COMMAND "${RPMBUILD_EXECUTABLE}" -bb --define "_topdir ${CPACK_RPM_DIRECTORY}" --buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" + --target "${CPACK_RPM_PACKAGE_ARCHITECTURE_}" "${CPACK_RPM_BINARY_SPECFILE}" WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" RESULT_VARIABLE CPACK_RPMBUILD_EXEC_RESULT -- 2.2.2 From stillcompiling at gmail.com Thu Feb 19 03:01:15 2015 From: stillcompiling at gmail.com (Joshua A Clayton) Date: Thu, 19 Feb 2015 00:01:15 -0800 Subject: [cmake-developers] [PATCH 2/3] CPackRPM: Support rpm architecture in components In-Reply-To: References: Message-ID: <7fe7287feae1ff45ffee727bac7c2fd396156ae5.1424331335.git.stillcompiling@gmail.com> CPACK_RPM__PACKAGE_ARCHITECTURE variable allows the same project to support packages of different architectures including noarch, native and foreign architectures. --- Modules/CPackRPM.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 5135893..485c586 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -51,6 +51,7 @@ # * Default : CPACK_PACKAGE_VERSION # # .. variable:: CPACK_RPM_PACKAGE_ARCHITECTURE +# CPACK_RPM__PACKAGE_ARCHITECTURE # # The RPM package architecture. # @@ -629,6 +630,16 @@ else() message("CPackRPM:Debug: using user-specified build arch = ${CPACK_RPM_PACKAGE_ARCHITECTURE}") endif() endif() +#prefer component architecture +unset(CPACK_RPM_PACKAGE_ARCHITECTURE_) +if(CPACK_RPM_PACKAGE_COMPONENT) + if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_ARCHITECTURE) + set(CPACK_RPM_PACKAGE_ARCHITECTURE_ ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_ARCHITECTURE}) + if(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: using component build arch = ${CPACK_RPM_PACKAGE_ARCHITECTURE}") + endif() + endif() +endif() if (NOT CPACK_RPM_PACKAGE_ARCHITECTURE_) set(CPACK_RPM_PACKAGE_ARCHITECTURE_ ${CPACK_RPM_PACKAGE_ARCHITECTURE}) endif() -- 2.2.2 From stillcompiling at gmail.com Thu Feb 19 03:01:16 2015 From: stillcompiling at gmail.com (Joshua A Clayton) Date: Thu, 19 Feb 2015 00:01:16 -0800 Subject: [cmake-developers] [PATCH 3/3] Tests: CpackRPM test component architecture In-Reply-To: References: Message-ID: <6d3ab8f964eab3dbf1e858db1a2ca630cd41ed6c.1424331335.git.stillcompiling@gmail.com> Test creating rpms of type "noarch", native, and "armv7hf" --- Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in | 6 ++++++ Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in index de0ee46..c2ac1c5 100644 --- a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in @@ -8,9 +8,15 @@ endif() if(CPACK_GENERATOR MATCHES "RPM") set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") + # test a "noarch" rpm + set(CPACK_RPM_headers_PACKAGE_ARCHITECTURE "noarch") + set(CPACK_RPM_COMPONENT_INSTALL "ON") set(CPACK_RPM_applications_PACKAGE_REQUIRES "mylib-libraries") + # test cross-built rpm + set(CPACK_RPM_applications_PACKAGE_ARCHITECTURE "armv7hf") + # test package summary override set(CPACK_RPM_PACKAGE_SUMMARY "default summary") set(CPACK_RPM_libraries_PACKAGE_SUMMARY "libraries summary") diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index 68d846f..5be9d17 100644 --- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake +++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake @@ -161,21 +161,25 @@ if(CPackGen MATCHES "RPM") set(check_file_match_expected_summary ".*${CPACK_RPM_libraries_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_RPM_libraries_PACKAGE_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_applications_PACKAGE_ARCHITECTURE}") set(spec_regex "*libraries*") elseif(check_file_headers_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_COMPONENT_HEADERS_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") + set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_libraries_PACKAGE_ARCHITECTURE}") set(spec_regex "*headers*") elseif(check_file_applications_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_COMPONENT_APPLICATIONS_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") + set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_headers_PACKAGE_ARCHITECTURE}") set(spec_regex "*applications*") elseif(check_file_Unspecified_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*DESCRIPTION.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") + set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_Unspecified_PACKAGE_ARCHITECTURE}") set(spec_regex "*Unspecified*") else() message(FATAL_ERROR "error: unexpected rpm package '${check_file}'") @@ -204,6 +208,10 @@ if(CPackGen MATCHES "RPM") message(FATAL_ERROR "error: '${check_file}' rpm package relocation path does not match expected value - regex '${check_file_match_expected_relocation_path}'; RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'") endif() + string(REGEX MATCH ${check_file_match_expected_architecture} check_file_match_architecture ${check_file_content}) + if (NOT check_file_match_architecture) + message(FATAL_ERROR "error: '${check_file}' Architecture does not match expected value - '${check_file_match_expected_architecture}'; RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'") + endif() endforeach() elseif(${CPackComponentWay} STREQUAL "IgnoreGroup") endif() -- 2.2.2 From mantis at public.kitware.com Thu Feb 19 03:41:31 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Thu, 19 Feb 2015 03:41:31 -0500 Subject: [cmake-developers] [CMake 0015411]: Toolset is not updated/loaded correctly in CMake GUI Message-ID: <4fb4ccdc208e187aa7a10621d71f0d07@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15411 ====================================================================== Reported By: Bryn Lloyd Assigned To: ====================================================================== Project: CMake Issue ID: 15411 Category: (No Category) Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-19 03:41 EST Last Modified: 2015-02-19 03:41 EST ====================================================================== Summary: Toolset is not updated/loaded correctly in CMake GUI Description: Switching projects (build dirs) using different toolset in CMake GUI changes the toolset of the second project. Steps to Reproduce: We use the CMAKE_GENERATOR_TOOLSET option (or -T from command line). For one project we use the intel compiler toolset with a Visual Studio 2012 generator, for others we don't specify the toolset. When we switch from the project WITH an intel compiler toolset to another project in the CMake GUI, e.g. by selecting a different build folder, the second project suddenly also uses the intel compiler toolset. It seems like CMake GUI has some global variable which is not updated when loading a different project. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-19 03:41 Bryn Lloyd New Issue ====================================================================== From raffi.enficiaud at free.fr Thu Feb 19 06:49:15 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Thu, 19 Feb 2015 12:49:15 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> Message-ID: Dear Brad, Apparently there are some issues when things are running with the dashboard, which I did not observed yesterday. Those issues are related to the space in the test folder in the dashboard, which I did not see on my local computer. The attached patch (based on 5dae6cf) should solve those issues (tested only in the dashboard folder of the ubuntu version). -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Fixing-problems-related-to-spaces-in-directory-names.patch Type: application/octet-stream Size: 4382 bytes Desc: not available URL: -------------- next part -------------- Thanks, Raffi > On 18 Feb 2015, at 23:11, Raffi Enficiaud wrote: > > Please find attached the patch addressing the issues + some others, rebased against 5dae6cf. > I tested it on the 3 target platforms. > > > >> On 18 Feb 2015, at 15:13, Brad King wrote: >> >> On 02/17/2015 07:28 PM, Raffi Enficiaud wrote: >>> The tests were failing because of the following modification: >>> >>> - matlab_get_version_from_matlab_run(${Matlab_MAIN_PROGRAM} matlab_list_of_all_versions) >>> + matlab_get_version_from_matlab_run("${Matlab_MAIN_PROGRAM}" matlab_list_of_all_versions) >>> >>> Apparently the quotes here are interpreted as part of the binary name, >>> which prevents the proper call to matlab using the execute_process function. >> >> That should not be possible. The quotes are needed in case the variable >> value is an empty string. They will not be treated as part of the value >> passed to the function argument. > > I restored the quotes. Maybe I experienced a caching issue: I run ctest with "FindMatlab" regex, and from time to time the cache is messed while I am working and I do not clean the folders systematically. > > >> >>> I kept the symlink resolution, but I narrowed the case those should be >>> resolved. I added a variable pointing to the (symlink resolved) location >>> of the binary from which the version is retrieved. >> >> Yes, thanks. >> >> I squashed the changes into 9d414ca2 and rebased again. Everything >> so far is now in: >> >> FindMatlab: Rewrite module and provide a usage API >> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5dae6cfc >> >> and merged to 'next' for testing. Please base fixes for the below >> on that. > > Couple of questions: > - does the script of the dashboard clean the folders? Or I have to do that manually? (cf caching issues above) > - is it the "next" branch that is tested on the "nightly" section of the dashboard? > >> >> More comments: >> >> Why do you need so many different find_program calls for matlab? >> There should be exactly one for Matlab_MAIN_PROGRAM, and it does >> not need to be guarded by if(NOT Matlab_MAIN_PROGRAM) because >> find_program does that already. Any symlink resolution can be >> done on the result. > > I wanted to separate the parts in some kind of modules. > > - The first part is supposed to output the Matlab_ROOT and nothing else, and the other parts are relying on that. Finding a matlab_program is an implementation "detail", which is not cross platform. Yet, the method is kind of robust to find a proper installation ROOT. > > - The second part deals with the version, in case we have no other way than from asking Matlab. Since at this point, we have a ROOT, either given by the user or from the first part, we search for the matlab program using this information alone. In case the user gave the ROOT but not the version, we still have to find the program under this ROOT. In case the user gave nothing, we have to find the ROOT and the version, the former maybe implying a matlab_program search. Again, I think this is an implementation detail that the second part should not rely on. > > - The third part is the user facing matlab_program, that we find on demand. > > I agree this can be "optimized" in terms of find_program calls, but I would like to keep this structure for finding in the appropriate sequence all the information needed by the module. > > The symlink resolutions are made on the appropriate places now. > >> >> The get_filename_component(PROGRAM) mode is intended to take a >> command line string and figure out which leading piece is an >> existing program in case it is an unquoted path with spaces. >> While it may be a bug that this can return a directory, there >> should be no use case for this functionality in FindMatlab. > > I did not understood that from the documentation ("the program in filename will be found in the system search path"): I thought it was another way of finding programs. I removed the corresponding lines. > > >> >>> # list the keys under HKEY_LOCAL_MACHINE\SOFTWARE\mathworks but the call to >>> # reg does not work from cmake, curiously, as is. The command provides the >>> # desired result under the command line though. >>> # Fix: this is because "/reg:64" should appended to the command, otherwise >>> # it gets on the 32 bits software key (curiously again) >> >> This is because the default registry view depends on which "reg" >> tool gets executed. These comments do not belong in the final >> version of the module. > > Yes, we exchanged on this point already. I removed the comments. Basically, at some point I thought it would have been useful to use cmake as a make that can run matlab commands through the matlab_program (and not obliged to link anything to it). This is not possible in the current state of the module, but would be possible readily in the future. BTW, I volunteered for the maintenance of the module, so I guess these would be future extensions. > > >> >>> find_program(MATLAB_REG_EXE_LOCATION "reg") >> >> Many projects just execute_process() the "reg" tool directly >> without finding it first. It is reliably available on Windows. > > Ok, I made the change. I thought it would be the "proper" method to find things first. > >> >>> execute_process( >>> COMMAND ${matlab_binary_program} -nosplash -nojvm ${_matlab_additional_commands} -logfile ${_matlab_temporary_folder}/matlabVersionLog.cmaketmp -nodesktop -nodisplay -r "version, exit" >>> OUTPUT_VARIABLE _matlab_version_from_cmd_dummy >>> RESULT_VARIABLE _matlab_result_version_call >>> TIMEOUT 30 >>> ) >> >> This should quote "${matlab_binary_program}" in case it is >> empty for some reason. Also you should capture the stderr >> output with ERROR_VARIABLE so it does not leak to the output >> of the CMake configuration process. > > Done (+ all other calls). > > > -- > > 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 From raffi.enficiaud at free.fr Thu Feb 19 08:39:37 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Thu, 19 Feb 2015 14:39:37 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> Message-ID: Please find attached the merge of the two previous patches, rebased on 5dae6cf. Thanks, Raffi Enficiaud -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Adding-R2014a.patch Type: application/octet-stream Size: 9339 bytes Desc: not available URL: -------------- next part -------------- > On 19 Feb 2015, at 12:49, Raffi Enficiaud wrote: > > Dear Brad, > > Apparently there are some issues when things are running with the dashboard, which I did not observed yesterday. > Those issues are related to the space in the test folder in the dashboard, which I did not see on my local computer. > > The attached patch (based on 5dae6cf) should solve those issues (tested only in the dashboard folder of the ubuntu version). > > <0001-Fixing-problems-related-to-spaces-in-directory-names.patch> > > Thanks, > Raffi > > > >> On 18 Feb 2015, at 23:11, Raffi Enficiaud wrote: >> >> Please find attached the patch addressing the issues + some others, rebased against 5dae6cf. >> I tested it on the 3 target platforms. >> >> >> >>> On 18 Feb 2015, at 15:13, Brad King wrote: >>> >>> On 02/17/2015 07:28 PM, Raffi Enficiaud wrote: >>>> The tests were failing because of the following modification: >>>> >>>> - matlab_get_version_from_matlab_run(${Matlab_MAIN_PROGRAM} matlab_list_of_all_versions) >>>> + matlab_get_version_from_matlab_run("${Matlab_MAIN_PROGRAM}" matlab_list_of_all_versions) >>>> >>>> Apparently the quotes here are interpreted as part of the binary name, >>>> which prevents the proper call to matlab using the execute_process function. >>> >>> That should not be possible. The quotes are needed in case the variable >>> value is an empty string. They will not be treated as part of the value >>> passed to the function argument. >> >> I restored the quotes. Maybe I experienced a caching issue: I run ctest with "FindMatlab" regex, and from time to time the cache is messed while I am working and I do not clean the folders systematically. >> >> >>> >>>> I kept the symlink resolution, but I narrowed the case those should be >>>> resolved. I added a variable pointing to the (symlink resolved) location >>>> of the binary from which the version is retrieved. >>> >>> Yes, thanks. >>> >>> I squashed the changes into 9d414ca2 and rebased again. Everything >>> so far is now in: >>> >>> FindMatlab: Rewrite module and provide a usage API >>> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5dae6cfc >>> >>> and merged to 'next' for testing. Please base fixes for the below >>> on that. >> >> Couple of questions: >> - does the script of the dashboard clean the folders? Or I have to do that manually? (cf caching issues above) >> - is it the "next" branch that is tested on the "nightly" section of the dashboard? >> >>> >>> More comments: >>> >>> Why do you need so many different find_program calls for matlab? >>> There should be exactly one for Matlab_MAIN_PROGRAM, and it does >>> not need to be guarded by if(NOT Matlab_MAIN_PROGRAM) because >>> find_program does that already. Any symlink resolution can be >>> done on the result. >> >> I wanted to separate the parts in some kind of modules. >> >> - The first part is supposed to output the Matlab_ROOT and nothing else, and the other parts are relying on that. Finding a matlab_program is an implementation "detail", which is not cross platform. Yet, the method is kind of robust to find a proper installation ROOT. >> >> - The second part deals with the version, in case we have no other way than from asking Matlab. Since at this point, we have a ROOT, either given by the user or from the first part, we search for the matlab program using this information alone. In case the user gave the ROOT but not the version, we still have to find the program under this ROOT. In case the user gave nothing, we have to find the ROOT and the version, the former maybe implying a matlab_program search. Again, I think this is an implementation detail that the second part should not rely on. >> >> - The third part is the user facing matlab_program, that we find on demand. >> >> I agree this can be "optimized" in terms of find_program calls, but I would like to keep this structure for finding in the appropriate sequence all the information needed by the module. >> >> The symlink resolutions are made on the appropriate places now. >> >>> >>> The get_filename_component(PROGRAM) mode is intended to take a >>> command line string and figure out which leading piece is an >>> existing program in case it is an unquoted path with spaces. >>> While it may be a bug that this can return a directory, there >>> should be no use case for this functionality in FindMatlab. >> >> I did not understood that from the documentation ("the program in filename will be found in the system search path"): I thought it was another way of finding programs. I removed the corresponding lines. >> >> >>> >>>> # list the keys under HKEY_LOCAL_MACHINE\SOFTWARE\mathworks but the call to >>>> # reg does not work from cmake, curiously, as is. The command provides the >>>> # desired result under the command line though. >>>> # Fix: this is because "/reg:64" should appended to the command, otherwise >>>> # it gets on the 32 bits software key (curiously again) >>> >>> This is because the default registry view depends on which "reg" >>> tool gets executed. These comments do not belong in the final >>> version of the module. >> >> Yes, we exchanged on this point already. I removed the comments. Basically, at some point I thought it would have been useful to use cmake as a make that can run matlab commands through the matlab_program (and not obliged to link anything to it). This is not possible in the current state of the module, but would be possible readily in the future. BTW, I volunteered for the maintenance of the module, so I guess these would be future extensions. >> >> >>> >>>> find_program(MATLAB_REG_EXE_LOCATION "reg") >>> >>> Many projects just execute_process() the "reg" tool directly >>> without finding it first. It is reliably available on Windows. >> >> Ok, I made the change. I thought it would be the "proper" method to find things first. >> >>> >>>> execute_process( >>>> COMMAND ${matlab_binary_program} -nosplash -nojvm ${_matlab_additional_commands} -logfile ${_matlab_temporary_folder}/matlabVersionLog.cmaketmp -nodesktop -nodisplay -r "version, exit" >>>> OUTPUT_VARIABLE _matlab_version_from_cmd_dummy >>>> RESULT_VARIABLE _matlab_result_version_call >>>> TIMEOUT 30 >>>> ) >>> >>> This should quote "${matlab_binary_program}" in case it is >>> empty for some reason. Also you should capture the stderr >>> output with ERROR_VARIABLE so it does not leak to the output >>> of the CMake configuration process. >> >> Done (+ all other calls). >> >> >> -- >> >> 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 From brad.king at kitware.com Thu Feb 19 08:53:22 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 19 Feb 2015 08:53:22 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: References: <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> Message-ID: <54E5EAD2.9000900@kitware.com> On 02/19/2015 08:39 AM, Raffi Enficiaud wrote: > Please find attached the merge of the two previous patches, rebased on 5dae6cf. Applied, thanks: FindMatlab: Further revisions http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1416d214 >> Those issues are related to the space in the test folder in the dashboard Quoting of arguments in the cmake language: http://www.cmake.org/cmake/help/v3.2/manual/cmake-language.7.html#command-arguments is not necessary to deal with spaces that are not literally written in the argument. Separation of unquoted arguments after variable evaluation only happens on ";". However, any unnecessary quoting you added also won't hurt anything and makes it easier to read anyway. Returning to a previous comment: > On 02/18/2015 09:13 AM, Brad King wrote: >> Why do you need so many different find_program calls for matlab? >> There should be exactly one for Matlab_MAIN_PROGRAM I still see four places that try to find "matlab", quoted below. It looks like you're trying to make Matlab_MAIN_PROGRAM defined if the MAIN_PROGRAM component was requested. > find_program( > _matlab_main_tmp > NAMES matlab) > > if(NOT _matlab_main_tmp) > execute_process( > COMMAND "which" matlab > OUTPUT_VARIABLE _matlab_main_tmp > ERROR_VARIABLE _matlab_main_tmp_err) > # the output should be cleaned up > string(STRIP "${_matlab_main_tmp}" _matlab_main_tmp) > endif() If find_program doesn't find it, "which" won't have better luck. > if(Matlab_MAIN_PROGRAM) > set(_matlab_main_tmp ${Matlab_MAIN_PROGRAM}) > else() > find_program( > _matlab_main_tmp > matlab > PATHS ${Matlab_ROOT_DIR} ${Matlab_ROOT_DIR}/bin > DOC "Matlab main program" > NO_DEFAULT_PATH > ) > endif() We should not risk finding the wrong matlab here. See below. > # todo cleanup with code above > if(NOT DEFINED Matlab_MAIN_PROGRAM) > find_program( > Matlab_MAIN_PROGRAM > matlab > PATHS ${Matlab_ROOT_DIR} ${Matlab_ROOT_DIR}/bin > DOC "Matlab main program" > NO_DEFAULT_PATH > ) > endif() This looks like the component-specific search. If we are to present a component-specific result variable name then it can simply be populated from the "one true" location found. If "matlab" is needed to compute information for other components then finding it should not be optional. There should be a single find_program(Matlab_EXECUTABLE ...) whose result is cached and re-used everywhere that "matlab" is needed. Separate symlink-resolving on it can be done when needed but does not need to be cached. Thanks, -Brad From brad.king at kitware.com Thu Feb 19 09:17:22 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 19 Feb 2015 09:17:22 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> Message-ID: <54E5F072.3090903@kitware.com> On 02/19/2015 06:49 AM, Raffi Enficiaud wrote: > Apparently there are some issues when things are running with the dashboard For the Visual Studio build on your Windows machine you have: set(CTEST_BUILD_FLAGS "-j4") which is not a valid msbuild flag. For that you could use set(CTEST_BUILD_FLAGS "-m4") instead. Thanks, -Brad From brad.king at kitware.com Thu Feb 19 09:19:44 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 19 Feb 2015 09:19:44 -0500 Subject: [cmake-developers] [PATCH] User may now specify toolset through CMake GUI In-Reply-To: <54E38C6F.2030500@kitware.com> References: <1424032078-7144-1-git-send-email-rcdailey.lists@gmail.com> <54E21C63.8030706@kitware.com> <54E22EEA.10802@kitware.com> <54E38397.8050909@kitware.com> <54E38C6F.2030500@kitware.com> Message-ID: <54E5F100.6010603@kitware.com> On 02/17/2015 01:46 PM, Brad King wrote: > On 02/17/2015 01:43 PM, Robert Dailey wrote: >> Of course right now only Visual Studio and XCode support the toolset >> parameter > > Correct. Furthermore it is supported only for VS >= 10. In response to this issue: http://www.cmake.org/Bug/view.php?id=15411 I've made this change: cmake-gui: Reset generator platform and toolset on configure (#15411) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ade687d Please account for that while developing your changes. Thanks, -Brad From raffi.enficiaud at free.fr Thu Feb 19 10:12:23 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Thu, 19 Feb 2015 16:12:23 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54E5F072.3090903@kitware.com> References: <543FD60A.5060508@kitware.com> <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5F072.3090903@kitware.com> Message-ID: <06983E90-D75E-4335-8D02-1D40DF89B9C2@free.fr> Ok, I thought this was for the ctest program that accepts -j flag. I will do the change, I am running the build already with all the // flags removed. Thanks, Raffi > On 19 Feb 2015, at 15:17, Brad King wrote: > > On 02/19/2015 06:49 AM, Raffi Enficiaud wrote: >> Apparently there are some issues when things are running with the dashboard > > For the Visual Studio build on your Windows machine you have: > > set(CTEST_BUILD_FLAGS "-j4") > > which is not a valid msbuild flag. For that you could use > > set(CTEST_BUILD_FLAGS "-m4") > > instead. > > Thanks, > -Brad > From raffi.enficiaud at free.fr Thu Feb 19 10:20:12 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Thu, 19 Feb 2015 16:20:12 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54E5EAD2.9000900@kitware.com> References: <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5EAD2.9000900@kitware.com > Message-ID: <2CDBE292-3248-46F2-8BD9-8698D183B90C@free.fr> > On 19 Feb 2015, at 14:53, Brad King wrote: > > On 02/19/2015 08:39 AM, Raffi Enficiaud wrote: >> Please find attached the merge of the two previous patches, rebased on 5dae6cf. > > Applied, thanks: > > FindMatlab: Further revisions > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1416d214 > Thanks. >>> Those issues are related to the space in the test folder in the dashboard > > Quoting of arguments in the cmake language: > > http://www.cmake.org/cmake/help/v3.2/manual/cmake-language.7.html#command-arguments > > is not necessary to deal with spaces that are not literally written in > the argument. Separation of unquoted arguments after variable evaluation > only happens on ";". However, any unnecessary quoting you added also > won't hurt anything and makes it easier to read anyway. Good then. Matlab supports not very well spaces in the log file name, I suppose that if I do execute_process(COMMAND matlab -logfile "some path with spaces") this is correctly escaped by cmake. > > Returning to a previous comment: > >> On 02/18/2015 09:13 AM, Brad King wrote: >>> Why do you need so many different find_program calls for matlab? >>> There should be exactly one for Matlab_MAIN_PROGRAM > > I still see four places that try to find "matlab", quoted below. > It looks like you're trying to make Matlab_MAIN_PROGRAM defined > if the MAIN_PROGRAM component was requested. Relates to my previous answer on this topic. > >> find_program( >> _matlab_main_tmp >> NAMES matlab) >> >> if(NOT _matlab_main_tmp) >> execute_process( >> COMMAND "which" matlab >> OUTPUT_VARIABLE _matlab_main_tmp >> ERROR_VARIABLE _matlab_main_tmp_err) >> # the output should be cleaned up >> string(STRIP "${_matlab_main_tmp}" _matlab_main_tmp) >> endif() > > If find_program doesn't find it, "which" won't have better luck. Which is also what I thought but this is factually incorrect. I tested that yesterday on a regular LTS14.04 server. find_program fails while "which matlab" does not. > >> if(Matlab_MAIN_PROGRAM) >> set(_matlab_main_tmp ${Matlab_MAIN_PROGRAM}) >> else() >> find_program( >> _matlab_main_tmp >> matlab >> PATHS ${Matlab_ROOT_DIR} ${Matlab_ROOT_DIR}/bin >> DOC "Matlab main program" >> NO_DEFAULT_PATH >> ) >> endif() > > We should not risk finding the wrong matlab here. See below. > >> # todo cleanup with code above >> if(NOT DEFINED Matlab_MAIN_PROGRAM) >> find_program( >> Matlab_MAIN_PROGRAM >> matlab >> PATHS ${Matlab_ROOT_DIR} ${Matlab_ROOT_DIR}/bin >> DOC "Matlab main program" >> NO_DEFAULT_PATH >> ) >> endif() > > This looks like the component-specific search. If we are to present > a component-specific result variable name then it can simply be > populated from the "one true" location found. In the code just above, the "if()" condition is not needed anymore since now there is no aliasing with the previous searches. I'll fix that. On Windows, we have the Matlab_ROOT and the version from the registry, so we need to run find_program there. On OSX, if the previous find_program or which matlab did not result in anything relevant, we parse the /Application/MATLAB_xxx folders so we end up with a root and a version without a main_program, so the find_program above is also needed. > > If "matlab" is needed to compute information for other components > then finding it should not be optional. There should be a single > > find_program(Matlab_EXECUTABLE ...) > > whose result is cached and re-used everywhere that "matlab" is > needed. Separate symlink-resolving on it can be done when needed > but does not need to be cached. I agree with that, but this behaviour is not consistent across every platforms. My preference goes to the kind of modular approach currently implemented in the module, which is: 1- find all possible matlab roots with the tools provided by the system, or just stick to the user input 2- for each or one of them, find the version if information is lacking 3- return the one that fits best to the find_matlab options Finding the matlab program from time to time is for me an implementation detail: examples - if the user give the Matlab_ROOT, the version is lacking, I then need to find matlab in the second step. - if the user gave no input, I need to find Matlab in the first step, conditionally on the platform, to extract Matlab_ROOT (and not to find matlab itself). I then run the find_matlab in the second step conditionally on the platform again. In the third step, I gather all the information I have so far, which is the intersection for all platforms: MatlabROOT and MatlabVERSION. - on win32, if there is not user defined Matlab_ROOT, we have the root and version from the registry, there is only the last component oriented find_program running, only if required by the user. Also the main functionality is not performance oriented. Caching is in fact an undesirable side-effect for what I want to achieve. While finding matlab is certainly not optimal, this is clearly taking much less time than just launching matlab. If I start trying to optimize all those calls, I would have complicated execution paths. What I can do is to output in the first step the root AND the version in all case, instead of dedicating a step for that. We will then save a find_program and have a cleaner/clearer structure. What do you think? Best, Raffi From brad.king at kitware.com Thu Feb 19 10:48:21 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 19 Feb 2015 10:48:21 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <2CDBE292-3248-46F2-8BD9-8698D183B90C@free.fr> References: <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5EAD2.9000900@kitware.com > <2CDBE292-3248-46F2-8BD9-8698D183B90C@free.fr> Message-ID: <54E605C5.7040702@kitware.com> On 02/19/2015 10:20 AM, Raffi Enficiaud wrote: >> If find_program doesn't find it, "which" won't have better luck. > > I tested that yesterday on a regular LTS14.04 server. find_program > fails while "which matlab" does not. Please figure out why find_program fails so we can fix it rather than working around it with "which". The find_program command searches the PATH just like "which" does. Is "matlab" one of those executables with "x" permission but not "r" permission? > Finding the matlab program from time to time is for me an > implementation detail Okay, I just wanted an explanation for why there are so many find_program calls for the same thing. If the design is better that way then so be it. However: > Also the main functionality is not performance oriented. > If I start trying to optimize all those calls, I would have > complicated execution paths. Caching is not about performance. It is about giving the user the opportunity to set the result explicitly when the automatic determination gets an undesired result. There needs to be at least (and ideally exactly) one cache entry that stores the location of matlab. If the user sets it up front then great. If not then we should search and store the result there for the user to accept or edit later. Currently MATLAB_USER_ROOT allows the user to specify up front, but does not serve the second role. -Brad From raffi.enficiaud at free.fr Thu Feb 19 11:54:49 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Thu, 19 Feb 2015 17:54:49 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54E605C5.7040702@kitware.com> References: <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5EAD2.9000900@kitware.com > <2CDBE292-3248-46F2-8BD9-8698D183B90C@free.fr> <54E605C5.7040702@kitware.co m> Message-ID: <3CDC03C4-148D-4A02-BA8F-A1AE150657D5@free.fr> > On 19 Feb 2015, at 16:48, Brad King wrote: > > On 02/19/2015 10:20 AM, Raffi Enficiaud wrote: >>> If find_program doesn't find it, "which" won't have better luck. >> >> I tested that yesterday on a regular LTS14.04 server. find_program >> fails while "which matlab" does not. > > Please figure out why find_program fails so we can fix it rather > than working around it with "which". The find_program command > searches the PATH just like "which" does. Is "matlab" one of > those executables with "x" permission but not "r" permission? On the system I am working, matlab in the PATH is a symlink with r & x permissions renficiaud at madeira3:~/Code/CMake$ which matlab /usr/bin/matlab renficiaud at madeira3:~/Code/CMake$ ls -al /usr/bin/matlab lrwxrwxrwx 1 root root 24 May 15 2013 /usr/bin/matlab -> /etc/alternatives/matlab renficiaud at madeira3:~/Code/CMake$ ls -al /etc/alternatives/matlab lrwxrwxrwx 1 root root 43 Oct 20 15:32 /etc/alternatives/matlab -> /is/software/matlab/linux/R2014a/bin/matlab renficiaud at madeira3:~/Code/CMake$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games Is there any internal in the find_program to check what conditions are not met? > >> Finding the matlab program from time to time is for me an >> implementation detail > > Okay, I just wanted an explanation for why there are so many > find_program calls for the same thing. If the design is better > that way then so be it. However: > >> Also the main functionality is not performance oriented. >> If I start trying to optimize all those calls, I would have >> complicated execution paths. > > Caching is not about performance. It is about giving the user > the opportunity to set the result explicitly when the automatic > determination gets an undesired result. > > There needs to be at least (and ideally exactly) one cache > entry that stores the location of matlab. If the user sets it > up front then great. If not then we should search and store the > result there for the user to accept or edit later. Currently > MATLAB_USER_ROOT allows the user to specify up front, but does > not serve the second role. > If I understand correctly, you propose to merge the variables MATLAB_USER_ROOT and Matlab_ROOT_DIR, is that correct? Or just drop Matlab_ROOT_DIR from the user view? Best, Raffi From brad.king at kitware.com Thu Feb 19 12:52:25 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 19 Feb 2015 12:52:25 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <3CDC03C4-148D-4A02-BA8F-A1AE150657D5@free.fr> References: <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5EAD2.9000900@kitware.com > <2CDBE292-3248-46F2-8BD9-8698D183B90C@free.fr> <54E605C5.7040702@kitware.co m> <3CDC03C4-148D-4A02-BA8F-A1AE150657D5@free.fr> Message-ID: <54E622D9.5080108@kitware.com> On 02/19/2015 11:54 AM, Raffi Enficiaud wrote: > On the system I am working, matlab in the PATH is a symlink with > r & x permissions [snip] > Is there any internal in the find_program to check what conditions > are not met? What are the permissions of the underlying file after resolving the link? The find_program command wants "r" permission, and it always unwraps symlinks. > you propose to merge the variables MATLAB_USER_ROOT and > Matlab_ROOT_DIR, is that correct? Yes. Furthermore, if we can always compute the other information from that value then as little of it should be cached as possible. Thanks, -Brad From raffi.enficiaud at free.fr Thu Feb 19 16:15:34 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Thu, 19 Feb 2015 22:15:34 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54E622D9.5080108@kitware.com> References: <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5EAD2.9000900@kitware.com > <2CDBE292-3248-46F2-8BD9-8698D183B90C@free.fr> <54E605C5.7040702@kitware.co m> <3CDC03C4-148D-4A02-BA8F-A1AE150657D5@free.fr> <54E622D9.5080108@kitware.c om> Message-ID: <0E557726-BB05-4C35-BE3B-44DEB5213734@free.fr> > On 19 Feb 2015, at 18:52, Brad King wrote: > > On 02/19/2015 11:54 AM, Raffi Enficiaud wrote: >> On the system I am working, matlab in the PATH is a symlink with >> r & x permissions > [snip] >> Is there any internal in the find_program to check what conditions >> are not met? > > What are the permissions of the underlying file after resolving > the link? The find_program command wants "r" permission, and it > always unwraps symlinks. If I continue the chain: renficiaud at madeira3:~$ ls -al /etc/alternatives/matlab lrwxrwxrwx 1 root root 43 Oct 20 15:32 /etc/alternatives/matlab -> /is/software/matlab/linux/R2014a/bin/matlab renficiaud at madeira3:~$ ls -al /is/software/matlab/linux/R2014a/bin/matlab -r-xr-xr-x 1 stark is 55331 Dec 27 2013 /is/software/matlab/linux/R2014a/bin/matlab r permission are definitively there and the user is allowed to run this command. BTW, I cannot see in the documentation that find_program unwraps symlinks. By myself, I explained the observed behaviour as find_program being blind to symlinks. > >> you propose to merge the variables MATLAB_USER_ROOT and >> Matlab_ROOT_DIR, is that correct? > > Yes. Furthermore, if we can always compute the other information > from that value then as little of it should be cached as possible. > Ok, will do then. From brad.king at kitware.com Thu Feb 19 16:24:56 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 19 Feb 2015 16:24:56 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <0E557726-BB05-4C35-BE3B-44DEB5213734@free.fr> References: <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5EAD2.9000900@kitware.com > <2CDBE292-3248-46F2-8BD9-8698D183B90C@free.fr> <54E605C5.7040702@kitware.co m> <3CDC03C4-148D-4A02-BA8F-A1AE150657D5@free.fr> <54E622D9.5080108@kitware.c om> <0E557726-BB05-4C35-BE3B-44DEB5213734@free.fr> Message-ID: <54E654A8.2090603@kitware.com> On 02/19/2015 04:15 PM, Raffi Enficiaud wrote: > renficiaud at madeira3:~$ ls -al /is/software/matlab/linux/R2014a/bin/matlab > -r-xr-xr-x 1 stark is 55331 Dec 27 2013 /is/software/matlab/linux/R2014a/bin/matlab > > r permission are definitively there and the user is allowed to run this command. Hmm. See if you can reproduce it with something simple like: $ cat test.cmake find_program(MATLAB NAMES matlab) message(MATLAB=${MATLAB}) $ cmake -P test.cmake Then build your own CMake with -DCMAKE_BUILD_TYPE=Debug and run it in a debugger to track down what goes wrong. Set a breakpoint on "cmsys::SystemTools::FileExists" to step through the low level checks. > BTW, I cannot see in the documentation that find_program unwraps symlinks. I meant that when checking for existence and permissions it uses something equivalent to "stat" as against "lstat". A broken symlink is not considered to exist. It certainly doesn't resolve symlinks in the returned path. -Brad From raffi.enficiaud at free.fr Thu Feb 19 16:58:57 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Thu, 19 Feb 2015 22:58:57 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54E654A8.2090603@kitware.com> References: <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5EAD2.9000900@kitware.com > <2CDBE292-3248-46F2-8BD9-8698D183B90C@free.fr> <54E605C5.7040702@kitware.co m> <3CDC03C4-148D-4A02-BA8F-A1AE150657D5@free.fr> <54E622D9.5080108@kitware.c om> <0E557726-BB05-4C35-BE3B-44DEB5213734@free.fr> <54E654A8.2090603@kitware. com> Message-ID: > On 19 Feb 2015, at 22:24, Brad King wrote: > > On 02/19/2015 04:15 PM, Raffi Enficiaud wrote: >> renficiaud at madeira3:~$ ls -al /is/software/matlab/linux/R2014a/bin/matlab >> -r-xr-xr-x 1 stark is 55331 Dec 27 2013 /is/software/matlab/linux/R2014a/bin/matlab >> >> r permission are definitively there and the user is allowed to run this command. > > Hmm. See if you can reproduce it with something simple like: > > [snip] I cannot reproduce with this simple example. However, on next, I did that (line 990): find_program( _matlab_main_tmp NAMES matlab) message(FATAL_ERROR "is find matlab correct? ${_matlab_main_tmp}") The error message is CMake Error at /is/ps2/renficiaud/Code/CMake/Modules/FindMatlab.cmake:993 (message): is find matlab correct? Call Stack (most recent call first): CMakeLists.txt:11 (find_package) Then I did that: find_program( matlab_main_tmp NAMES matlab) message(FATAL_ERROR "is find matlab correct? ${matlab_main_tmp}") and the error message is CMake Error at /is/ps2/renficiaud/Code/CMake/Modules/FindMatlab.cmake:993 (message): is find matlab correct? /usr/bin/matlab Call Stack (most recent call first): CMakeLists.txt:11 (find_package) The functionality works then, there is something else with the variable itself. Some lines before I uses the same variable name set(_matlab_main_tmp "") I just unset this variable before the call to the find_program, and now it works good. Basically the variable is not overwritten, maybe because another one is created in the cache? Any hint? Known behaviour? I'll do the fix and remove the "which matlab" then (so we dropped the # of "find matlab" from 4 to 2 in one day). Best, Raffi From Geoffrey.Viola at asirobots.com Thu Feb 19 19:44:17 2015 From: Geoffrey.Viola at asirobots.com (Geoffrey Viola) Date: Fri, 20 Feb 2015 00:44:17 +0000 Subject: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support In-Reply-To: <54E365F4.3030104@kitware.com> References: <0543633b28c7431f93808182fc1e26e1@CO1PR07MB208.namprd07.prod.outlook.com> <543D2BBC.1010306@kitware.com> <0b5b33c4d1f0472782e260f9e5bce980@CO1PR07MB208.namprd07.prod.outlook.com> <544E4C9F.3050408@kitware.com> <64abd7ba273245b686146aa67acb7e8a@DM2PR0701MB1020.namprd07.prod.outlook.com> <545A7C44.6040305@kitware.com> <5474E132.2010705@kitware.com> <54D129E3.60101@kitware.com> <54E365F4.3030104@kitware.com> Message-ID: > Great, thanks. However, we really need to have the cmake_common.cmake script used to drive it The nightly build that I use does use the "cmake_common.cmake" script to grab the latest code, build, test it, etc. Here's what my nightly build results look like: https://open.cdash.org/buildSummary.php?buildid=3701008. > Any tests depending on local system configuration need to have an option to explicitly enable them on such systems. See the existing CMake_TEST_FindJsonCpp option for example. > Just put your new test(s) inside a condition on a CMake_TEST_GreenHillsMULTI variable. Then add to your dashboard script:: > > set(dashboard_cache " > CMake_TEST_GreenHillsMULTI:BOOL=ON > ") > > before including cmake_common.cmake and the tests will be enabled once they are in the repo. I made that small change in the attached patch. I ran another experimental build in debug. Here are those results: https://open.cdash.org/buildSummary.php?buildid=3701457. I expected the "CMakeOnly.MajorVersionSelection-PythonInterp_2" to fail because I have the Python 3.3 executable in my path. But I still get the "CMake.GetPrerequisites" test timing out. Also, I haven't debugged the warnings in the Build row yet. This suit of tests was done using a script based on the autogenerated "CTestScript.cmake" script. Geoffrey Viola SOFTWARE ENGINEER asirobots.com -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Tuesday, February 17, 2015 9:02 AM To: Geoffrey Viola Cc: cmake-developers at cmake.org Subject: Re: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support On 02/17/2015 10:47 AM, Geoffrey Viola wrote: > I submitted a test report with all the tests passing. > https://open.cdash.org/buildSummary.php?buildid=3698090. Great, thanks. However, we really need to have the cmake_common.cmake script used to drive it. What I was asking in my previous response was for you to get a normal nightly testing dashboard submission configured and working independent of your changes. For that using the common script with ctest_update is okay. > I'm not sure how to handle cases where the user wants to run all the > test and expects all to pass, but does not have Green Hills installed. Any tests depending on local system configuration need to have an option to explicitly enable them on such systems. See the existing CMake_TEST_FindJsonCpp option for example. Just put your new test(s) inside a condition on a CMake_TEST_GreenHillsMULTI variable. Then add to your dashboard script:: set(dashboard_cache " CMake_TEST_GreenHillsMULTI:BOOL=ON ") before including cmake_common.cmake and the tests will be enabled once they are in the repo. Thanks, -Brad This message contains confidential information and is intended only for the recipient. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately if you have received this e-mail by mistake and delete this e-mail from your system. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Added-some-support-for-a-Green-Hills-MULTI.patch Type: application/octet-stream Size: 63159 bytes Desc: 0001-Added-some-support-for-a-Green-Hills-MULTI.patch URL: From aklitzing at gmail.com Fri Feb 20 06:07:55 2015 From: aklitzing at gmail.com (A. Klitzing) Date: Fri, 20 Feb 2015 12:07:55 +0100 Subject: [cmake-developers] Support of codesign In-Reply-To: <1678645.2J7lYulytt@stryke> References: <15229978.cqkd4WDHtU@stryke> <1678645.2J7lYulytt@stryke> Message-ID: Hi Clint, I have another patch to tweak the error output a little bit. If codesign fails it won't be possible to get the error message of codesign itself. That is a little bit confusing because it just fails without an understandable reason. This patch will print the output of codesign if it fails. Best regards Andr? Klitzing 2014-10-28 19:22 GMT+01:00 Clinton Stimpson : > > Thanks for the patch. > Its in the repository now. > > > Clint > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-CPack-Print-output-from-codesign-if-signing-fails.patch Type: text/x-diff Size: 2431 bytes Desc: not available URL: From brad.king at kitware.com Fri Feb 20 07:50:48 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 20 Feb 2015 07:50:48 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: References: <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5EAD2.9000900@kitware.com > <2CDBE292-3248-46F2-8BD9-8698D183B90C@free.fr> <54E605C5.7040702@kitware.co m> <3CDC03C4-148D-4A02-BA8F-A1AE150657D5@free.fr> <54E622D9.5080108@kitware.c om> <0E557726-BB05-4C35-BE3B-44DEB5213734@free.fr> <54E654A8.2090603@kitware. com> Message-ID: <54E72DA8.3060701@kitware.com> On 02/19/2015 04:58 PM, Raffi Enficiaud wrote: > I just unset this variable before the call to the find_program, > and now it works good. Yes, this is expected. If find_program sees that the variable is already set then it assumes the value is correct. The idea is that projects can prevent the find from actually running by doing their own thing to set the variable first. -Brad From mantis at public.kitware.com Fri Feb 20 07:53:03 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Fri, 20 Feb 2015 07:53:03 -0500 Subject: [cmake-developers] [CMake 0015412]: find_dependency macro does not check for _FOUND Message-ID: <0126dd20e97cf9ca336ef31fd6fda450@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15412 ====================================================================== Reported By: Kiron Assigned To: ====================================================================== Project: CMake Issue ID: 15412 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-20 07:53 EST Last Modified: 2015-02-20 07:53 EST ====================================================================== Summary: find_dependency macro does not check for _FOUND Description: The find_dependency macro only checks for ${dep}_FOUND and not for the alternative form _FOUND. Not _FOUND considering means, that the find_dependency macro will not work with FindModules which use FIND_PACKAGE_HANDLE_STANDARD_ARGS and do not set FOUND_VAR to ${CMAKE_FIND_PACKAGE_NAME}, since by default it will set _FOUND. Or other FindModules which just set _FOUND. I also think in line 80 till 83 it should use unset instead of set. [1] http://www.cmake.org/gitweb?p=stage/cmake.git;a=blob;f=Modules/CMakeFindDependencyMacro.cmake;h=73efaae7cddc5915fb5e273decd7b703883b929d;hb=HEAD#l78 ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-20 07:53 Kiron New Issue ====================================================================== From clinton at elemtech.com Fri Feb 20 10:20:37 2015 From: clinton at elemtech.com (Clinton Stimpson) Date: Fri, 20 Feb 2015 08:20:37 -0700 Subject: [cmake-developers] Support of codesign In-Reply-To: References: <1678645.2J7lYulytt@stryke> Message-ID: <2830805.x682EbQycE@stryke> On Friday, February 20, 2015 12:07:55 PM A. Klitzing wrote: > Hi Clint, > > I have another patch to tweak the error output a little bit. If codesign > fails it won't be possible to get the error message of codesign itself. > That is a little bit confusing because it just fails without an > understandable reason. > > This patch will print the output of codesign if it fails. > Thanks. Clint From brad.king at kitware.com Fri Feb 20 10:35:09 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 20 Feb 2015 10:35:09 -0500 Subject: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support In-Reply-To: References: <0543633b28c7431f93808182fc1e26e1@CO1PR07MB208.namprd07.prod.outlook.com> <543D2BBC.1010306@kitware.com> <0b5b33c4d1f0472782e260f9e5bce980@CO1PR07MB208.namprd07.prod.outlook.com> <544E4C9F.3050408@kitware.com> <64abd7ba273245b686146aa67acb7e8a@DM2PR0701MB1020.namprd07.prod.outlook.com> <545A7C44.6040305@kitware.com> <5474E132.2010705@kitware.com> <54D129E3.60101@kitware.com> <54E365F4.3030104@kitware.com> Message-ID: <54E7542D.6050808@kitware.com> On 02/19/2015 07:44 PM, Geoffrey Viola wrote: > The nightly build that I use does use the "cmake_common.cmake" script > to grab the latest code, build, test it, etc. Here's what my nightly > build results look like: https://open.cdash.org/buildSummary.php?buildid=3701008. Sorry, I mixed up your nightly build and the experimental build you linked. > I made that small change in the attached patch. > I ran another experimental build in debug. Here are those results: > https://open.cdash.org/buildSummary.php?buildid=3701457. Thanks. > I expected the "CMakeOnly.MajorVersionSelection-PythonInterp_2" to fail > because I have the Python 3.3 executable in my path. Please add to your dashboard scripts a line like: set(ENV{PATH} ...) to set a path without python in it for running this dashboard. That will avoid the problem, which is a separate discussion to address. (The test is covering that the requested major version is preferred if executables called "python2" and "python3" are both in the path, but if just "python" is available then it is used.) > But I still get the "CMake.GetPrerequisites" test timing out. I don't see that in: https://open.cdash.org/buildSummary.php?buildid=3701966 > Also, I haven't debugged the warnings in the Build row yet. That may be due to the lack of a fresh build tree: #CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY}) > This suit of tests was done using a script based on the > autogenerated "CTestScript.cmake" script. I don't think CDash has been configured to generate those for CMake properly. Once you have the nightly dashboard submission running cleanly then we can look at merging your generator for testing in 'next' to have it covered there. -Brad From brad.king at kitware.com Fri Feb 20 10:39:39 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 20 Feb 2015 10:39:39 -0500 Subject: [cmake-developers] [vc12/idl] output directory problem In-Reply-To: References: Message-ID: <54E7553B.9090501@kitware.com> On 02/19/2015 01:54 AM, Tim Blechmann wrote: > i'm having troubles with the midl compiler of generated msvc2013 project > files: the generated projects contain a hardcoded output directory: > $(IntDir). however having this property, the midl call fails for me. if > i remove this property, or replace it with $(ProjectDir)/$(IntDir) it > compiles fine. Can you please post a complete sample/minimal project tarball that shows the error you see? It could also be demonstrated in the form of a patch to CMake that updates Tests/VSMidl to show the problem. Thanks, -Brad From mantis at public.kitware.com Fri Feb 20 11:09:54 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Fri, 20 Feb 2015 11:09:54 -0500 Subject: [cmake-developers] [CMake 0015413]: CheckStructHasMember generates an uninitialized variable warning Message-ID: <32fbc33ab53d997d396e1713ac9f7056@www.cmake.org> The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15413 ====================================================================== Reported By: Lekensteyn Assigned To: ====================================================================== Project: CMake Issue ID: 15413 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-20 11:09 EST Last Modified: 2015-02-20 11:09 EST ====================================================================== Summary: CheckStructHasMember generates an uninitialized variable warning Description: Related to bug 15203 (which is fixed in CMake 3.2). The current check_struct_has_member macro (as can be found in CMake 3.2) generates an uninitialized variable warning (noticeable via Clangs static code analyzer). A patch was proposed in http://www.cmake.org/Bug/view.php?id=15203#c37979, but a valid concern was raised about invoking C++ constructors. Here is a new minimal patch which uses sizeof instead. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-20 11:09 Lekensteyn New Issue 2015-02-20 11:09 Lekensteyn File Added: 0001-CheckStructHasMember-fix-null-deref-warning.patch ====================================================================== From Geoffrey.Viola at asirobots.com Fri Feb 20 10:55:50 2015 From: Geoffrey.Viola at asirobots.com (Geoffrey Viola) Date: Fri, 20 Feb 2015 15:55:50 +0000 Subject: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support In-Reply-To: <54E7542D.6050808@kitware.com> References: <0543633b28c7431f93808182fc1e26e1@CO1PR07MB208.namprd07.prod.outlook.com> <543D2BBC.1010306@kitware.com> <0b5b33c4d1f0472782e260f9e5bce980@CO1PR07MB208.namprd07.prod.outlook.com> <544E4C9F.3050408@kitware.com> <64abd7ba273245b686146aa67acb7e8a@DM2PR0701MB1020.namprd07.prod.outlook.com> <545A7C44.6040305@kitware.com> <5474E132.2010705@kitware.com> <54D129E3.60101@kitware.com> <54E365F4.3030104@kitware.com> <54E7542D.6050808@kitware.com> Message-ID: >> But I still get the "CMake.GetPrerequisites" test timing out. > > I don't see that in: > > https://open.cdash.org/buildSummary.php?buildid=3701966 You're right. For some reason it is not timing out. It just takes a really long time. I wonder if my path is long. That test takes an order of magnitude longer on my machine than the rest: https://open.cdash.org/testSummary.php?project=1&name=CMake.GetPrerequisites&date=2015-02-19. > Please add to your dashboard scripts a line like: > > set(ENV{PATH} ...) > > to set a path without python in it for running this dashboard. ... >> Also, I haven't debugged the warnings in the Build row yet. > > That may be due to the lack of a fresh build tree: > > #CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY}) I'll give it a try this weekend. Geoffrey Viola SOFTWARE ENGINEER asirobots.com -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Friday, February 20, 2015 8:35 AM To: Geoffrey Viola Cc: cmake-developers at cmake.org Subject: Re: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support On 02/19/2015 07:44 PM, Geoffrey Viola wrote: > The nightly build that I use does use the "cmake_common.cmake" script > to grab the latest code, build, test it, etc. Here's what my nightly > build results look like: https://open.cdash.org/buildSummary.php?buildid=3701008. Sorry, I mixed up your nightly build and the experimental build you linked. > I made that small change in the attached patch. > I ran another experimental build in debug. Here are those results: > https://open.cdash.org/buildSummary.php?buildid=3701457. Thanks. > I expected the "CMakeOnly.MajorVersionSelection-PythonInterp_2" to > fail because I have the Python 3.3 executable in my path. Please add to your dashboard scripts a line like: set(ENV{PATH} ...) to set a path without python in it for running this dashboard. That will avoid the problem, which is a separate discussion to address. (The test is covering that the requested major version is preferred if executables called "python2" and "python3" are both in the path, but if just "python" is available then it is used.) > But I still get the "CMake.GetPrerequisites" test timing out. I don't see that in: https://open.cdash.org/buildSummary.php?buildid=3701966 > Also, I haven't debugged the warnings in the Build row yet. That may be due to the lack of a fresh build tree: #CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY}) > This suit of tests was done using a script based on the autogenerated > "CTestScript.cmake" script. I don't think CDash has been configured to generate those for CMake properly. Once you have the nightly dashboard submission running cleanly then we can look at merging your generator for testing in 'next' to have it covered there. -Brad This message contains confidential information and is intended only for the recipient. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately if you have received this e-mail by mistake and delete this e-mail from your system. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From mantis at public.kitware.com Sat Feb 21 04:26:05 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Sat, 21 Feb 2015 10:26:05 +0100 Subject: [cmake-developers] [CMake 0015414]: Consider add_dependencies for INTERFACE libraries. Message-ID: <00b331f2537566e28686eb0acbd6b1dd@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15414 ====================================================================== Reported By: Stephen Kelly Assigned To: ====================================================================== Project: CMake Issue ID: 15414 Category: CMake Reproducibility: have not tried Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-21 10:26 CET Last Modified: 2015-02-21 10:26 CET ====================================================================== Summary: Consider add_dependencies for INTERFACE libraries. Description: https://github.com/Slicer/VTK/commit/f5dd079959ad050a80a59727ea556102cdb27d9f#commitcomment-9362165 http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/51780 ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-21 10:26 Stephen Kelly New Issue ====================================================================== From domen.vrankar at gmail.com Sat Feb 21 05:08:39 2015 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Sat, 21 Feb 2015 11:08:39 +0100 Subject: [cmake-developers] KWSys patches In-Reply-To: <54E24B99.3010709@kitware.com> References: <54E20763.2070306@kitware.com> <54E24B99.3010709@kitware.com> Message-ID: > FYI, the proposed GetCanonicalPath already exists in KWSys as > SystemTools::GetRealPath. It returns the unchanged path on error. > That could be extended to take an optional second argument as a > pointer to a buffer describing the error. If the argument is NULL > use the current behavior. Otherwise return an empty string and > populate the error info. Then make your new call sites use the > new argument. Hm I missed this one... My old nightly version Code::Blocks seems to have missed it in search. Thanks. Attached are patches for KWSys Glob and SystemTools (with changes required by Glob). Thanks, Domen -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-glob-recurse-cyclic-recursion-handling.patch Type: text/x-diff Size: 11966 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-dead-code-cleanup-from-glob.patch Type: text/x-diff Size: 2118 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0003-glob-support-for-directory-listing.patch Type: text/x-diff Size: 3300 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0004-glob-removed-addition-of-a-slash.patch Type: text/x-diff Size: 841 bytes Desc: not available URL: From tim at klingt.org Sat Feb 21 07:58:45 2015 From: tim at klingt.org (Tim Blechmann) Date: Sat, 21 Feb 2015 20:58:45 +0800 Subject: [cmake-developers] [vc12/idl] output directory problem In-Reply-To: <54E7553B.9090501@kitware.com> References: <54E7553B.9090501@kitware.com> Message-ID: >> i'm having troubles with the midl compiler of generated msvc2013 project >> files: the generated projects contain a hardcoded output directory: >> $(IntDir). however having this property, the midl call fails for me. if >> i remove this property, or replace it with $(ProjectDir)/$(IntDir) it >> compiles fine. > > Can you please post a complete sample/minimal project tarball that > shows the error you see? > > It could also be demonstrated in the form of a patch to CMake that > updates Tests/VSMidl to show the problem. i'd love to provide a reduced test case, though i can only reproduce this in a complex real-world buildsystem, with dozens of libraries and some include_external_msproject / add_dependencies pairs ... fwiw, i've been able to work around this with vanilla cmake-3.1, by moving the .idl file and the source including the iid file("_i.c") into a separate static library. -- that said, i wonder: why would it be ok to use a relative path in the generated project ... or, what would be the disadvantage of using an absolute path? best, tim From domen.vrankar at gmail.com Sat Feb 21 09:39:45 2015 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Sat, 21 Feb 2015 15:39:45 +0100 Subject: [cmake-developers] [PATCH 0/3] CPACK_RPM_PACKAGE_ARCHITECTURE In-Reply-To: References: Message-ID: 2015-02-19 9:01 GMT+01:00 Joshua A Clayton : > This patch series extends CPackRPM to support cross-built rpms > Previously only native and "noarch" rpms were possible. > Other architecture choices resulted in an error from rpmbuild. > Also included at no extra charge, is component support through > CPACK_RPM__PACKAGE_ARCHITECTURE, and unit tests for > component architecture. Applied with minor tweaks to next: http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=43fab4ca Thanks, Domen From domen.vrankar at gmail.com Sat Feb 21 16:33:36 2015 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Sat, 21 Feb 2015 22:33:36 +0100 Subject: [cmake-developers] KWSys patches In-Reply-To: References: <54E20763.2070306@kitware.com> <54E24B99.3010709@kitware.com> Message-ID: > Attached are patches for KWSys Glob and SystemTools (with changes > required by Glob). I apologize for spamming... After rewriting CMake tests with directories instead of symlinks I noticed that patch 3 was not handling basic directory case. Attached are patches with fixed patch 3. Thanks, Domen -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-glob-recurse-cyclic-recursion-handling.patch Type: text/x-diff Size: 11966 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-dead-code-cleanup-from-glob.patch Type: text/x-diff Size: 2118 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0003-glob-support-for-directory-listing.patch Type: text/x-diff Size: 3642 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0004-glob-removed-addition-of-a-slash.patch Type: text/x-diff Size: 841 bytes Desc: not available URL: From gjasny at googlemail.com Sun Feb 22 13:00:08 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 22 Feb 2015 19:00:08 +0100 Subject: [cmake-developers] [PATCH v5 0/4] Add XCTest Bundles Support Message-ID: <1424628012-90060-1-git-send-email-gjasny@googlemail.com> Hello, this series contains the latest XCTest patches. Changes since v4: * Added release notes * Use get_filename_component to sanitize paths * Moved and wires up XcodePlatformFrameworks test * Cleaned and wired up XCTest Test. Thanks, Gregor Gregor Jasny (4): Add handling for XCTest bundles Shorten CFBundleExecutable to file name only Also add Platform specific Frameworks to Darwin Framework search path Add XCTest example to test Frameworks and Cocoa App Bundles Help/manual/cmake-modules.7.rst | 1 + Help/manual/cmake-properties.7.rst | 1 + Help/module/XCTestUtilities.rst | 1 + Help/prop_tgt/XCTEST.rst | 13 + Help/release/dev/xcode-xctest.rst | 6 + Modules/Platform/Darwin.cmake | 7 + Modules/XCTestUtilities.cmake | 123 ++++ Source/cmGlobalXCodeGenerator.cxx | 12 +- Source/cmOSXBundleGenerator.cxx | 3 +- Source/cmTarget.cxx | 16 +- Source/cmTarget.h | 3 + Tests/CMakeLists.txt | 4 + Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 1 + .../XcodeProject/XcodePlatformFrameworks.cmake | 8 + Tests/XCTest/CMakeLists.txt | 58 ++ Tests/XCTest/CocoaExample/AppDelegate.h | 7 + Tests/XCTest/CocoaExample/AppDelegate.m | 18 + Tests/XCTest/CocoaExample/Info.plist | 30 + Tests/XCTest/CocoaExample/MainMenu.xib | 680 +++++++++++++++++++++ Tests/XCTest/CocoaExample/main.m | 5 + Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m | 13 + Tests/XCTest/FrameworkExample/FrameworkExample.c | 6 + Tests/XCTest/FrameworkExample/FrameworkExample.h | 1 + Tests/XCTest/FrameworkExample/Info.plist | 28 + .../FrameworkExampleTests/FrameworkExampleTests.m | 16 + Tests/XCTest/FrameworkExampleTests/Info.plist | 24 + 26 files changed, 1081 insertions(+), 4 deletions(-) create mode 100644 Help/module/XCTestUtilities.rst create mode 100644 Help/prop_tgt/XCTEST.rst create mode 100644 Help/release/dev/xcode-xctest.rst create mode 100644 Modules/XCTestUtilities.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodePlatformFrameworks.cmake create mode 100644 Tests/XCTest/CMakeLists.txt create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.h create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.m create mode 100644 Tests/XCTest/CocoaExample/Info.plist create mode 100644 Tests/XCTest/CocoaExample/MainMenu.xib create mode 100644 Tests/XCTest/CocoaExample/main.m create mode 100644 Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.c create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.h create mode 100644 Tests/XCTest/FrameworkExample/Info.plist create mode 100644 Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m create mode 100644 Tests/XCTest/FrameworkExampleTests/Info.plist -- 2.3.0 From gjasny at googlemail.com Sun Feb 22 13:00:09 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 22 Feb 2015 19:00:09 +0100 Subject: [cmake-developers] [PATCH v5 1/4] Add handling for XCTest bundles In-Reply-To: <1424628012-90060-1-git-send-email-gjasny@googlemail.com> References: <1424628012-90060-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424628012-90060-2-git-send-email-gjasny@googlemail.com> An XCTest bundle is a CFBundle with a special product-type and bundle extension. For more information about XCTest visit the Mac Developer library at: http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/ Signed-off-by: Gregor Jasny --- Help/manual/cmake-modules.7.rst | 1 + Help/manual/cmake-properties.7.rst | 1 + Help/module/XCTestUtilities.rst | 1 + Help/prop_tgt/XCTEST.rst | 13 ++++ Help/release/dev/xcode-xctest.rst | 6 ++ Modules/XCTestUtilities.cmake | 123 +++++++++++++++++++++++++++++++++++++ Source/cmGlobalXCodeGenerator.cxx | 12 +++- Source/cmTarget.cxx | 16 ++++- Source/cmTarget.h | 3 + 9 files changed, 173 insertions(+), 3 deletions(-) create mode 100644 Help/module/XCTestUtilities.rst create mode 100644 Help/prop_tgt/XCTEST.rst create mode 100644 Help/release/dev/xcode-xctest.rst create mode 100644 Modules/XCTestUtilities.cmake diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 76058f9..ea0d1c1 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -240,5 +240,6 @@ All Modules /module/UseSWIG /module/UsewxWidgets /module/Use_wxWindows + /module/XCTestUtilities /module/WriteBasicConfigVersionFile /module/WriteCompilerDetectionHeader diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 25f989f..d795c6e 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -243,6 +243,7 @@ Properties on Targets /prop_tgt/VS_WINRT_REFERENCES /prop_tgt/WIN32_EXECUTABLE /prop_tgt/XCODE_ATTRIBUTE_an-attribute + /prop_tgt/XCTEST Properties on Tests =================== diff --git a/Help/module/XCTestUtilities.rst b/Help/module/XCTestUtilities.rst new file mode 100644 index 0000000..c96f515 --- /dev/null +++ b/Help/module/XCTestUtilities.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../Modules/XCTestUtilities.cmake diff --git a/Help/prop_tgt/XCTEST.rst b/Help/prop_tgt/XCTEST.rst new file mode 100644 index 0000000..8a2ef8b --- /dev/null +++ b/Help/prop_tgt/XCTEST.rst @@ -0,0 +1,13 @@ +XCTEST +------ + +This target is a XCTest CFBundle on the Mac. + +This property will usually get set via the ``add_xctest`` macro in +:module:`XCTestUtilities` module. + +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 depends on :prop_tgt:`BUNDLE` to be effective. diff --git a/Help/release/dev/xcode-xctest.rst b/Help/release/dev/xcode-xctest.rst new file mode 100644 index 0000000..af9f705 --- /dev/null +++ b/Help/release/dev/xcode-xctest.rst @@ -0,0 +1,6 @@ +Xcode XCTest Support +-------------------- + +* CMake gained the abiltity to create XCTest bundles to test + Frameworks and App Bundles within Xcode. The :module:`XCTestUtilities` + module provides convenience functions to handle :prop_tgt:`XCTEST` bundles. diff --git a/Modules/XCTestUtilities.cmake b/Modules/XCTestUtilities.cmake new file mode 100644 index 0000000..0ff648c --- /dev/null +++ b/Modules/XCTestUtilities.cmake @@ -0,0 +1,123 @@ +#.rst: +# XCTestUtilities +# --------------- +# +# Functions to help creating and executing XCTest bundles. +# +# An XCTest bundle is a CFBundle with a special product-type +# and bundle extension. For more information about XCTest visit +# the Mac Developer library at: +# http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/ +# +# The following functions are provided by this module: +# +# :: +# +# add_xctest +# add_test_xctest +# +# :: +# +# add_xctest( ) +# +# Create a XCTest bundle named which will test the target +# . Supported target types for testee are Frameworks and +# App Bundles. +# +# :: +# +# add_test_xctest( ) +# +# Add an XCTest bundle to the project to be run by :manual:`ctest(1)`. +# The test will be named and tests . + +#============================================================================= +# Copyright 2015 Gregor Jasny +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +function(add_xctest target testee) + + if(NOT CMAKE_OSX_SYSROOT) + message(STATUS "Adding XCTest bundles requires CMAKE_OSX_SYSROOT to be set.") + endif() + + # check that testee is a valid target type + get_target_property(TESTEE_TYPE ${testee} TYPE) + get_target_property(TESTEE_FRAMEWORK ${testee} FRAMEWORK) + get_target_property(TESTEE_MACOSX_BUNDLE ${testee} MACOSX_BUNDLE) + + if(TESTEE_TYPE STREQUAL "SHARED_LIBRARY" AND TESTEE_FRAMEWORK) + # found a framework + elseif(TESTEE_TYPE STREQUAL "EXECUTABLE" AND TESTEE_MACOSX_BUNDLE) + # found an app bundle + else() + message(FATAL_ERROR "Testee ${testee} is of unsupported type: ${TESTEE_TYPE}") + endif() + + add_library(${target} MODULE ${ARGN}) + + set_target_properties(${target} PROPERTIES + BUNDLE TRUE + XCTEST TRUE) + + find_library(FOUNDATION_LIBRARY Foundation) + if(NOT FOUNDATION_LIBRARY) + message(STATUS "Could not find Foundation Framework.") + endif() + + find_library(XCTEST_LIBRARY XCTest) + if(NOT XCTEST_LIBRARY) + message(STATUS "Could not find XCTest Framework.") + endif() + + target_link_libraries(${target} PRIVATE ${FOUNDATION_LIBRARY} ${XCTEST_LIBRARY}) + mark_as_advanced(FOUNDATION_LIBRARY XCTEST_LIBRARY) + + if(TESTEE_TYPE STREQUAL "SHARED_LIBRARY" AND TESTEE_FRAMEWORK) + set_target_properties(${testee} PROPERTIES + BUILD_WITH_INSTALL_RPATH TRUE + INSTALL_NAME_DIR "@rpath") + + target_link_libraries(${target} PRIVATE ${testee}) + elseif(TESTEE_TYPE STREQUAL "EXECUTABLE" AND TESTEE_MACOSX_BUNDLE) + add_dependencies(${target} ${testee}) + if(XCODE) + set_target_properties(${target} PROPERTIES + XCODE_ATTRIBUTE_BUNDLE_LOADER "$(TEST_HOST)" + XCODE_ATTRIBUTE_TEST_HOST "$") + else(XCODE) + target_link_libraries(${target} PRIVATE "-bundle_loader $") + endif(XCODE) + endif() +endfunction(add_xctest) + +function(add_test_xctest name target) + get_target_property(TARGET_TYPE ${target} TYPE) + get_target_property(TARGET_XCTEST ${target} XCTEST) + + if(NOT TARGET_TYPE STREQUAL "MODULE_LIBRARY" OR NOT TARGET_XCTEST) + message(FATAL_ERROR "Test ${target} is not a XCTest") + endif() + + execute_process( + COMMAND xcrun --find xctest + OUTPUT_VARIABLE XCTEST_EXECUTABLE + OUTPUT_STRIP_TRAILING_WHITESPACE) + + if(NOT XCTEST_EXECUTABLE) + message(STATUS "Unable to finc xctest binary.") + endif() + + add_test( + NAME ${name} + COMMAND ${XCTEST_EXECUTABLE} $/../..) +endfunction(add_test_xctest) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index aea134e..784bc24 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -804,6 +804,10 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext, { sourcecode = "compiled.mach-o.objfile"; } + else if(ext == "xctest") + { + sourcecode = "wrapper.cfbundle"; + } else if(ext == "xib") { keepLastKnownFileType = true; @@ -2598,7 +2602,9 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget) case cmTarget::STATIC_LIBRARY: return "archive.ar"; case cmTarget::MODULE_LIBRARY: - if (cmtarget.IsCFBundleOnApple()) + if (cmtarget.IsXCTestOnApple()) + return "wrapper.cfbundle"; + else if (cmtarget.IsCFBundleOnApple()) return "wrapper.plug-in"; else return ((this->XcodeVersion >= 22)? @@ -2622,7 +2628,9 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(cmTarget& cmtarget) case cmTarget::STATIC_LIBRARY: return "com.apple.product-type.library.static"; case cmTarget::MODULE_LIBRARY: - if (cmtarget.IsCFBundleOnApple()) + if (cmtarget.IsXCTestOnApple()) + return "com.apple.product-type.bundle.unit-test"; + else if (cmtarget.IsCFBundleOnApple()) return "com.apple.product-type.bundle"; else return ((this->XcodeVersion >= 22)? diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1ad0d48..c762d7f 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -615,6 +615,13 @@ bool cmTarget::IsCFBundleOnApple() const } //---------------------------------------------------------------------------- +bool cmTarget::IsXCTestOnApple() const +{ + return (this->IsCFBundleOnApple() && + this->GetPropertyAsBool("XCTEST")); +} + +//---------------------------------------------------------------------------- bool cmTarget::IsBundleOnApple() const { return this->IsFrameworkOnApple() || this->IsAppBundleOnApple() || @@ -6777,7 +6784,14 @@ std::string cmTarget::GetCFBundleDirectory(const std::string& config, const char *ext = this->GetProperty("BUNDLE_EXTENSION"); if (!ext) { - ext = "bundle"; + if (this->IsXCTestOnApple()) + { + ext = "xctest"; + } + else + { + ext = "bundle"; + } } fpath += ext; fpath += "/Contents"; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index ddd9859..b58e0a0 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -526,6 +526,9 @@ public: /** Return whether this target is a CFBundle (plugin) on Apple. */ bool IsCFBundleOnApple() const; + /** Return whether this target is a XCTest on Apple. */ + bool IsXCTestOnApple() const; + /** Return whether this target is an executable Bundle on Apple. */ bool IsAppBundleOnApple() const; -- 2.3.0 From gjasny at googlemail.com Sun Feb 22 13:00:10 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 22 Feb 2015 19:00:10 +0100 Subject: [cmake-developers] [PATCH v5 2/4] Shorten CFBundleExecutable to file name only In-Reply-To: <1424628012-90060-1-git-send-email-gjasny@googlemail.com> References: <1424628012-90060-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424628012-90060-3-git-send-email-gjasny@googlemail.com> Shorten the CFBundleExecutable in the PList file of Bundles to the file name only as it is done for Frameworks, too. Signed-off-by: Gregor Jasny --- Source/cmOSXBundleGenerator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index 55e20ab..a8eef82 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -181,8 +181,9 @@ void cmOSXBundleGenerator::CreateCFBundle(const std::string& targetName, std::string plist = root + "/" + this->GT->Target->GetCFBundleDirectory(this->ConfigName, true); plist += "/Info.plist"; + std::string name = cmSystemTools::GetFilenameName(targetName); this->LocalGenerator->GenerateAppleInfoPList(this->GT->Target, - targetName, + name, plist.c_str()); this->Makefile->AddCMakeOutputFile(plist); } -- 2.3.0 From gjasny at googlemail.com Sun Feb 22 13:00:11 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 22 Feb 2015 19:00:11 +0100 Subject: [cmake-developers] [PATCH v5 3/4] Also add Platform specific Frameworks to Darwin Framework search path In-Reply-To: <1424628012-90060-1-git-send-email-gjasny@googlemail.com> References: <1424628012-90060-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424628012-90060-4-git-send-email-gjasny@googlemail.com> Otherwise find_library is unable to lookup the XCTest framework which is not located in the SDK serach path: In the 10.10 SDK the SDK frameworks are located here: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/ Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/ whereas the Platform SDKs are located here: Developer/Library/Frameworks Signed-off-by: Gregor Jasny --- Modules/Platform/Darwin.cmake | 7 +++++++ Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 1 + Tests/RunCMake/XcodeProject/XcodePlatformFrameworks.cmake | 8 ++++++++ 3 files changed, 16 insertions(+) create mode 100644 Tests/RunCMake/XcodeProject/XcodePlatformFrameworks.cmake diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index e5c5f36..b912d98 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -166,6 +166,13 @@ if(_CMAKE_OSX_SYSROOT_PATH) ${_CMAKE_OSX_SYSROOT_PATH}/Network/Library/Frameworks ${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks ) + # add platform developer framework path if exists + get_filename_component(_CMAKE_OSX_PLATFORM_FRAMEWORK_PATH + ${_CMAKE_OSX_SYSROOT_PATH}/../../Library/Frameworks ABSOLUTE) + if(IS_DIRECTORY ${_CMAKE_OSX_PLATFORM_FRAMEWORK_PATH}) + list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH + ${_CMAKE_OSX_PLATFORM_FRAMEWORK_PATH}) + endif() endif() list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH /Library/Frameworks diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 792f40e..e4773de 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -3,3 +3,4 @@ include(RunCMake) run_cmake(XcodeFileType) run_cmake(XcodeAttributeGenex) run_cmake(XcodeAttributeGenexError) +run_cmake(XcodePlatformFrameworks) diff --git a/Tests/RunCMake/XcodeProject/XcodePlatformFrameworks.cmake b/Tests/RunCMake/XcodeProject/XcodePlatformFrameworks.cmake new file mode 100644 index 0000000..d34092a --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodePlatformFrameworks.cmake @@ -0,0 +1,8 @@ +enable_language(C) + +if(NOT XCODE_VERSION VERSION_LESS "5.0") + find_library(XCTEST_LIBRARY XCTest) + if(NOT XCTEST_LIBRARY) + message(FATAL_ERROR "XCTest Framework not found.") + endif() +endif() -- 2.3.0 From gjasny at googlemail.com Sun Feb 22 13:00:12 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 22 Feb 2015 19:00:12 +0100 Subject: [cmake-developers] [PATCH v5 4/4] Add XCTest example to test Frameworks and Cocoa App Bundles In-Reply-To: <1424628012-90060-1-git-send-email-gjasny@googlemail.com> References: <1424628012-90060-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424628012-90060-5-git-send-email-gjasny@googlemail.com> Signed-off-by: Gregor Jasny --- Tests/CMakeLists.txt | 4 + Tests/XCTest/CMakeLists.txt | 58 ++ Tests/XCTest/CocoaExample/AppDelegate.h | 7 + Tests/XCTest/CocoaExample/AppDelegate.m | 18 + Tests/XCTest/CocoaExample/Info.plist | 30 + Tests/XCTest/CocoaExample/MainMenu.xib | 680 +++++++++++++++++++++ Tests/XCTest/CocoaExample/main.m | 5 + Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m | 13 + Tests/XCTest/FrameworkExample/FrameworkExample.c | 6 + Tests/XCTest/FrameworkExample/FrameworkExample.h | 1 + Tests/XCTest/FrameworkExample/Info.plist | 28 + .../FrameworkExampleTests/FrameworkExampleTests.m | 16 + Tests/XCTest/FrameworkExampleTests/Info.plist | 24 + 13 files changed, 890 insertions(+) create mode 100644 Tests/XCTest/CMakeLists.txt create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.h create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.m create mode 100644 Tests/XCTest/CocoaExample/Info.plist create mode 100644 Tests/XCTest/CocoaExample/MainMenu.xib create mode 100644 Tests/XCTest/CocoaExample/main.m create mode 100644 Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.c create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.h create mode 100644 Tests/XCTest/FrameworkExample/Info.plist create mode 100644 Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m create mode 100644 Tests/XCTest/FrameworkExampleTests/Info.plist diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index cb45e79..c605602 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3106,4 +3106,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(NOT CMake_TEST_EXTERNAL_CMAKE) add_subdirectory(CMakeTests) endif() + + if(XCODE_VERSION AND NOT "${XCODE_VERSION}" VERSION_LESS 5) + add_subdirectory(XCTest) + endif() endif() diff --git a/Tests/XCTest/CMakeLists.txt b/Tests/XCTest/CMakeLists.txt new file mode 100644 index 0000000..b866486 --- /dev/null +++ b/Tests/XCTest/CMakeLists.txt @@ -0,0 +1,58 @@ +set(CMAKE_SKIP_RPATH OFF) + +include(XCTestUtilities) + +# Framework + +add_library(FrameworkExample SHARED + FrameworkExample/FrameworkExample.c + FrameworkExample/FrameworkExample.h + FrameworkExample/Info.plist) + +target_include_directories(FrameworkExample PUBLIC .) + +set_target_properties(FrameworkExample PROPERTIES + FRAMEWORK TRUE + VERSION "1.0.0" + SOVERSION "1.0.0" + FRAMEWORK_VERSION "A" + MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/FrameworkExample/Info.plist + PUBLIC_HEADER FrameworkExample/FrameworkExample.h) + +# XCTest for Framework + +add_xctest(FrameworkExampleTests FrameworkExample + FrameworkExampleTests/FrameworkExampleTests.m + FrameworkExampleTests/Info.plist) + +set_target_properties(FrameworkExampleTests PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/FrameworkExampleTests/Info.plist + ) + +add_test_xctest(XCTest.FrameworkExample FrameworkExampleTests) + +# Cocoa App Bundle + +add_executable(CocoaExample MACOSX_BUNDLE + CocoaExample/main.m + CocoaExample/AppDelegate.m + CocoaExample/AppDelegate.h + CocoaExample/MainMenu.xib +) + +find_library(FOUNDATION_LIBRARY Foundation) +find_library(APPKIT_LIBRARY AppKit) +mark_as_advanced(FOUNDATION_LIBRARY APPKIT_LIBRARY) + +target_link_libraries(CocoaExample PRIVATE ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY}) + +set_target_properties(CocoaExample PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/CocoaExample/Info.plist + RESOURCE "CocoaExample/MainMenu.xib") + +# XCTest for Cocoa App Bundle + +add_xctest(CocoaExampleTests CocoaExample + CocoaExampleTests/CocoaExampleTests.m) + +add_test_xctest(XCTest.CocoaExample CocoaExampleTests) diff --git a/Tests/XCTest/CocoaExample/AppDelegate.h b/Tests/XCTest/CocoaExample/AppDelegate.h new file mode 100644 index 0000000..69b6e0f --- /dev/null +++ b/Tests/XCTest/CocoaExample/AppDelegate.h @@ -0,0 +1,7 @@ +#import + + at interface AppDelegate : NSObject + + + at end + diff --git a/Tests/XCTest/CocoaExample/AppDelegate.m b/Tests/XCTest/CocoaExample/AppDelegate.m new file mode 100644 index 0000000..07af62f --- /dev/null +++ b/Tests/XCTest/CocoaExample/AppDelegate.m @@ -0,0 +1,18 @@ +#import "AppDelegate.h" + + at interface AppDelegate () + + at property (assign) IBOutlet NSWindow *window; + at end + + at implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application +} + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + + at end diff --git a/Tests/XCTest/CocoaExample/Info.plist b/Tests/XCTest/CocoaExample/Info.plist new file mode 100644 index 0000000..5267c63 --- /dev/null +++ b/Tests/XCTest/CocoaExample/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + CocoaExample + CFBundleIconFile + + CFBundleIdentifier + org.cmake.CocoaExample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + CocoaExample + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/Tests/XCTest/CocoaExample/MainMenu.xib b/Tests/XCTest/CocoaExample/MainMenu.xib new file mode 100644 index 0000000..9498a0a --- /dev/null +++ b/Tests/XCTest/CocoaExample/MainMenu.xib @@ -0,0 +1,680 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/XCTest/CocoaExample/main.m b/Tests/XCTest/CocoaExample/main.m new file mode 100644 index 0000000..8a6799b --- /dev/null +++ b/Tests/XCTest/CocoaExample/main.m @@ -0,0 +1,5 @@ +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m b/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m new file mode 100644 index 0000000..70d61d6 --- /dev/null +++ b/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m @@ -0,0 +1,13 @@ +#import + + at interface CocoaExampleTests : XCTestCase + + at end + + at implementation CocoaExampleTests + +- (void)testExample { + XCTAssert(YES, @"Pass"); +} + + at end diff --git a/Tests/XCTest/FrameworkExample/FrameworkExample.c b/Tests/XCTest/FrameworkExample/FrameworkExample.c new file mode 100644 index 0000000..2da78da --- /dev/null +++ b/Tests/XCTest/FrameworkExample/FrameworkExample.c @@ -0,0 +1,6 @@ +#include "FrameworkExample.h" + +int FourtyTwo() +{ + return 42; +} diff --git a/Tests/XCTest/FrameworkExample/FrameworkExample.h b/Tests/XCTest/FrameworkExample/FrameworkExample.h new file mode 100644 index 0000000..2e0b499 --- /dev/null +++ b/Tests/XCTest/FrameworkExample/FrameworkExample.h @@ -0,0 +1 @@ +int FourtyTwo(); diff --git a/Tests/XCTest/FrameworkExample/Info.plist b/Tests/XCTest/FrameworkExample/Info.plist new file mode 100644 index 0000000..a22acea --- /dev/null +++ b/Tests/XCTest/FrameworkExample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + FrameworkExample + CFBundleIdentifier + org.cmake.FrameworkExample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + FrameworkExample + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + + NSHumanReadableCopyright + + NSPrincipalClass + + + diff --git a/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m b/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m new file mode 100644 index 0000000..7cba23e --- /dev/null +++ b/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m @@ -0,0 +1,16 @@ +#import + +#import "FrameworkExample/FrameworkExample.h" + + at interface FrameworkExampleTests : XCTestCase + + at end + + at implementation FrameworkExampleTests + +- (void)testFourtyTwo { + // This is an example of a functional test case. + XCTAssertEqual(42, FourtyTwo()); +} + + at end diff --git a/Tests/XCTest/FrameworkExampleTests/Info.plist b/Tests/XCTest/FrameworkExampleTests/Info.plist new file mode 100644 index 0000000..293921b --- /dev/null +++ b/Tests/XCTest/FrameworkExampleTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + FrameworkExampleTests + CFBundleIdentifier + org.cmake.FrameworkExampleTests + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + FrameworkExampleTests + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + -- 2.3.0 From steveire at gmail.com Sun Feb 22 13:21:44 2015 From: steveire at gmail.com (Stephen Kelly) Date: Sun, 22 Feb 2015 19:21:44 +0100 Subject: [cmake-developers] COMPILE_LANGUAGE generator expression Message-ID: Regarding http://public.kitware.com/Bug/view.php?id=14857 I have implemented a COMPILE_LANGUAGE generator expression, to revisit the conclusion of this thread: http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/6844/focus=6875 I've pushed a branch to my clone as target-language-genex: https://gitorious.org/cmake/steveires-cmake/commits/target-language-genex The design is to allow COMPILE_LANGUAGE in compilation properties (compile options, compile defintions, include directories), and in the generator expressions of file(GENERATE). The problem remains that the IDE generator features may not be compatible with this design. Is there any updated knowledge since http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/6844/focus=6855 I saw commit 06e527b3 (Merge topic 'xcode-flags-per-language', 2015-02-10) go in recently, but I don't know if it relates to this. Even if the issue can be solved for compile options and compile definitions, it seems that for the IDEs, include directories may pose greater problems because there is no way to keep one list for that, while also allowing the context to be compile language dependent? Thanks, Steve. From gjasny at googlemail.com Sun Feb 22 15:06:27 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 22 Feb 2015 21:06:27 +0100 Subject: [cmake-developers] [PATCH] Print feature infos only once Message-ID: <1424635587-98546-1-git-send-email-gjasny@googlemail.com> If a feature is added multiple times via ADD_FEATURE_INFO it should appear only once in FEATURE_SUMMARY. Signed-off-by: Gregor Jasny --- Modules/FeatureSummary.cmake | 3 +++ Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce-stdout.txt | 4 ++++ Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce.cmake | 8 ++++++++ Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake | 1 + 4 files changed, 16 insertions(+) create mode 100644 Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce-stdout.txt create mode 100644 Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce.cmake diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index 3eea9db..ce5a4ed 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -379,6 +379,9 @@ function(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet) set(_currentFeatureText "") get_property(_EnabledFeatures GLOBAL PROPERTY ${_property}) + if(_EnabledFeatures) + list(REMOVE_DUPLICATES _EnabledFeatures) + endif(_EnabledFeatures) foreach(_currentFeature ${_EnabledFeatures}) diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce-stdout.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce-stdout.txt new file mode 100644 index 0000000..ea1cf60 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce-stdout.txt @@ -0,0 +1,4 @@ +-- + \* Foo , Foo decscription\. + +-- \ No newline at end of file diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce.cmake b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce.cmake new file mode 100644 index 0000000..545fb92 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce.cmake @@ -0,0 +1,8 @@ +include(FeatureSummary) + +set(WITH_FOO 1) + +add_feature_info(Foo WITH_FOO "Foo decscription.") +add_feature_info(Foo WITH_FOO "Foo decscription.") + +feature_summary(WHAT ENABLED_FEATURES) diff --git a/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake b/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake index 1417338..6a5fc28 100644 --- a/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake +++ b/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake @@ -6,3 +6,4 @@ run_cmake(FeatureSummaryWhatSingleUnknown) run_cmake(FeatureSummaryWhatList) run_cmake(FeatureSummaryWhatListUnknown) run_cmake(FeatureSummaryWhatListAll) +run_cmake(FeatureSummaryWhatOnce) -- 2.3.0 From meissner at suse.de Mon Feb 23 04:51:42 2015 From: meissner at suse.de (Marcus Meissner) Date: Mon, 23 Feb 2015 10:51:42 +0100 Subject: [cmake-developers] patch to fix PIE binary detection for newer file Message-ID: <20150223095142.GE7875@suse.de> Hi, This patch detects PIE binaries with newer file (5.22), as it no longer prints (uses shared libraries) file 5.19 # file /usr/bin/su /usr/bin/su: setuid ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.0.0, BuildID[sha1]=c22b7c2ca90323d07e30d742e97c08bb98313d8a, stripped file 5.22 # file /usr/bin/su /usr/bin/su: setuid ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.0.0, BuildID[sha1]=030ed4b9e0129d19842cd0e3cbebbc614417d748, stripped Ciao, Marcus -------------- next part -------------- A non-text attachment was scrubbed... Name: cmake-fix-pie-binaries.patch Type: text/x-patch Size: 666 bytes Desc: not available URL: From nilsgladitz at gmail.com Mon Feb 23 07:52:26 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 23 Feb 2015 13:52:26 +0100 Subject: [cmake-developers] CTestCoverageCollectGCOV and ctest_submit(CDASH_UPLOAD) Message-ID: <54EB228A.8030601@gmail.com> Hi, I saw ctest_submit(CDASH_UPLOAD)signature and the CTestCoverageCollectGCOV module being added to CMake. I was wondering how these differ in functionality from the old ctest_coverage() and ctest_upload(FILES). Specifically I couldn't tell from the existing documentation what new use cases or features the new implementations support. Nils From brad.king at kitware.com Mon Feb 23 09:47:06 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 23 Feb 2015 09:47:06 -0500 Subject: [cmake-developers] CTestCoverageCollectGCOV and ctest_submit(CDASH_UPLOAD) In-Reply-To: <54EB228A.8030601@gmail.com> References: <54EB228A.8030601@gmail.com> Message-ID: <54EB3D6A.1080708@kitware.com> On 02/23/2015 07:52 AM, Nils Gladitz wrote: > I was wondering how these differ in functionality from the old > ctest_coverage() and ctest_upload(FILES). > > Specifically I couldn't tell from the existing documentation what new > use cases or features the new implementations support. Currently it is just a different implementation of the same use cases. However, logic for processing the gcov output moves from CTest to CDash. The ctest_submit(CDASH_UPLOAD) command doesn't just upload files, it contacts a new CDash API to send files with (json) metadata. Over time this will allow more coverage types to be added without having to modify CTest, and CDash will be able to process tool-specific coverage output and display it in a custom manner. Previously CTest had to mangle the output of various tools into the Coverage.xml format that CDash expects. -Brad From nilsgladitz at gmail.com Mon Feb 23 10:02:27 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 23 Feb 2015 16:02:27 +0100 Subject: [cmake-developers] CTestCoverageCollectGCOV and ctest_submit(CDASH_UPLOAD) In-Reply-To: <54EB3D6A.1080708@kitware.com> References: <54EB228A.8030601@gmail.com> <54EB3D6A.1080708@kitware.com> Message-ID: <54EB4103.2000403@gmail.com> On 02/23/2015 03:47 PM, Brad King wrote: > On 02/23/2015 07:52 AM, Nils Gladitz wrote: >> I was wondering how these differ in functionality from the old >> ctest_coverage() and ctest_upload(FILES). >> >> Specifically I couldn't tell from the existing documentation what new >> use cases or features the new implementations support. > > Currently it is just a different implementation of the same use cases. > However, logic for processing the gcov output moves from CTest to CDash. > The ctest_submit(CDASH_UPLOAD) command doesn't just upload files, it > contacts a new CDash API to send files with (json) metadata. Over > time this will allow more coverage types to be added without having to > modify CTest, and CDash will be able to process tool-specific coverage > output and display it in a custom manner. Previously CTest had to > mangle the output of various tools into the Coverage.xml format that > CDash expects. I see. Thanks! Nils From ben.boeckel at kitware.com Mon Feb 23 10:10:44 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 23 Feb 2015 10:10:44 -0500 Subject: [cmake-developers] CTestCoverageCollectGCOV and ctest_submit(CDASH_UPLOAD) In-Reply-To: <54EB3D6A.1080708@kitware.com> References: <54EB228A.8030601@gmail.com> <54EB3D6A.1080708@kitware.com> Message-ID: <20150223151044.GA26276@megas.kitwarein.com> On Mon, Feb 23, 2015 at 09:47:06 -0500, Brad King wrote: > Currently it is just a different implementation of the same use cases. > However, logic for processing the gcov output moves from CTest to CDash. > The ctest_submit(CDASH_UPLOAD) command doesn't just upload files, it > contacts a new CDash API to send files with (json) metadata. Over > time this will allow more coverage types to be added without having to > modify CTest, and CDash will be able to process tool-specific coverage > output and display it in a custom manner. Previously CTest had to > mangle the output of various tools into the Coverage.xml format that > CDash expects. It also means that if there's additional data in the coverage (e.g., branch coverage), it isn't stripped when it goes through CTest's coverage format. --Ben From Robert.Goulet at autodesk.com Mon Feb 23 10:13:49 2015 From: Robert.Goulet at autodesk.com (Robert Goulet) Date: Mon, 23 Feb 2015 15:13:49 +0000 Subject: [cmake-developers] cmake install command expected performance? Message-ID: Hi all, I'm running into an issue were using the CMake install command to copy a directory with over 5000+ files (slightly over 1GB of data) takes a lot more time than doing a simple copy. On an SSD drive it takes 0.2 seconds to copy, while it takes about 56+ seconds for CMake to do the same thing using the install command. Why is there so much a big difference? Is this intended for some reasons or could there be a bug? Thanks! Robert Goulet Senior Software Developer Games Solutions Group Autodesk Media & Entertainment MAIN +1 514 393 1616 DIRECT +1 514 954 3911 MOBILE +1 438 397 4075 Autodesk, Inc. 10 Rue Duke Montreal, QC, H3C 2L7 www.autodesk.com [Description: Email_Signature_Logobar] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 14277 bytes Desc: image001.jpg URL: From bill.hoffman at kitware.com Mon Feb 23 10:17:18 2015 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Mon, 23 Feb 2015 10:17:18 -0500 Subject: [cmake-developers] CTestCoverageCollectGCOV and ctest_submit(CDASH_UPLOAD) In-Reply-To: <54EB3D6A.1080708@kitware.com> References: <54EB228A.8030601@gmail.com> <54EB3D6A.1080708@kitware.com> Message-ID: <54EB447E.7040104@kitware.com> On 2/23/2015 9:47 AM, Brad King wrote: >> Specifically I couldn't tell from the existing documentation what new >> >use cases or features the new implementations support. > Currently it is just a different implementation of the same use cases. > However, logic for processing the gcov output moves from CTest to CDash. > The ctest_submit(CDASH_UPLOAD) command doesn't just upload files, it > contacts a new CDash API to send files with (json) metadata. Over > time this will allow more coverage types to be added without having to > modify CTest, and CDash will be able to process tool-specific coverage > output and display it in a custom manner. Previously CTest had to > mangle the output of various tools into the Coverage.xml format that > CDash expects. In addition, this feature now allows gcov branch coverage to be displayed on CDash (although you need a very recent CDash for that). The current CTest coverage support does not handle branch coverage. -Bill From nilsgladitz at gmail.com Mon Feb 23 10:37:11 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 23 Feb 2015 16:37:11 +0100 Subject: [cmake-developers] cmake install command expected performance? In-Reply-To: References: Message-ID: <54EB4927.709@gmail.com> On 02/23/2015 04:13 PM, Robert Goulet wrote: > I?m running into an issue were using the CMake install command to copy a > directory with over 5000+ files (slightly over 1GB of data) takes a lot > more time than doing a simple copy. On an SSD drive it takes 0.2 seconds > to copy, while it takes about 56+ seconds for CMake to do the same thing > using the install command. Why is there so much a big difference? Is > this intended for some reasons or could there be a bug? Thanks! Did you run the manual copy right after the cmake install? (e.g. could files still have been in the system's disk cache?). Both a manual copy and a cmake install might omit copying if the source isn't newer than the destination file; did you perform both with the destination files missing? Nils From brad.king at kitware.com Mon Feb 23 11:05:31 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 23 Feb 2015 11:05:31 -0500 Subject: [cmake-developers] [PATCH 0/3] CPACK_RPM_PACKAGE_ARCHITECTURE In-Reply-To: References: Message-ID: <54EB4FCB.5080902@kitware.com> On 02/21/2015 09:39 AM, Domen Vrankar wrote: > 2015-02-19 9:01 GMT+01:00 Joshua A Clayton : >> This patch series extends CPackRPM to support cross-built rpms >> Previously only native and "noarch" rpms were possible. >> Other architecture choices resulted in an error from rpmbuild. >> Also included at no extra charge, is component support through >> CPACK_RPM__PACKAGE_ARCHITECTURE, and unit tests for >> component architecture. > > Applied with minor tweaks to next: > http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=43fab4ca I backported the tweaks into the original patch series and revised the topic as separate commits: CPackRPM: Fix CPACK_RPM_PACKAGE_ARCHITECTURE http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=761562fe CPackRPM: Support rpm architecture in components http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3aa9f89d Tests: CpackRPM test component architecture http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f174b919 -Brad From Robert.Goulet at autodesk.com Mon Feb 23 11:10:19 2015 From: Robert.Goulet at autodesk.com (Robert Goulet) Date: Mon, 23 Feb 2015 16:10:19 +0000 Subject: [cmake-developers] cmake install command expected performance? In-Reply-To: <54EB4927.709@gmail.com> References: <54EB4927.709@gmail.com> Message-ID: We deleted the destination folder every time we did a test. And it's an SSD drive, I don't think having files in cache would be the issue. When files are already there it still takes 30+ seconds for cmake to "not" copy the files. -----Original Message----- From: Nils Gladitz [mailto:nilsgladitz at gmail.com] Sent: Monday, February 23, 2015 10:37 AM To: Robert Goulet; cmake-developers at cmake.org Subject: Re: [cmake-developers] cmake install command expected performance? On 02/23/2015 04:13 PM, Robert Goulet wrote: > I'm running into an issue were using the CMake install command to copy > a directory with over 5000+ files (slightly over 1GB of data) takes a > lot more time than doing a simple copy. On an SSD drive it takes 0.2 > seconds to copy, while it takes about 56+ seconds for CMake to do the > same thing using the install command. Why is there so much a big > difference? Is this intended for some reasons or could there be a bug? Thanks! Did you run the manual copy right after the cmake install? (e.g. could files still have been in the system's disk cache?). Both a manual copy and a cmake install might omit copying if the source isn't newer than the destination file; did you perform both with the destination files missing? Nils From brad.king at kitware.com Mon Feb 23 11:40:04 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 23 Feb 2015 11:40:04 -0500 Subject: [cmake-developers] [PATCH] Print feature infos only once In-Reply-To: <1424635587-98546-1-git-send-email-gjasny@googlemail.com> References: <1424635587-98546-1-git-send-email-gjasny@googlemail.com> Message-ID: <54EB57E4.5040109@kitware.com> On 02/22/2015 03:06 PM, Gregor Jasny wrote: > If a feature is added multiple times via ADD_FEATURE_INFO it > should appear only once in FEATURE_SUMMARY. Thanks. Applied with minor tweaks: FeatureSummary: Print each feature info only once http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38ef2b73 -Brad From Geoffrey.Viola at asirobots.com Mon Feb 23 11:44:37 2015 From: Geoffrey.Viola at asirobots.com (Geoffrey Viola) Date: Mon, 23 Feb 2015 16:44:37 +0000 Subject: [cmake-developers] FW: Initial Attempt at Green Hill MULTI IDE Generator Support References: <0543633b28c7431f93808182fc1e26e1@CO1PR07MB208.namprd07.prod.outlook.com> <543D2BBC.1010306@kitware.com> <0b5b33c4d1f0472782e260f9e5bce980@CO1PR07MB208.namprd07.prod.outlook.com> <544E4C9F.3050408@kitware.com> <64abd7ba273245b686146aa67acb7e8a@DM2PR0701MB1020.namprd07.prod.outlook.com> <545A7C44.6040305@kitware.com> <5474E132.2010705@kitware.com> <54D129E3.60101@kitware.com> <54E365F4.3030104@kitware.com> <54E7542D.6050808@kitware.com> Message-ID: >> Please add to your dashboard scripts a line like: >> >> set(ENV{PATH} ...) >> >> to set a path without python in it for running this dashboard. >... >>> Also, I haven't debugged the warnings in the Build row yet. >> >> That may be due to the lack of a fresh build tree: >> >> #CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY}) > >I'll give it a try this weekend. I added "set(ENV{PATH})" to clear my path in both the experimental and nightly builds. That seems to have fixed some of my issues. I have my experimental build passing: https://open.cdash.org/viewTest.php?onlypassed&buildid=3704247. My nightly build passes 50% of the time. Here's it passing https://open.cdash.org/viewTest.php?onlypassed&buildid=3704273. Here's it failing https://open.cdash.org/buildSummary.php?buildid=3706323. I'm still debugging the sporadic test failures for the nightly build. The computer might be lacking resources. Geoffrey Viola SOFTWARE ENGINEER asirobots.com -----Original Message----- From: Geoffrey Viola Sent: Friday, February 20, 2015 8:56 AM To: 'Brad King' Cc: cmake-developers at cmake.org Subject: RE: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support >> But I still get the "CMake.GetPrerequisites" test timing out. > > I don't see that in: > > https://open.cdash.org/buildSummary.php?buildid=3701966 You're right. For some reason it is not timing out. It just takes a really long time. I wonder if my path is long. That test takes an order of magnitude longer on my machine than the rest: https://open.cdash.org/testSummary.php?project=1&name=CMake.GetPrerequisites&date=2015-02-19. > Please add to your dashboard scripts a line like: > > set(ENV{PATH} ...) > > to set a path without python in it for running this dashboard. ... >> Also, I haven't debugged the warnings in the Build row yet. > > That may be due to the lack of a fresh build tree: > > #CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY}) I'll give it a try this weekend. Geoffrey Viola SOFTWARE ENGINEER asirobots.com -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Friday, February 20, 2015 8:35 AM To: Geoffrey Viola Cc: cmake-developers at cmake.org Subject: Re: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support On 02/19/2015 07:44 PM, Geoffrey Viola wrote: > The nightly build that I use does use the "cmake_common.cmake" script > to grab the latest code, build, test it, etc. Here's what my nightly > build results look like: https://open.cdash.org/buildSummary.php?buildid=3701008. Sorry, I mixed up your nightly build and the experimental build you linked. > I made that small change in the attached patch. > I ran another experimental build in debug. Here are those results: > https://open.cdash.org/buildSummary.php?buildid=3701457. Thanks. > I expected the "CMakeOnly.MajorVersionSelection-PythonInterp_2" to > fail because I have the Python 3.3 executable in my path. Please add to your dashboard scripts a line like: set(ENV{PATH} ...) to set a path without python in it for running this dashboard. That will avoid the problem, which is a separate discussion to address. (The test is covering that the requested major version is preferred if executables called "python2" and "python3" are both in the path, but if just "python" is available then it is used.) > But I still get the "CMake.GetPrerequisites" test timing out. I don't see that in: https://open.cdash.org/buildSummary.php?buildid=3701966 > Also, I haven't debugged the warnings in the Build row yet. That may be due to the lack of a fresh build tree: #CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY}) > This suit of tests was done using a script based on the autogenerated > "CTestScript.cmake" script. I don't think CDash has been configured to generate those for CMake properly. Once you have the nightly dashboard submission running cleanly then we can look at merging your generator for testing in 'next' to have it covered there. -Brad This message contains confidential information and is intended only for the recipient. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately if you have received this e-mail by mistake and delete this e-mail from your system. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From brad.king at kitware.com Mon Feb 23 11:51:12 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 23 Feb 2015 11:51:12 -0500 Subject: [cmake-developers] patch to fix PIE binary detection for newer file In-Reply-To: <20150223095142.GE7875@suse.de> References: <20150223095142.GE7875@suse.de> Message-ID: <54EB5A80.6070704@kitware.com> On 02/23/2015 04:51 AM, Marcus Meissner wrote: > This patch detects PIE binaries with newer file (5.22), as > it no longer prints (uses shared libraries) Thanks, applied with minor tweaks: GetPrerequisites: Update output matching for newer 'file' versions http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe558718 -Brad From brad.king at kitware.com Mon Feb 23 12:52:08 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 23 Feb 2015 12:52:08 -0500 Subject: [cmake-developers] FW: Initial Attempt at Green Hill MULTI IDE Generator Support In-Reply-To: References: <0543633b28c7431f93808182fc1e26e1@CO1PR07MB208.namprd07.prod.outlook.com> <543D2BBC.1010306@kitware.com> <0b5b33c4d1f0472782e260f9e5bce980@CO1PR07MB208.namprd07.prod.outlook.com> <544E4C9F.3050408@kitware.com> <64abd7ba273245b686146aa67acb7e8a@DM2PR0701MB1020.namprd07.prod.outlook.com> <545A7C44.6040305@kitware.com> <5474E132.2010705@kitware.com> <54D129E3.60101@kitware.com> <54E365F4.3030104@kitware.com> <54E7542D.6050808@kitware.com> Message-ID: <54EB68C8.7030504@kitware.com> On 02/23/2015 11:44 AM, Geoffrey Viola wrote: > I added "set(ENV{PATH})" to clear my path Good, I'm glad that helped. However, I'm surprised a completely empty path works. Typically I at least include the Windows system directories: set(ENV{PATH} "c:\\Windows\\system32;c:\\Windows") Please also add: set(dashboard_cache " CMake_TEST_GreenHillsMULTI:BOOL=ON ") to the nightly script so that the tests will run once we integrate them into 'next' for testing. > My nightly build passes 50% of the time. Many of our nightly test machines have sporadic failures of a few tests due to locally transient conditions or races in the native tools. We've learned to tolerate them. Don't worry about those. Thanks, -Brad From brad.king at kitware.com Mon Feb 23 12:54:18 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 23 Feb 2015 12:54:18 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <06983E90-D75E-4335-8D02-1D40DF89B9C2@free.fr> References: <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5F072.3090903@kitware.com> <06983E90-D75E-4335-8D02-1D40DF89B9C2@free.fr> Message-ID: <54EB694A.9030605@kitware.com> Hi Raffi, Your matlab-enabled nightly builds have been clean for a few days on all the platforms. I've moved them to the "Nightly Expected" section of the dashboard. Now I'm just waiting on your next updates to the module based on my comments elsewhere in this thread to proceed with the FindMatlab topic. Thanks, -Brad From brad.king at kitware.com Mon Feb 23 12:55:17 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 23 Feb 2015 12:55:17 -0500 Subject: [cmake-developers] KWSys patches In-Reply-To: References: <54E20763.2070306@kitware.com> <54E24B99.3010709@kitware.com> Message-ID: <54EB6985.6020200@kitware.com> On 02/21/2015 04:33 PM, Domen Vrankar wrote: > Attached are patches with fixed patch 3. Thanks. I'll start with the SystemTools change which I've split out into its own commit and pushed here: http://review.source.kitware.com/#/c/19304/ -Brad From Geoffrey.Viola at asirobots.com Mon Feb 23 13:10:35 2015 From: Geoffrey.Viola at asirobots.com (Geoffrey Viola) Date: Mon, 23 Feb 2015 18:10:35 +0000 Subject: [cmake-developers] FW: Initial Attempt at Green Hill MULTI IDE Generator Support In-Reply-To: <54EB68C8.7030504@kitware.com> References: <0543633b28c7431f93808182fc1e26e1@CO1PR07MB208.namprd07.prod.outlook.com> <543D2BBC.1010306@kitware.com> <0b5b33c4d1f0472782e260f9e5bce980@CO1PR07MB208.namprd07.prod.outlook.com> <544E4C9F.3050408@kitware.com> <64abd7ba273245b686146aa67acb7e8a@DM2PR0701MB1020.namprd07.prod.outlook.com> <545A7C44.6040305@kitware.com> <5474E132.2010705@kitware.com> <54D129E3.60101@kitware.com> <54E365F4.3030104@kitware.com> <54E7542D.6050808@kitware.com> <54EB68C8.7030504@kitware.com> Message-ID: >Please also add: > > set(dashboard_cache " > CMake_TEST_GreenHillsMULTI:BOOL=ON > ") > >to the nightly script so that the tests will run once we integrate them into 'next' for testing. That line has been added to the nightly script. It might be interesting to note that in the experimental build I manually rewrite the CMakeCache, because it does not use the "write_cache" macro found in cmake_common.cmake. Here is what works for that script: file(READ "${CMAKE_CACHE_FILENAME}" localCache) if (NOT "${localCache}" MATCHES ".*CMake_TEST_GreenHillsMULTI.*") file(APPEND "${CMAKE_CACHE_FILENAME}" " CMake_TEST_GreenHillsMULTI:BOOL=ON ") endif() >> My nightly build passes 50% of the time. > >Many of our nightly test machines have sporadic failures of a few tests due to locally transient conditions or races in the native tools. We've learned to tolerate them. Don't worry about those. Sounds good. I reran the tests this morning and they all passed. Geoffrey Viola SOFTWARE ENGINEER asirobots.com -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Monday, February 23, 2015 10:52 AM To: Geoffrey Viola Cc: cmake-developers at cmake.org Subject: Re: FW: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support On 02/23/2015 11:44 AM, Geoffrey Viola wrote: > I added "set(ENV{PATH})" to clear my path Good, I'm glad that helped. However, I'm surprised a completely empty path works. Typically I at least include the Windows system directories: set(ENV{PATH} "c:\\Windows\\system32;c:\\Windows") Please also add: set(dashboard_cache " CMake_TEST_GreenHillsMULTI:BOOL=ON ") to the nightly script so that the tests will run once we integrate them into 'next' for testing. > My nightly build passes 50% of the time. Many of our nightly test machines have sporadic failures of a few tests due to locally transient conditions or races in the native tools. We've learned to tolerate them. Don't worry about those. Thanks, -Brad This message contains confidential information and is intended only for the recipient. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately if you have received this e-mail by mistake and delete this e-mail from your system. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From brad.king at kitware.com Mon Feb 23 13:18:23 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 23 Feb 2015 13:18:23 -0500 Subject: [cmake-developers] [PATCH v5 0/4] Add XCTest Bundles Support In-Reply-To: <1424628012-90060-1-git-send-email-gjasny@googlemail.com> References: <1424628012-90060-1-git-send-email-gjasny@googlemail.com> Message-ID: <54EB6EEF.7030402@kitware.com> On 02/22/2015 01:00 PM, Gregor Jasny wrote: > Changes since v4: > * Added release notes > * Use get_filename_component to sanitize paths > * Moved and wires up XcodePlatformFrameworks test > * Cleaned and wired up XCTest Test. Thanks. I've applied two of the changes with minor tweaks: OS X: Shorten CFBundleExecutable to file name only http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78ec4b16 OS X: Add platform-specific Frameworks search path http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0ee2a004 and merged to 'next' for testing. The main two changes are pretty close but need a couple of tweaks. Once the two above changes are in 'master' please rebase on them. > /module/Use_wxWindows > + /module/XCTestUtilities > /module/WriteBasicConfigVersionFile This is not sorted. X should be after W. > + if(XCODE_VERSION AND NOT "${XCODE_VERSION}" VERSION_LESS 5) > + add_subdirectory(XCTest) > + endif() This wires the test into the build of CMake itself. The other cases nearby that hunk are adding subdirectories that themselves call add_test (directly or otherwise). In the case of XCTest it should be added with ADD_TEST_MACRO or a manual add_test call if necessary. Thanks, -Brad From brad.king at kitware.com Mon Feb 23 13:32:08 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 23 Feb 2015 13:32:08 -0500 Subject: [cmake-developers] [vc12/idl] output directory problem In-Reply-To: References: <54E7553B.9090501@kitware.com> Message-ID: <54EB7228.5020006@kitware.com> On 02/21/2015 07:58 AM, Tim Blechmann wrote: > i'd love to provide a reduced test case, though i can only reproduce > this in a complex real-world buildsystem, with dozens of libraries and > some include_external_msproject / add_dependencies pairs ... [snip] > that said, i wonder: why would it be ok to use a relative path in the > generated project ... or, what would be the disadvantage of using an > absolute path? I don't think that is a problem. I was just hoping to add a test case. At least the existing test case should not be regressed by the change. Applied: VS: Specify absolute output directory for the Midl tool http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b54e836 Thanks, -Brad From ben.boeckel at kitware.com Mon Feb 23 13:44:13 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 23 Feb 2015 13:44:13 -0500 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) Message-ID: <20150223184413.GA2033@megas.kitwarein.com> Hi, I have a branch on my Github fork to support object library linking: object-library-linking https://github.com/mathstuf/CMake/tree/object-library-linking This implements support (rather, remove restrictions) for the following: target_link_libraries(lib objlib) target_link_libraries(objlib lib) target_link_libraries(objlib1 objlib2) The test cases are kind of rudimentary (makes sure it is allowed, symbols exist, and that usage requirements work), so any other cases you can think of would be nice to add to the test suite. There is also a commit which updates usage of $ to not be allowed in IMPORTED targets. This would likely require a policy unless anyone can think of a use case for allowing it (or just do "no worse" than previous versions and just let it be). What it does *not* do is set INTERFACE_SOURCES to $ for object libraries because to do so would mean that the objects would get compiled into each library which requires it. I thought about denying INTERFACE_SOURCES to objlibs altogether but decided against it since the same thing can be done with other libraries anyways. I think the real solution to this is to make INTERFACE_SOURCES not transitive and only apply for direct usage through target_link_libraries (and punt for now on "diamond inheritence" of INTERFACE_SOURCES). Here's the commit message I wrote when initially blocking INTERFACE_SOURCES from objlibs: INTERFACE_SOURCES is a special beast anyways in that the following setup is likely to cause duplicate symbols: add_library(a INTERFACE) target_sources(a INTERFACE sym1.c) target_include_directories(a INTERFACE some/path/for/sym1) target_compile_definitions(a INTERFACE CLIENT_DEFINE) add_library(b SHARED shared.c) target_link_libraries(b PUBLIC a) # Needs CLIENT_DEFINE and to # propagate the include add_executable(exe main.c) target_link_libraries(exe b) Here, sym1.c is compiled as part of 'b' and 'exe'. Issues arise when a either has global statics within the source file (ld-linux.so will construct it once, but try to destroy it twice), exports symbols (multiple definitions), etc. This is especially prone to abuse with OBJECT libraries, so block its usage. The real fix is to make INTERFACE_SOURCES only applicable when directly linked and not transitive, but that is a bigger change. A workaround for now could be to do: add_library(objlib OBJECT) add_library(objlib-srcs INTERFACE) target_sources(objlib-srcs INTERFACE $) add_library(a) target_link_libraries(a PUBLIC objlib PRIVATE objlib-srcs) but that is a little messy (though at least a bit cleaner than $ repetition everywhere). --Ben From brad.king at kitware.com Mon Feb 23 14:06:05 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 23 Feb 2015 14:06:05 -0500 Subject: [cmake-developers] COMPILE_LANGUAGE generator expression In-Reply-To: References: Message-ID: <54EB7A1D.9010208@kitware.com> On 02/22/2015 01:21 PM, Stephen Kelly wrote: > Is there any updated knowledge since > > http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/6844/focus=6855 AFAICT nothing has changed, except: > I saw commit 06e527b3 (Merge topic 'xcode-flags-per-language', 2015-02-10) > go in recently, but I don't know if it relates to this. That allows OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS to be populated separately regardless of the linker language used in the target. The restriction had been due to our implementation and the fix should work for all versions of Xcode. With the fix we can now generate per-target/per-config/per-language flags for Xcode. We still cannot generate per-source/per-config flags though, except perhaps by generating a wrapper $src-$config.$lang source file that #include-s the original source and can then have its own reference in Xcode. However, I don't think we need that for $ in target-wide locations. > Even if the issue can be solved for compile options and compile definitions, > it seems that for the IDEs, include directories may pose greater problems > because there is no way to keep one list for that, while also allowing the > context to be compile language dependent? For Xcode and VS < 10 that will remain a problem. There is only only one place to put preprocessor settings for each target/config pair. They are not language-specific. However, in VS >= 10 each source-specific property value must explicitly reference the target-wide value to not be totally overridden. This means generating all the properties for every source file separately would allow lang-specific things in those generators. However, an additional cost is that msbuild will no longer be able to group many source files into a single invocation of the compiler, so builds will be slower. This would have to be done on an as-needed basis, and the associated tracking may make the generator more complex. I'm also not sure it will work for all settings. Rather than trying to hack something for VS >= 10 I think we should just make it behave however we decide for the other IDEs. We need to define some kind of behavior. Perhaps evaluating w.r.t. the link language is a reasonable default. We could also provide a target property that can be used to specify which language to choose. -Brad From mantis at public.kitware.com Mon Feb 23 14:35:52 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Mon, 23 Feb 2015 14:35:52 -0500 Subject: [cmake-developers] [CMake 0015415]: Linking a static library to an interface library -> no such library when used outside Message-ID: <15ee77b52a0cef0bf8291204e14420bd@www.cmake.org> The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15415 ====================================================================== Reported By: Ben Boeckel Assigned To: Stephen Kelly ====================================================================== Project: CMake Issue ID: 15415 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: assigned Target Version: CMake 3.3 ====================================================================== Date Submitted: 2015-02-23 14:35 EST Last Modified: 2015-02-23 14:35 EST ====================================================================== Summary: Linking a static library to an interface library -> no such library when used outside Description: First, there is no error with the following: add_library(a INTERFACE) add_library(b STATIC) target_link_libraries(b PRIVATE a) install(TARGETS b EXPORT foo) which generates set_target_properties(b PROPERTIES INTERFACE_LINK_LIBRARIES "$") in the targets file which causes users of b to not be able to find 'a'. However, I would like for 'a' to just not show up at all in the export file (which I think makes sense for INTERFACE libraries linked to via PRIVATE). ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-23 14:35 Ben Boeckel New Issue 2015-02-23 14:35 Ben Boeckel Status new => assigned 2015-02-23 14:35 Ben Boeckel Assigned To => Stephen Kelly ====================================================================== From steveire at gmail.com Mon Feb 23 15:05:01 2015 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 23 Feb 2015 21:05:01 +0100 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) References: <20150223184413.GA2033@megas.kitwarein.com> Message-ID: Ben Boeckel wrote: > Hi, > > I have a branch on my Github fork to support object library linking: > > object-library-linking > https://github.com/mathstuf/CMake/tree/object-library-linking > Thanks for working on this. > There is also a commit which updates usage of $ to not > be allowed in IMPORTED targets. This would likely require a policy > unless anyone can think of a use case for allowing it (or just do "no > worse" than previous versions and just let it be). Is there a reason to disallow that? We might guess it will be possible to install object libraries in the future. > add_library(a INTERFACE) > target_sources(a INTERFACE sym1.c) > target_include_directories(a INTERFACE some/path/for/sym1) > target_compile_definitions(a INTERFACE CLIENT_DEFINE) > > add_library(b SHARED shared.c) > target_link_libraries(b PUBLIC a) # Needs CLIENT_DEFINE and to > # propagate the include > > add_executable(exe main.c) > target_link_libraries(exe b) Can you imagine a reason for both 'b' and 'exe' need sym1.c? Or do you imagine it to be something that should be only compiled into the shared library or only the executable? In other words - Is the buildsystem description above buggy? I had imagined other cases which were easy to reason about (and probably more common to need) such as: target_sources(a INTERFACE $<$,EXECUTABLE>sym1.c> ) So that it would just 'pass through' any intermediate libraries. > The real fix is to make INTERFACE_SOURCES only applicable when > directly linked and not transitive, but that is a bigger change. Would it make sense to uniq all sources? Or only uniq the ones which come from the link interface? I would prefer to see 'linking to' an object library consume its sources directly without needing to specify the target in both the sources and the target_link_libraries. Thanks, Steve. From steveire at gmail.com Mon Feb 23 15:19:28 2015 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 23 Feb 2015 21:19:28 +0100 Subject: [cmake-developers] COMPILE_LANGUAGE generator expression References: <54EB7A1D.9010208@kitware.com> Message-ID: Brad King wrote: > However, in VS >= 10 each source-specific property value must explicitly > reference the target-wide value to not be totally overridden. This > means generating all the properties for every source file separately > would allow lang-specific things in those generators. However, an > additional cost is that msbuild will no longer be able to group > many source files into a single invocation of the compiler, so builds > will be slower. This would have to be done on an as-needed basis, and > the associated tracking may make the generator more complex. I'm also > not sure it will work for all settings. Is this already the case to handle the COMPILE_FLAGS source file property? > > Rather than trying to hack something for VS >= 10 I think we should just > make it behave however we decide for the other IDEs. We need to define > some kind of behavior. Perhaps evaluating w.r.t. the link language is > a reasonable default. We could also provide a target property that > can be used to specify which language to choose. I'm not fond of the idea of setting the compile language to the link language of the target. It would make this look correct/portable, even though it behaves incorrectly with IDEs: add_executable(foo foo.c foo.cpp main.cpp) target_compile_options(foo PRIVATE $<$,-fno-exceptions> This means that a portable buildsystem which wishes to mix languages will have to do so in separate STATIC or OBJECT libraries, both in the future and now, without the COMPILE_LANGUAGE generator expression: add_library(foo_c STATIC foo.c ) add_library(foo_cxx STATIC foo.cxx ) target_compile_options(foo_cxx PRIVATE -fno-exceptions) add_executable(foo main.cpp) target_link_libraries(foo foo_c foo_cxx) For the convenience of buildsystems which do not target the IDEs, should we allow the use of COMPILE_LANGUAGE? And issue an error if using an IDE generator? Thanks, Steve. From brad.king at kitware.com Mon Feb 23 15:22:12 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 23 Feb 2015 15:22:12 -0500 Subject: [cmake-developers] COMPILE_LANGUAGE generator expression In-Reply-To: References: <54EB7A1D.9010208@kitware.com> Message-ID: <54EB8BF4.8000805@kitware.com> On 02/23/2015 03:19 PM, Stephen Kelly wrote: > Brad King wrote: >> However, in VS >= 10 each source-specific property value must explicitly >> reference the target-wide value to not be totally overridden. > > Is this already the case to handle the COMPILE_FLAGS source file property? Yes. We generate %(AdditionalOptions) into the per-source value to refer to the target-level value. > For the convenience of buildsystems which do not target the IDEs, should we > allow the use of COMPILE_LANGUAGE? And issue an error if using an IDE > generator? That sounds good. We can always define non-error behavior later. -Brad From ben.boeckel at kitware.com Mon Feb 23 19:50:32 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 23 Feb 2015 19:50:32 -0500 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) In-Reply-To: References: <20150223184413.GA2033@megas.kitwarein.com> Message-ID: <20150224005032.GA11905@megas.kitwarein.com> On Mon, Feb 23, 2015 at 21:05:01 +0100, Stephen Kelly wrote: > Is there a reason to disallow that? We might guess it will be possible to > install object libraries in the future. We could also lift the restriction then. I'm fine with just dropping the patch. Basically without it, all it blocks is add_custom_{command,target} from using $?which could be useful for some obscure linker target CMake doesn't understand. So maybe just lifting all such restrictions on $ is the thing to do. > Can you imagine a reason for both 'b' and 'exe' need sym1.c? Or do you > imagine it to be something that should be only compiled into the shared > library or only the executable? In other words - Is the buildsystem > description above buggy? Sure, I *can*, but it's also not how I've used object libraries so far (basically as static libraries I don't need to export). And now I'd like to use usage requirements to make things easier (rather than setting global properties and fetching them from nowhere later in the code). > I had imagined other cases which were easy to reason about (and probably > more common to need) such as: > > target_sources(a INTERFACE > $<$,EXECUTABLE>sym1.c> > ) > > So that it would just 'pass through' any intermediate libraries. That works for that case, but doesn't work when it needs to land in a specific shared or static library (though I suppose STREQUAL + TARGET_NAME could work there too, but that doesn't feel clean to me and also feels like the tail wagging the dog). > > The real fix is to make INTERFACE_SOURCES only applicable when > > directly linked and not transitive, but that is a bigger change. > > Would it make sense to uniq all sources? Or only uniq the ones which come > from the link interface? Well, they'd still be unique at the usage location, but already be linked into some library lower in the depchain (except in the diamond usage scenario where dedup would help at the join part, but not help that there are now 3 copies of symbols around). > I would prefer to see 'linking to' an object library consume its sources > directly without needing to specify the target in both the sources and the > target_link_libraries. I would as well, but with transitive linking, getting duplicate symbols/static variables is way too easy at the moment (and debugging the latter is not always easy if you don't know what you're looking for). If you know what you're doing you can set target_sources on the object library without issue as it is. I just don't think we should throw landmines in front of unsuspecting developers who use this. For the diamond-usage problem, is there some way of utilizing the COMPATIBLE_INTERFACES to deny the mixing of two libraries where each built with an object libraries' objects? Having a property to trigger that would be nice... --Ben From stillcompiling at gmail.com Mon Feb 23 21:28:21 2015 From: stillcompiling at gmail.com (Joshua Clayton) Date: Mon, 23 Feb 2015 18:28:21 -0800 Subject: [cmake-developers] cmake install command expected performance? In-Reply-To: References: <54EB4927.709@gmail.com> Message-ID: On Linux reading the input file would still be cached on subsequent runs even if you remove the destination folder, and writing will always cache unless you have a filesystem mounted with -o sync (that supports sync) Without special effort, only the first time you run will it be reading from actual files on disk. running the sync command immediately afterward can give you an idea how long it took to actually write out the files to media. Not sure how this works on other OS's, but expect it is similar. On Mon, Feb 23, 2015 at 8:10 AM, Robert Goulet wrote: > We deleted the destination folder every time we did a test. And it's an SSD drive, I don't think having files in cache would be the issue. When files are already there it still takes 30+ seconds for cmake to "not" copy the files. > > -----Original Message----- > From: Nils Gladitz [mailto:nilsgladitz at gmail.com] > Sent: Monday, February 23, 2015 10:37 AM > To: Robert Goulet; cmake-developers at cmake.org > Subject: Re: [cmake-developers] cmake install command expected performance? > > On 02/23/2015 04:13 PM, Robert Goulet wrote: >> I'm running into an issue were using the CMake install command to copy >> a directory with over 5000+ files (slightly over 1GB of data) takes a >> lot more time than doing a simple copy. On an SSD drive it takes 0.2 >> seconds to copy, while it takes about 56+ seconds for CMake to do the >> same thing using the install command. Why is there so much a big >> difference? Is this intended for some reasons or could there be a bug? Thanks! > > Did you run the manual copy right after the cmake install? (e.g. could files still have been in the system's disk cache?). > > Both a manual copy and a cmake install might omit copying if the source isn't newer than the destination file; did you perform both with the destination files missing? > > Nils > -- > > 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 From fengliutie at gmail.com Mon Feb 23 23:33:27 2015 From: fengliutie at gmail.com (=?UTF-8?B?5YiY6ZOB5Yia?=) Date: Tue, 24 Feb 2015 12:33:27 +0800 Subject: [cmake-developers] Fwd: CMake Error when configure nanomsg on Windows 8.1 and VS2013 In-Reply-To: References: Message-ID: Hi, could anyone give me help, please? Many thinks I got an error when cmake nanomsg download from *http://download.nanomsg.org/nanomsg-0.5-beta.zip * Here is that cmake says when cmake nanamsg on Windows 8.1 and VS2013: System is unknown to cmake, create: Platform/Windows to use this system, please send your config file to cmake at www.cmake.org so it can be added to cmake Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. Please send that file to cmake at www.cmake.org. CMake Error at D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Modules/CPack.cmake:393 (message): CPack package description file: "D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Templates/CPack.GenericDescription.txt" could not be found. Call Stack (most recent call first): D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Modules/CPack.cmake:397 (cpack_check_file_exists) CMakeLists.txt:133 (include) CMake Error at D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Modules/CPack.cmake:393 (message): CPack license resource file: "D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Templates/CPack.GenericLicense.txt" could not be found. Call Stack (most recent call first): D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Modules/CPack.cmake:398 (cpack_check_file_exists) CMakeLists.txt:133 (include) CMake Error at D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Modules/CPack.cmake:393 (message): CPack readme resource file: "D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Templates/CPack.GenericDescription.txt" could not be found. Call Stack (most recent call first): D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Modules/CPack.cmake:399 (cpack_check_file_exists) CMakeLists.txt:133 (include) CMake Error at D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Modules/CPack.cmake:393 (message): CPack welcome resource file: "D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Templates/CPack.GenericWelcome.txt" could not be found. Call Stack (most recent call first): D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Modules/CPack.cmake:400 (cpack_check_file_exists) CMakeLists.txt:133 (include) CMake Error: File D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Templates/ CPackConfig.cmake.in does not exist. CMake Error at D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Modules/CPack.cmake:598 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:133 (include) CMake Error: File D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Templates/ CPackConfig.cmake.in does not exist. CMake Error at D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2/Modules/CPack.cmake:617 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:133 (include) Configuring incomplete, errors occurred! See also "D:/Program_Files/nanomsg-0.5-beta/CMakeFiles/CMakeOutput.log". -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- # This is the CMakeCache file. # For build in directory: d:/Program_Files/nanomsg-0.5-beta # It was generated by CMake: D:/Program_Files/cmake-3.2.0-rc1-win32-x86/bin/cmake.exe # You can edit this file to change values found and used by cmake. # If you do not want to change any of the values, simply exit the editor. # If you do want to change a value, simply edit, save, and exit the editor. # The syntax for the file is as follows: # KEY:TYPE=VALUE # KEY is the name of a variable in the cache. # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. # VALUE is the current value for the KEY. ######################## # EXTERNAL cache entries ######################## //Choose the type of build, options are: None(CMAKE_CXX_FLAGS or // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. CMAKE_BUILD_TYPE:STRING= //Semicolon separated list of supported configuration types, only // supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything // else will be ignored. CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release //Flags used by the compiler during all build types. CMAKE_C_FLAGS:STRING= //Flags used by the compiler during debug builds. CMAKE_C_FLAGS_DEBUG:STRING= //Flags used by the compiler during release builds for minimum // size. CMAKE_C_FLAGS_MINSIZEREL:STRING= //Flags used by the compiler during release builds. CMAKE_C_FLAGS_RELEASE:STRING= //Flags used by the compiler during release builds with debug info. CMAKE_C_FLAGS_RELWITHDEBINFO:STRING= //Flags used by the linker. CMAKE_EXE_LINKER_FLAGS:STRING= //Flags used by the linker during debug builds. CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= //Flags used by the linker during release minsize builds. CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= //Flags used by the linker during release builds. CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= //Flags used by the linker during Release with Debug Info builds. CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= //Install path prefix, prepended onto install directories. CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/nanomsg //Path to a program. CMAKE_LINKER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/link.exe //Flags used by the linker during the creation of modules. CMAKE_MODULE_LINKER_FLAGS:STRING= //Flags used by the linker during debug builds. CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= //Flags used by the linker during release minsize builds. CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= //Flags used by the linker during release builds. CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= //Flags used by the linker during Release with Debug Info builds. CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= //Value Computed by CMake CMAKE_PROJECT_NAME:STATIC=nanomsg //Flags used by the linker during the creation of dll's. CMAKE_SHARED_LINKER_FLAGS:STRING= //Flags used by the linker during debug builds. CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= //Flags used by the linker during release minsize builds. CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= //Flags used by the linker during release builds. CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= //Flags used by the linker during Release with Debug Info builds. CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= //If set, runtime paths are not added when installing shared libraries, // but are added when building. CMAKE_SKIP_INSTALL_RPATH:BOOL=OFF //If set, runtime paths are not added when using shared libraries. CMAKE_SKIP_RPATH:BOOL=OFF //Flags used by the linker during the creation of static libraries. CMAKE_STATIC_LINKER_FLAGS:STRING= //Flags used by the linker during debug builds. CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= //Flags used by the linker during release minsize builds. CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= //Flags used by the linker during release builds. CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= //Flags used by the linker during Release with Debug Info builds. CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= //If true, cmake will use relative paths in makefiles and projects. CMAKE_USE_RELATIVE_PATHS:BOOL=OFF //If this value is on, makefiles will be generated without the // .SILENT directive, and all commands will be echoed to the console // during the make. This is useful for debugging only. With Visual // Studio IDE projects all commands are done without /nologo. CMAKE_VERBOSE_MAKEFILE:BOOL=OFF //Enable to build 7-Zip source packages CPACK_SOURCE_7Z:BOOL=ON //Enable to build ZIP source packages CPACK_SOURCE_ZIP:BOOL=ON //Value Computed by CMake nanomsg_BINARY_DIR:STATIC=D:/Program_Files/nanomsg-0.5-beta //Dependencies for the target nanomsg_LIB_DEPENDS:STATIC=general;ws2_32;general;Mswsock.lib;general;Advapi32.lib; //Value Computed by CMake nanomsg_SOURCE_DIR:STATIC=D:/Program_Files/nanomsg-0.5-beta ######################## # INTERNAL cache entries ######################## //This is the directory where this CMakeCache.txt was created CMAKE_CACHEFILE_DIR:INTERNAL=d:/Program_Files/nanomsg-0.5-beta //Major version of cmake used to create the current loaded cache CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 //Minor version of cmake used to create the current loaded cache CMAKE_CACHE_MINOR_VERSION:INTERNAL=2 //Patch version of cmake used to create the current loaded cache CMAKE_CACHE_PATCH_VERSION:INTERNAL=0 //Path to CMake executable. CMAKE_COMMAND:INTERNAL=D:/Program_Files/cmake-3.2.0-rc1-win32-x86/bin/cmake.exe //Path to cpack program executable. CMAKE_CPACK_COMMAND:INTERNAL=D:/Program_Files/cmake-3.2.0-rc1-win32-x86/bin/cpack.exe //Path to ctest program executable. CMAKE_CTEST_COMMAND:INTERNAL=D:/Program_Files/cmake-3.2.0-rc1-win32-x86/bin/ctest.exe //ADVANCED property for variable: CMAKE_C_FLAGS CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //Executable file format CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //Name of external makefile project generator. CMAKE_EXTRA_GENERATOR:INTERNAL= //Name of generator. CMAKE_GENERATOR:INTERNAL=Visual Studio 12 2013 //Name of generator platform. CMAKE_GENERATOR_PLATFORM:INTERNAL= //Name of generator toolset. CMAKE_GENERATOR_TOOLSET:INTERNAL= //Start directory with the top level CMakeLists.txt file for this // project CMAKE_HOME_DIRECTORY:INTERNAL=D:/Program_Files/nanomsg-0.5-beta //ADVANCED property for variable: CMAKE_LINKER CMAKE_LINKER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //number of local generators CMAKE_NUMBER_OF_LOCAL_GENERATORS:INTERNAL=2 //Path to CMake installation. CMAKE_ROOT:INTERNAL=D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SKIP_RPATH CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //Suppress Warnings that are meant for the author of the CMakeLists.txt // files. CMAKE_SUPPRESS_DEVELOPER_WARNINGS:INTERNAL=FALSE //ADVANCED property for variable: CMAKE_USE_RELATIVE_PATHS CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_SOURCE_7Z CPACK_SOURCE_7Z-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_SOURCE_ZIP CPACK_SOURCE_ZIP-ADVANCED:INTERNAL=1 //Stored GUID SG_Filter_CMake Rules_GUID_CMAKE:INTERNAL=A1D1CD40-5B92-4362-B09C-6C40AD52F48B //Stored GUID SG_Filter_Header Files_GUID_CMAKE:INTERNAL=77674F2D-7166-4452-BBED-CB5F563125D0 //Stored GUID SG_Filter_Object Files_GUID_CMAKE:INTERNAL=35E52D66-F525-42BF-A215-A4179E98ADBD //Stored GUID SG_Filter_Resources_GUID_CMAKE:INTERNAL=64DCA84D-F568-46C4-AEEE-DEB2D4A6D327 //Stored GUID SG_Filter_Source Files_GUID_CMAKE:INTERNAL=AC9AF405-4407-4FBC-8D3C-0AB774F4B3C3 //Stored GUID ZERO_CHECK_GUID_CMAKE:INTERNAL=7714A65B-B83B-4846-9C3E-D5961EFEDCCB -------------- next part -------------- # This is the CMakeCache file. # For build in directory: d:/Program_Files/nanomsg-0.5-beta # It was generated by CMake: D:/Program_Files/cmake-3.2.0-rc1-win32-x86/bin/cmake.exe # You can edit this file to change values found and used by cmake. # If you do not want to change any of the values, simply exit the editor. # If you do want to change a value, simply edit, save, and exit the editor. # The syntax for the file is as follows: # KEY:TYPE=VALUE # KEY is the name of a variable in the cache. # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. # VALUE is the current value for the KEY. ######################## # EXTERNAL cache entries ######################## //Choose the type of build, options are: None(CMAKE_CXX_FLAGS or // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. CMAKE_BUILD_TYPE:STRING= //Semicolon separated list of supported configuration types, only // supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything // else will be ignored. CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release //Flags used by the compiler during all build types. CMAKE_C_FLAGS:STRING= //Flags used by the compiler during debug builds. CMAKE_C_FLAGS_DEBUG:STRING= //Flags used by the compiler during release builds for minimum // size. CMAKE_C_FLAGS_MINSIZEREL:STRING= //Flags used by the compiler during release builds. CMAKE_C_FLAGS_RELEASE:STRING= //Flags used by the compiler during release builds with debug info. CMAKE_C_FLAGS_RELWITHDEBINFO:STRING= //Flags used by the linker. CMAKE_EXE_LINKER_FLAGS:STRING= //Flags used by the linker during debug builds. CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= //Flags used by the linker during release minsize builds. CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= //Flags used by the linker during release builds. CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= //Flags used by the linker during Release with Debug Info builds. CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= //Install path prefix, prepended onto install directories. CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/nanomsg //Path to a program. CMAKE_LINKER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/link.exe //Flags used by the linker during the creation of modules. CMAKE_MODULE_LINKER_FLAGS:STRING= //Flags used by the linker during debug builds. CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= //Flags used by the linker during release minsize builds. CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= //Flags used by the linker during release builds. CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= //Flags used by the linker during Release with Debug Info builds. CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= //Value Computed by CMake CMAKE_PROJECT_NAME:STATIC=nanomsg //Flags used by the linker during the creation of dll's. CMAKE_SHARED_LINKER_FLAGS:STRING= //Flags used by the linker during debug builds. CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= //Flags used by the linker during release minsize builds. CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= //Flags used by the linker during release builds. CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= //Flags used by the linker during Release with Debug Info builds. CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= //If set, runtime paths are not added when installing shared libraries, // but are added when building. CMAKE_SKIP_INSTALL_RPATH:BOOL=OFF //If set, runtime paths are not added when using shared libraries. CMAKE_SKIP_RPATH:BOOL=OFF //Flags used by the linker during the creation of static libraries. CMAKE_STATIC_LINKER_FLAGS:STRING= //Flags used by the linker during debug builds. CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= //Flags used by the linker during release minsize builds. CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= //Flags used by the linker during release builds. CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= //Flags used by the linker during Release with Debug Info builds. CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= //If true, cmake will use relative paths in makefiles and projects. CMAKE_USE_RELATIVE_PATHS:BOOL=OFF //If this value is on, makefiles will be generated without the // .SILENT directive, and all commands will be echoed to the console // during the make. This is useful for debugging only. With Visual // Studio IDE projects all commands are done without /nologo. CMAKE_VERBOSE_MAKEFILE:BOOL=OFF //Enable to build 7-Zip source packages CPACK_SOURCE_7Z:BOOL=ON //Enable to build ZIP source packages CPACK_SOURCE_ZIP:BOOL=ON //Value Computed by CMake nanomsg_BINARY_DIR:STATIC=D:/Program_Files/nanomsg-0.5-beta //Dependencies for the target nanomsg_LIB_DEPENDS:STATIC=general;ws2_32;general;Mswsock.lib;general;Advapi32.lib; //Value Computed by CMake nanomsg_SOURCE_DIR:STATIC=D:/Program_Files/nanomsg-0.5-beta ######################## # INTERNAL cache entries ######################## //This is the directory where this CMakeCache.txt was created CMAKE_CACHEFILE_DIR:INTERNAL=d:/Program_Files/nanomsg-0.5-beta //Major version of cmake used to create the current loaded cache CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 //Minor version of cmake used to create the current loaded cache CMAKE_CACHE_MINOR_VERSION:INTERNAL=2 //Patch version of cmake used to create the current loaded cache CMAKE_CACHE_PATCH_VERSION:INTERNAL=0 //Path to CMake executable. CMAKE_COMMAND:INTERNAL=D:/Program_Files/cmake-3.2.0-rc1-win32-x86/bin/cmake.exe //Path to cpack program executable. CMAKE_CPACK_COMMAND:INTERNAL=D:/Program_Files/cmake-3.2.0-rc1-win32-x86/bin/cpack.exe //Path to ctest program executable. CMAKE_CTEST_COMMAND:INTERNAL=D:/Program_Files/cmake-3.2.0-rc1-win32-x86/bin/ctest.exe //ADVANCED property for variable: CMAKE_C_FLAGS CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //Executable file format CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //Name of external makefile project generator. CMAKE_EXTRA_GENERATOR:INTERNAL= //Name of generator. CMAKE_GENERATOR:INTERNAL=Visual Studio 12 2013 //Name of generator platform. CMAKE_GENERATOR_PLATFORM:INTERNAL= //Name of generator toolset. CMAKE_GENERATOR_TOOLSET:INTERNAL= //Start directory with the top level CMakeLists.txt file for this // project CMAKE_HOME_DIRECTORY:INTERNAL=D:/Program_Files/nanomsg-0.5-beta //ADVANCED property for variable: CMAKE_LINKER CMAKE_LINKER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //number of local generators CMAKE_NUMBER_OF_LOCAL_GENERATORS:INTERNAL=2 //Path to CMake installation. CMAKE_ROOT:INTERNAL=D:/Program_Files/cmake-3.2.0-rc1-win32-x86/share/cmake-3.2 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SKIP_RPATH CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //Suppress Warnings that are meant for the author of the CMakeLists.txt // files. CMAKE_SUPPRESS_DEVELOPER_WARNINGS:INTERNAL=FALSE //ADVANCED property for variable: CMAKE_USE_RELATIVE_PATHS CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_SOURCE_7Z CPACK_SOURCE_7Z-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_SOURCE_ZIP CPACK_SOURCE_ZIP-ADVANCED:INTERNAL=1 //Stored GUID SG_Filter_CMake Rules_GUID_CMAKE:INTERNAL=A1D1CD40-5B92-4362-B09C-6C40AD52F48B //Stored GUID SG_Filter_Header Files_GUID_CMAKE:INTERNAL=77674F2D-7166-4452-BBED-CB5F563125D0 //Stored GUID SG_Filter_Object Files_GUID_CMAKE:INTERNAL=35E52D66-F525-42BF-A215-A4179E98ADBD //Stored GUID SG_Filter_Resources_GUID_CMAKE:INTERNAL=64DCA84D-F568-46C4-AEEE-DEB2D4A6D327 //Stored GUID SG_Filter_Source Files_GUID_CMAKE:INTERNAL=AC9AF405-4407-4FBC-8D3C-0AB774F4B3C3 //Stored GUID ZERO_CHECK_GUID_CMAKE:INTERNAL=7714A65B-B83B-4846-9C3E-D5961EFEDCCB -------------- next part -------------- A non-text attachment was scrubbed... Name: CMakeOutput.log Type: application/octet-stream Size: 8641 bytes Desc: not available URL: From mantis at public.kitware.com Tue Feb 24 04:04:22 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Tue, 24 Feb 2015 04:04:22 -0500 Subject: [cmake-developers] [CMake 0015416]: cmake does not remove readonly flag from its *.in files when copying, so modification fails. Message-ID: The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15416 ====================================================================== Reported By: Gunnar Roth Assigned To: ====================================================================== Project: CMake Issue ID: 15416 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-24 04:04 EST Last Modified: 2015-02-24 04:04 EST ====================================================================== Summary: cmake does not remove readonly flag from its *.in files when copying, so modification fails. Description: we are using TFS from Microsoft as version control system, TFS does set the readonly flag on all non checked out files. we have cmake checked in so everybody gets the right version of it when building our software ( we also maintain some modifications to cmake). the problem is that cmake does not remove readonly flag from its *.in files when copying, so modification fails. our current workaround is that we do a EXECUTE_PROCESS( COMMAND cmd /C attrib /S -R "${CMAKE_ROOT}/Modules/*.in" ERROR_QUIET) but i would like it better, if cmake would be aware of files having readonly attribut set and remove that when copying the file. regards, Gunnar ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-24 04:04 Gunnar Roth New Issue ====================================================================== From R.M.R.Bholanath at student.tudelft.nl Tue Feb 24 05:53:00 2015 From: R.M.R.Bholanath at student.tudelft.nl (Radjino Bholanath) Date: Tue, 24 Feb 2015 10:53:00 +0000 Subject: [cmake-developers] Questions about code reviews and static analysis tools for TU Delft research Message-ID: <016900840D5AC640A0034E24ACD7F2600EE19303@SRV366.tudelft.net> Hi everyone, I'm doing research on code reviews and static analysis tools at the SERG group (http://swerl.tudelft.nl/bin/view/Main/WebHome) of the Delft University of Technology. Currently, we want to give an overview of the usage of code review and static analysis tools in open source projects. Therefore, I would be very happy to know a little bit more about how code reviews are used in CMake and if (and maybe how) static analysis tools are used. I have a couple of questions for anyone willing to answer: 1. Do all developers (contributors and core developers) have to submit a code review for every change? I?m asking because many projects only review changes made by contributors. 2. Which code review tools are used? 3. Are static analyzers used? If they are used: a. Is passing the checks of the static analyzers necessary for a change to be accepted? b. Which static analyzers are used? Thanks, Radjino From mark.j.abraham at gmail.com Tue Feb 24 08:25:28 2015 From: mark.j.abraham at gmail.com (Mark Abraham) Date: Tue, 24 Feb 2015 14:25:28 +0100 Subject: [cmake-developers] [PATCH] fix use of CMAKE_REQUIRED_DEFINITIONS Message-ID: Hi, Some modules shoud use CMAKE_REQUIRED_FLAGS, not CMAKE_REQUIRED_DEFINITIONS, I think. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Fix-incorrect-use-of-CMAKE_REQUIRED_DEFINITIONS.patch Type: text/x-patch Size: 4540 bytes Desc: not available URL: From brad.king at kitware.com Tue Feb 24 09:39:25 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 24 Feb 2015 09:39:25 -0500 Subject: [cmake-developers] Fwd: CMake Error when configure nanomsg on Windows 8.1 and VS2013 In-Reply-To: References: Message-ID: <54EC8D1D.2090407@kitware.com> On 02/23/2015 11:33 PM, ??? wrote: > Here is that cmake says when cmake nanamsg on Windows 8.1 and VS2013: This is a well-tested platform combination. Have you used CMake before on this machine? > System is unknown to cmake, create: > Platform/Windows to use this system, please send your config file to cmake at www.cmake.org so it can be added to cmake This looks like something is wrong with the installation. CMake is not seeing its own files. How did you install it? -Brad From brad.king at kitware.com Tue Feb 24 09:47:12 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 24 Feb 2015 09:47:12 -0500 Subject: [cmake-developers] [PATCH] fix use of CMAKE_REQUIRED_DEFINITIONS In-Reply-To: References: Message-ID: <54EC8EF0.5080106@kitware.com> On 02/24/2015 08:25 AM, Mark Abraham wrote: > Some modules shoud use CMAKE_REQUIRED_FLAGS, not CMAKE_REQUIRED_DEFINITIONS, I think. Actually both technically support any flags, but the latter only for legacy reasons. I agree CMAKE_REQUIRED_FLAGS is clearer for this purpose. I've applied the patch with minor tweaks: Check*CompilerFlag: Refactor method used to pass flags http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d5067ae Thanks, -Brad From Robert.Goulet at autodesk.com Tue Feb 24 09:51:52 2015 From: Robert.Goulet at autodesk.com (Robert Goulet) Date: Tue, 24 Feb 2015 14:51:52 +0000 Subject: [cmake-developers] cmake install command expected performance? In-Reply-To: References: <54EB4927.709@gmail.com> Message-ID: Thanks everyone for all the hints! After a closer look, cmake actual copying of files is indeed just as fast as normal OS copy, tested after reboots everytime. However, when the files are already present (all target up-to-date), it still takes 50+ seconds for cmake to realize that all files don't need to be copied, compared to an OS copy or a robocopy in ruby that takes less than a second. Perhaps the log spam for every file in the console is part of the problem? Is there a way to turn it off? -----Original Message----- From: Joshua Clayton [mailto:stillcompiling at gmail.com] Sent: Monday, February 23, 2015 9:28 PM To: Robert Goulet Cc: Nils Gladitz; cmake-developers at cmake.org Subject: Re: [cmake-developers] cmake install command expected performance? On Linux reading the input file would still be cached on subsequent runs even if you remove the destination folder, and writing will always cache unless you have a filesystem mounted with -o sync (that supports sync) Without special effort, only the first time you run will it be reading from actual files on disk. running the sync command immediately afterward can give you an idea how long it took to actually write out the files to media. Not sure how this works on other OS's, but expect it is similar. On Mon, Feb 23, 2015 at 8:10 AM, Robert Goulet wrote: > We deleted the destination folder every time we did a test. And it's an SSD drive, I don't think having files in cache would be the issue. When files are already there it still takes 30+ seconds for cmake to "not" copy the files. > > -----Original Message----- > From: Nils Gladitz [mailto:nilsgladitz at gmail.com] > Sent: Monday, February 23, 2015 10:37 AM > To: Robert Goulet; cmake-developers at cmake.org > Subject: Re: [cmake-developers] cmake install command expected performance? > > On 02/23/2015 04:13 PM, Robert Goulet wrote: >> I'm running into an issue were using the CMake install command to >> copy a directory with over 5000+ files (slightly over 1GB of data) >> takes a lot more time than doing a simple copy. On an SSD drive it >> takes 0.2 seconds to copy, while it takes about 56+ seconds for CMake >> to do the same thing using the install command. Why is there so much >> a big difference? Is this intended for some reasons or could there be a bug? Thanks! > > Did you run the manual copy right after the cmake install? (e.g. could files still have been in the system's disk cache?). > > Both a manual copy and a cmake install might omit copying if the source isn't newer than the destination file; did you perform both with the destination files missing? > > Nils > -- > > 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 From brad.king at kitware.com Tue Feb 24 09:56:50 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 24 Feb 2015 09:56:50 -0500 Subject: [cmake-developers] cmake install command expected performance? In-Reply-To: References: <54EB4927.709@gmail.com> Message-ID: <54EC9132.8090202@kitware.com> On 02/24/2015 09:51 AM, Robert Goulet wrote: > takes 50+ seconds for cmake to realize that all files don't need > to be copied It's comparing the time stamps of every corresponding file. On many filesystems that is faster than the actual copy. > Perhaps the log spam for every file in the console is part of the problem? > Is there a way to turn it off? http://www.cmake.org/cmake/help/v3.1/variable/CMAKE_INSTALL_MESSAGE.html set(CMAKE_INSTALL_MESSAGE LAZY) -Brad From robert.maynard at kitware.com Tue Feb 24 10:01:52 2015 From: robert.maynard at kitware.com (Robert Maynard) Date: Tue, 24 Feb 2015 10:01:52 -0500 Subject: [cmake-developers] [ANNOUNCE] CMake 3.2.0-rc2 now ready for testing! Message-ID: I am proud to announce the CMake 3.2 second release candidate. Sources and binaries are available at: http://www.cmake.org/download/ http://www.cmake.org/files/v3.2/?C=M;O=D Documentation is available at: http://www.cmake.org/cmake/help/v3.2 Release notes appear below and are also published at http://www.cmake.org/cmake/help/v3.2/release/3.2.html Some of the more significant features of CMake 3.2 are: * CMake learned to support unicode characters *encoded as UTF-8* on Windows. This was already supported on platforms whose system APIs accept UTF-8 encoded strings. Unicode characters may now be used in CMake code, paths to source files, configured files such as ".h.in" files, and other files read and written by CMake. Note that because CMake interoperates with many other tools, there may still be some limitations when using certain unicode characters. * The "Compile Features" functionality is now aware of features supported by more compilers, including: * Apple Clang ("AppleClang") for Xcode versions 4.4 though 6.1. * GNU compiler versions 4.4 through 5.0 on UNIX and Apple ("GNU"). * Microsoft Visual Studio ("MSVC") for versions 2010 through 2015. * Oracle SolarisStudio ("SunPro") version 12.4. * The "add_custom_command()" and "add_custom_target()" commands learned a new "BYPRODUCTS" option to specify files produced as side effects of the custom commands. These are not outputs because they do not always have to be newer than inputs. * The "file(GENERATE)" command can now generate files which are used as source files for buildsystem targets. Generated files automatically get their "GENERATED" property set to "TRUE". Deprecated and Removed Features: * Files written in the "cmake-language(7)", such as "CMakeLists.txt" or "*.cmake" files, are now expected to be encoded as UTF-8. If files are already ASCII, they will be compatible. If files were in a different encoding, including Latin 1, they will need to be converted. * The "FindOpenGL" module no longer explicitly searches for any dependency on X11 libraries with the "FindX11" module. Such dependencies should not need to be explicit. Applications using X11 APIs themselves should find and link to X11 libraries explicitly. CMake 3.2 Release Notes *********************** Changes made since CMake 3.1 include the following. New Features ============ Syntax ------ * CMake learned to support unicode characters *encoded as UTF-8* on Windows. This was already supported on platforms whose system APIs accept UTF-8 encoded strings. Unicode characters may now be used in CMake code, paths to source files, configured files such as ".h.in" files, and other files read and written by CMake. Note that because CMake interoperates with many other tools, there may still be some limitations when using certain unicode characters. Commands -------- * The "add_custom_command()" and "add_custom_target()" commands learned a new "BYPRODUCTS" option to specify files produced as side effects of the custom commands. These are not outputs because they do not always have to be newer than inputs. * The "add_custom_command()" and "add_custom_target()" commands learned a new "USES_TERMINAL" option to request that the command be given direct access to the terminal if possible. The "Ninja" generator will places such commands in the "console" "pool". Build targets provided by CMake that are meant for individual interactive use, such as "install", are now placed in this pool. * A new "continue()" command was added that can be called inside loop contexts to end the current iteration and start the next one at the top of the loop block. * The "file(LOCK)" subcommand was created to allow CMake processes to synchronize through file and directory locks. * The "file(STRINGS)" now supports UTF-16LE, UTF-16BE, UTF-32LE, UTF- 32BE as "ENCODING" options. * The "install(EXPORT)" command now works with an absolute "DESTINATION" even if targets in the export set are installed with a destination or *usage requirements* specified relative to the install prefix. The value of the "CMAKE_INSTALL_PREFIX" variable is hard-coded into the installed export file as the base for relative references. * The "try_compile()" command source file signature now honors link flags (e.g. "CMAKE_EXE_LINKER_FLAGS") in the generated test project. See policy "CMP0056". * The "try_run()" command learned to honor the "LINK_LIBRARIES" option just as "try_compile()" already does. * The "file(GENERATE)" command now generates the output file with the same permissions as the input file if set. * The "file(GENERATE)" command can now generate files which are used as source files for buildsystem targets. Generated files automatically get their "GENERATED" property set to "TRUE". Variables --------- * The "CMAKE_MATCH_COUNT" variable was introduced to record the number of matches made in the last regular expression matched in an "if()" command or a "string()" command. Properties ---------- * An "ANDROID_API_MIN" target property was introduced to specify the minimum version to be targeted by the toolchain. * A "VS_SHADER_FLAGS" source file property was added to specify additional shader flags to ".hlsl" files, for the Visual Studio generators. Modules ------- * The "ExternalData" module learned to support *Custom Fetch Scripts*. This allows projects to specify custom ".cmake" scripts for fetching data objects during the build. * The "ExternalProject" module learned options to create independent external project step targets that do not depend on the builtin steps. * The "ExternalProject" module "ExternalProject_Add()" command learned a new "CMAKE_CACHE_DEFAULT_ARGS" option to initialize cache values in the external project without setting them on future builds. * The "ExternalProject" module "ExternalProject_Add()" command learned a new "TEST_EXCLUDE_FROM_MAIN" option to exclude tests from the main build. * The "ExternalProject" module "ExternalProject_Add()" command learned a new "UPDATE_DISCONNECTED" option to avoid automatically updating the source tree checkout from version control. * The "FindCUDA" module learned about the "cusolver" library in CUDA 7.0. * The "FindGit" module learned to find the "git" command-line tool that comes with GitHub for Windows installed in user home directories. * A "FindGSL" module was introduced to find the GNU Scientific Library. * A "FindIntl" module was introduced to find the Gettext "libintl" library. * The "FindLATEX" module learned to support components. * The "FindMPI" module learned to find MS-MPI on Windows. * The "FindOpenSSL" module now reports "crypto" and "ssl" libraries separately in "OPENSSL_CRYPTO_LIBRARY" and "OPENSSL_SSL_LIBRARY", respectively, to allow applications to link to one without the other. * The "WriteCompilerDetectionHeader" module learned to create a define for portability of the "cxx_thread_local" feature. The define expands to either the C++11 "thread_local" keyword, or a pre- standardization compiler-specific equivalent, as appropriate. * The "WriteCompilerDetectionHeader" module learned to create multiple output files per compiler and per language, instead of creating one large file. CTest ----- * The "ctest_coverage()" command learned to support Delphi coverage. * The "ctest_coverage()" command learned to support Javascript coverage. * The "CTestCoverageCollectGCOV" module was introduced as an alternative to the "ctest_coverage()" command for collecting "gcov" results for submission to CDash. CPack ----- * The "CPackRPM" module learned options to set per-component descriptions and summaries. See the "CPACK_RPM__PACKAGE_DESCRIPTION" and "CPACK_RPM__PACKAGE_SUMMARY" variables. * The "CPackRPM" module learned options to specify requirements for pre- and post-install scripts. See the "CPACK_RPM_PACKAGE_REQUIRES_PRE" and "CPACK_RPM_PACKAGE_REQUIRES_POST" variables. * The "CPackRPM" module learned options to specify requirements for pre- and post-uninstall scripts. See the "CPACK_RPM_PACKAGE_REQUIRES_PREUN" and "CPACK_RPM_PACKAGE_REQUIRES_POSTUN" variables. * The "CPackRPM" module learned a new "CPACK_RPM__PACKAGE_PREFIX" variable to specify a component-specific value to use instead of "CPACK_PACKAGING_INSTALL_PREFIX". * The "CPackRPM" module learned a new "CPACK_RPM_RELOCATION_PATHS" variable to specify multiple relocation prefixes for a single rpm package. Other ----- * The "cmake(1)" "-E tar" command now supports creating ".xz"-compressed archives with the "J" flag. * The "cmake(1)" "-E tar" command learned a new "--files- from=" option to specify file names using lines in a file to overcome command-line length limits. * The "cmake(1)" "-E tar" command learned a new "--mtime=" option to specify the modification time recorded in tarball entries. * The "Compile Features" functionality is now aware of features supported by more compilers, including: * Apple Clang ("AppleClang") for Xcode versions 4.4 though 6.1. * GNU compiler versions 4.4 through 5.0 on UNIX and Apple ("GNU"). * Microsoft Visual Studio ("MSVC") for versions 2010 through 2015. * Oracle SolarisStudio ("SunPro") version 12.4. * The *AUTORCC* feature now tracks files listed in ".qrc" files as dependencies. If an input file to the "rcc" tool is changed, the tool is automatically re-run. New Diagnostics =============== * The "break()" command now rejects calls outside of a loop context or that pass arguments to the command. See policy "CMP0055". Deprecated and Removed Features =============================== * Files written in the "cmake-language(7)", such as "CMakeLists.txt" or "*.cmake" files, are now expected to be encoded as UTF-8. If files are already ASCII, they will be compatible. If files were in a different encoding, including Latin 1, they will need to be converted. * The "FindOpenGL" module no longer explicitly searches for any dependency on X11 libraries with the "FindX11" module. Such dependencies should not need to be explicit. Applications using X11 APIs themselves should find and link to X11 libraries explicitly. * The implementation of CMake now relies on some C++ compiler features which are not supported by some older compilers. As a result, those old compilers can no longer be used to build CMake itself. CMake continues to be able to generate Makefiles and project files for users of those old compilers however. Compilers known to no longer be capable of building CMake are: * Visual Studio 6 and 7.0 -- superseded by VisualStudio 7.1 and newer. * GCC 2.95 -- superseded by GCC 3 and newer compilers. * Borland compilers -- superseded by other Windows compilers. * Compaq compilers -- superseded by other compilers. * SGI compilers -- IRIX was dropped as a host platform. Other Changes ============= * On Windows and OS X, commands supporting network communication via "https", such as "file(DOWNLOAD)", "file(UPLOAD)", and "ctest_submit()", now support SSL/TLS even when CMake is not built against OpenSSL. The Windows or OS X native SSL/TLS implementation is used by default. OS-configured certificate authorities will be trusted automatically. On other platforms, when CMake is built with OpenSSL, these commands now search for OS-configured certificate authorities in a few "/etc" paths to be trusted automatically. * On OS X with Makefile and Ninja generators, when a compiler is found in "/usr/bin" it is now mapped to the corresponding compiler inside the Xcode application folder, if any. This allows such build trees to continue to work with their original compiler even when "xcode- select" switches to a different Xcode installation. * The Visual Studio generators now write solution and project files in UTF-8 instead of Windows-1252. Windows-1252 supported Latin 1 languages such as those found in North and South America and Western Europe. With UTF-8, additional languages are now supported. * The "Xcode" generator no longer requires a value for the "CMAKE_MAKE_PROGRAM" variable to be located up front. It now locates "xcodebuild" when needed at build time. * When building CMake itself using SolarisStudio 12, the default "libCStd" standard library is not sufficient to build CMake. The SolarisStudio distribution supports compiler options to use "STLPort4" or "libstdc++". An appropriate option to select the standard library is now added automatically when building CMake with SolarisStudio compilers. ------------------------------------------------------------------- Changes made since CMake 3.1.0-rc1: Brad King (8): Help: Revise configure_file documentation (#15403) Help: In 3.2 relnotes move OpenGL/X11 to deprecated/removed section Utilities/Release: Build OS X and Win binaries without OpenSSL cmake-gui: Reset generator platform and toolset on configure (#15411) FindJsonCpp: Drop new module due to upstream jsoncpp providing package bootstrap: Add --(no-)system-jsoncpp options FindCurses: Drop unused check for cbreak in tinfo library CMake 3.2.0-rc2 Tiago St?rmer Daitx (1): FindJNI: Add arch-specific library dir for JDK 9 layout (#15408) From Robert.Goulet at autodesk.com Tue Feb 24 10:03:53 2015 From: Robert.Goulet at autodesk.com (Robert Goulet) Date: Tue, 24 Feb 2015 15:03:53 +0000 Subject: [cmake-developers] cmake install command expected performance? In-Reply-To: <54EC9132.8090202@kitware.com> References: <54EB4927.709@gmail.com> <54EC9132.8090202@kitware.com> Message-ID: Yes comparing timestamp is the way to go, but why is it so slow in cmake? I added command to set it to lazy report and it saved 1 second. So it's something else... I forgot to mention that there's a weird pause at the end after installing all files... not sure what it's doing. It looks like this part is taking the most amount of time. -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Tuesday, February 24, 2015 9:57 AM To: Robert Goulet; Joshua Clayton Cc: cmake-developers at cmake.org Subject: Re: [cmake-developers] cmake install command expected performance? On 02/24/2015 09:51 AM, Robert Goulet wrote: > takes 50+ seconds for cmake to realize that all files don't need to be > copied It's comparing the time stamps of every corresponding file. On many filesystems that is faster than the actual copy. > Perhaps the log spam for every file in the console is part of the problem? > Is there a way to turn it off? http://www.cmake.org/cmake/help/v3.1/variable/CMAKE_INSTALL_MESSAGE.html set(CMAKE_INSTALL_MESSAGE LAZY) -Brad From mantis at public.kitware.com Tue Feb 24 10:05:30 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Tue, 24 Feb 2015 10:05:30 -0500 Subject: [cmake-developers] [CMake 0015417]: CMAKE_C_COMPILER_VERSION is wrong due to a bug in gcc Message-ID: The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15417 ====================================================================== Reported By: Christophe Dumeunier Assigned To: ====================================================================== Project: CMake Issue ID: 15417 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-24 10:05 EST Last Modified: 2015-02-24 10:05 EST ====================================================================== Summary: CMAKE_C_COMPILER_VERSION is wrong due to a bug in gcc Description: I suppose CMAKE_C_COMPILER_VERSION and CMAKE_CXX_COMPILER_VERSION are obtained from the maccros __GNUC__, __GNUC_MINOR__ and __GNUC_PATCHLEVEL__. It seems that gcc 4.5.1 has a bug : __GNUC_PATCHLEVEL__ is set to 0 instead of 1. It implies that CMake is wrong when loading the compiler information from gcc 4.5.1. Maybe the version should be checked with the maccro __VERSION__, or obtained directly from the command "gcc --version". Steps to Reproduce: Simply create a project compiled with gcc 4.5.1 using C or CXX. The bug of gcc can be observed with the following C++ code : #include int main(int argc, char** argv) { std::cout << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__ << std::endl; return 0; } Additional Information: Note that gcc 4.5.1 is the default compiler on openSUSE 11.4. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-24 10:05 Christophe DumeunierNew Issue ====================================================================== From brad.king at kitware.com Tue Feb 24 10:06:44 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 24 Feb 2015 10:06:44 -0500 Subject: [cmake-developers] cmake install command expected performance? In-Reply-To: References: <54EB4927.709@gmail.com> <54EC9132.8090202@kitware.com> Message-ID: <54EC9384.9080907@kitware.com> On 02/24/2015 10:03 AM, Robert Goulet wrote: > Yes comparing timestamp is the way to go, but why is it so slow in cmake? I've never observed that being slow in practice. You'll have to profile CMake while running in this case, or add some print statements with high-precision timestamps to see where the time is going. -Brad From Robert.Goulet at autodesk.com Tue Feb 24 10:09:24 2015 From: Robert.Goulet at autodesk.com (Robert Goulet) Date: Tue, 24 Feb 2015 15:09:24 +0000 Subject: [cmake-developers] cmake install command expected performance? In-Reply-To: <54EC9384.9080907@kitware.com> References: <54EB4927.709@gmail.com> <54EC9132.8090202@kitware.com> <54EC9384.9080907@kitware.com> Message-ID: Ok I guess we have no other choice than go in and profile it then. Thanks for the input. -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Tuesday, February 24, 2015 10:07 AM To: Robert Goulet; Joshua Clayton Cc: cmake-developers at cmake.org Subject: Re: [cmake-developers] cmake install command expected performance? On 02/24/2015 10:03 AM, Robert Goulet wrote: > Yes comparing timestamp is the way to go, but why is it so slow in cmake? I've never observed that being slow in practice. You'll have to profile CMake while running in this case, or add some print statements with high-precision timestamps to see where the time is going. -Brad From brad.king at kitware.com Tue Feb 24 10:27:20 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 24 Feb 2015 10:27:20 -0500 Subject: [cmake-developers] Questions about code reviews and static analysis tools for TU Delft research In-Reply-To: <016900840D5AC640A0034E24ACD7F2600EE19303@SRV366.tudelft.net> References: <016900840D5AC640A0034E24ACD7F2600EE19303@SRV366.tudelft.net> Message-ID: <54EC9858.10903@kitware.com> On 02/24/2015 05:53 AM, Radjino Bholanath wrote: > 1. Do all developers (contributors and core developers) > have to submit a code review for every change? Every change is reviewed before it is merged to the 'master' branch for official inclusion. The process for new contributors is documented here: http://www.cmake.org/gitweb?p=cmake.git;a=blob_plain;f=CONTRIBUTING.rst;hb=master The process for authorized developers is documented here: http://www.cmake.org/Wiki/CMake/Git/Develop Contributors send patches to this mailing list and may go through a few iterations of review with an authorized developer before being integrated. Authorized developers then take such patches (or their own changes) and merge them to a 'next' branch on which extensive nightly tests are run. When testing is clean then the maintainer performs a final review before accepting changes and merging them to 'master'. > 2. Which code review tools are used? Email. No formal review tools are used currently. > 3. Are static analyzers used? If they are used: > a. Is passing the checks of the static analyzers necessary > for a change to be accepted? This is part of the nightly testing. > b. Which static analyzers are used? Clang scan-build. We also use dynamic analysis with valgrind and Clang AddressSanitizer. -Brad From fengliutie at gmail.com Tue Feb 24 11:00:02 2015 From: fengliutie at gmail.com (=?UTF-8?B?5YiY6ZOB5Yia?=) Date: Wed, 25 Feb 2015 00:00:02 +0800 Subject: [cmake-developers] Fwd: CMake Error when configure nanomsg on Windows 8.1 and VS2013 In-Reply-To: <54EC8D1D.2090407@kitware.com> References: <54EC8D1D.2090407@kitware.com> Message-ID: Hi Brad, You are right! Thank you! In fact, I did not make a whole installation. what i did is only download and unzip the cmake-3.2.0-rc1-win32-x86.zip. Now it works well on this machine after I installed it again with the cmake-3.2.0-rc1-win32-x86.exe. Thanks again! 2015-02-24 22:39 GMT+08:00 Brad King : > On 02/23/2015 11:33 PM, ??? wrote: > > Here is that cmake says when cmake nanamsg on Windows 8.1 and VS2013: > > This is a well-tested platform combination. > > Have you used CMake before on this machine? > > > System is unknown to cmake, create: > > Platform/Windows to use this system, please send your config file to > cmake at www.cmake.org so it can be added to cmake > > This looks like something is wrong with the installation. CMake > is not seeing its own files. How did you install it? > > -Brad > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Tue Feb 24 11:10:45 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 24 Feb 2015 11:10:45 -0500 Subject: [cmake-developers] Fwd: CMake Error when configure nanomsg on Windows 8.1 and VS2013 In-Reply-To: References: <54EC8D1D.2090407@kitware.com> Message-ID: <54ECA285.7050507@kitware.com> On 02/24/2015 11:00 AM, ??? wrote: > what i did is only download and unzip the cmake-3.2.0-rc1-win32-x86.zip. > > Now it works well on this machine after I installed it again with the cmake-3.2.0-rc1-win32-x86.exe. I'm glad you have it working, but extracting the .zip is expected to work. What tool did you use to extract it? -Brad From DLRdave at aol.com Tue Feb 24 11:36:38 2015 From: DLRdave at aol.com (David Cole) Date: Tue, 24 Feb 2015 11:36:38 -0500 Subject: [cmake-developers] [vc12/idl] output directory problem In-Reply-To: <54EB7228.5020006@kitware.com> References: <54E7553B.9090501@kitware.com> <54EB7228.5020006@kitware.com> Message-ID: If this change fixes the problem... then the problem must be that the midl tool is being run from the wrong directory when it fails. Or that midl is being run at the same time for two different projects both trying to write output into the same directory simultaneously? (But wouldn't this latter one *still* be a problem with this fix....?) I hate mysteries. On Mon, Feb 23, 2015 at 1:32 PM, Brad King wrote: > On 02/21/2015 07:58 AM, Tim Blechmann wrote: >> i'd love to provide a reduced test case, though i can only reproduce >> this in a complex real-world buildsystem, with dozens of libraries and >> some include_external_msproject / add_dependencies pairs ... > [snip] >> that said, i wonder: why would it be ok to use a relative path in the >> generated project ... or, what would be the disadvantage of using an >> absolute path? > > I don't think that is a problem. I was just hoping to add a test case. > At least the existing test case should not be regressed by the change. > Applied: > > VS: Specify absolute output directory for the Midl tool > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b54e836 > > 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 From brad.king at kitware.com Tue Feb 24 15:34:39 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 24 Feb 2015 15:34:39 -0500 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) In-Reply-To: <20150224005032.GA11905@megas.kitwarein.com> References: <20150223184413.GA2033@megas.kitwarein.com> <20150224005032.GA11905@megas.kitwarein.com> Message-ID: <54ECE05F.10408@kitware.com> On 02/23/2015 07:50 PM, Ben Boeckel wrote: > We could also lift the restriction then. I'm fine with just dropping the > patch. Basically without it, all it blocks is > add_custom_{command,target} from using $?which could be > useful for some obscure linker target CMake doesn't understand. So maybe > just lifting all such restrictions on $ is the thing to > do. Some restrictions are there because we cannot safely evaluate the $ in general for all generators. See the code using EvaluateForBuildsystem. >> I had imagined other cases which were easy to reason about (and probably >> more common to need) such as: >> >> target_sources(a INTERFACE >> $<$,EXECUTABLE>sym1.c> >> ) >> >> So that it would just 'pass through' any intermediate libraries. > > That works for that case, but doesn't work when it needs to land in a > specific shared or static library (though I suppose STREQUAL + > TARGET_NAME could work there too, but that doesn't feel clean to me and > also feels like the tail wagging the dog). The author of the target_sources call likely has no idea what consumer really wants the sources. At most one could do something like: target_sources(someLib INTERFACE $<$>:someLib.c>) with current functionality. Until that problem is solved we cannot make object libraries implicitly offer their objects just through tll(). That is the reason I chose to use explicit $ in sources in the first place. It avoids the transitive multiple-use problem. The transitivity problem is also the reason I disallowed linking to/from object libraries originally. >> I thought about denying INTERFACE_SOURCES to objlibs altogether >> but decided against it since the same thing can be done with >> other libraries anyways. We should either solve this problem now or disallow the INTERFACE_SOURCES of object libraries. Then we will have the freedom in the future to allow it with whatever semantics make sense when the problem is eventually solved. The difference between object libraries and other library types is that the former have no usage requirements yet so this is all new behavior for them anyway. When the problem is solved then we can activate INTERFACE_SOURCES for object libraries and allow addition of $ to it. -Brad From steveire at gmail.com Tue Feb 24 17:25:20 2015 From: steveire at gmail.com (Stephen Kelly) Date: Tue, 24 Feb 2015 23:25:20 +0100 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) References: <20150223184413.GA2033@megas.kitwarein.com> <20150224005032.GA11905@megas.kitwarein.com> <54ECE05F.10408@kitware.com> Message-ID: Brad King wrote: > On 02/23/2015 07:50 PM, Ben Boeckel wrote: >> We could also lift the restriction then. I'm fine with just dropping the >> patch. Basically without it, all it blocks is >> add_custom_{command,target} from using $?which could be >> useful for some obscure linker target CMake doesn't understand. So maybe >> just lifting all such restrictions on $ is the thing to >> do. > > Some restrictions are there because we cannot safely evaluate the > $ in general for all generators. See the code > using EvaluateForBuildsystem. TARGET_OBJECTS already may not be used by add_custom_{command,target}, because cmake does not portably know the path to the object files. http://public.kitware.com/Bug/view.php?id=15226 If you want to lift that restriction for Makefile|Ninja generators and non- portable buildsystems, we can discuss that in a different thread. I think it's probably a good idea. Ben Boeckel wrote: >> Can you imagine a reason for both 'b' and 'exe' need sym1.c? Or do you >> imagine it to be something that should be only compiled into the shared >> library or only the executable? In other words - Is the buildsystem >> description above buggy? > > Sure, I *can*, but it's also not how I've used object libraries so far > (basically as static libraries I don't need to export). They're probably different enough to that that that mental model of them is unhelpful. >>> I had imagined other cases which were easy to reason about (and probably >>> more common to need) such as: >>> >>> target_sources(a INTERFACE >>> $<$,EXECUTABLE>sym1.c> >>> ) >>> >>> So that it would just 'pass through' any intermediate libraries. >> >> That works for that case, but doesn't work when it needs to land in a >> specific shared or static library (though I suppose STREQUAL + >> TARGET_NAME could work there too, but that doesn't feel clean to me and >> also feels like the tail wagging the dog). If you want to affect a particular downstream target, as opposed to a category of downstreams, transitive usage requirements and putting something like that in an INTERFACE are probably not the right tools. >> Would it make sense to uniq all sources? Or only uniq the ones which come >> from the link interface? This uniq is actually already done. >> I would prefer to see 'linking to' an object library consume its sources >> directly without needing to specify the target in both the sources and >> the target_link_libraries. > > I would as well, but with transitive linking, getting duplicate > symbols/static variables is way too easy at the moment (and debugging > the latter is not always easy if you don't know what you're looking > for). It is just as easy to get into this situation when linking static libraries, right? Object libraries are not part of the problem, right? Or could you post a sscce? > For the diamond-usage problem, is there some way of utilizing the > COMPATIBLE_INTERFACES to deny the mixing of two libraries where each > built with an object libraries' objects? Having a property to trigger > that would be nice... Yes, that's possible by adding an ExclusiveList compatible type and populating an appropriate property when linking to OBJECT libraries. I've written a prototype and can clean it up and post it if that's part of the solution. > Until that problem is solved we cannot make object libraries > implicitly offer their objects just through tll(). Honestly, the problem is still not clear to me. Is it something you would want to write and expect to be correct, but which would actually be incorrect? Is the static global object instance a necessary part of the problem-scenario? Thanks, Steve. From steveire at gmail.com Tue Feb 24 17:31:10 2015 From: steveire at gmail.com (Stephen Kelly) Date: Tue, 24 Feb 2015 23:31:10 +0100 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) References: <20150223184413.GA2033@megas.kitwarein.com> <20150224005032.GA11905@megas.kitwarein.com> <54ECE05F.10408@kitware.com> Message-ID: Stephen Kelly wrote: >> For the diamond-usage problem, is there some way of utilizing the >> COMPATIBLE_INTERFACES to deny the mixing of two libraries where each >> built with an object libraries' objects? Having a property to trigger >> that would be nice... > > Yes, that's possible by adding an ExclusiveList compatible type and > populating an appropriate property when linking to OBJECT libraries. I've > written a prototype and can clean it up and post it if that's part of the > solution. I pushed the ExclusiveList-compatibility branch to my clone. From ben.boeckel at kitware.com Wed Feb 25 01:01:11 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 25 Feb 2015 01:01:11 -0500 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) In-Reply-To: References: <20150223184413.GA2033@megas.kitwarein.com> <20150224005032.GA11905@megas.kitwarein.com> <54ECE05F.10408@kitware.com> Message-ID: <20150225060111.GA942@bronto-burt.dev.benboeckel.net> On Tue, Feb 24, 2015 at 23:25:20 +0100, Stephen Kelly wrote: > Brad King wrote: > > Some restrictions are there because we cannot safely evaluate the > > $ in general for all generators. See the code > > using EvaluateForBuildsystem. > > TARGET_OBJECTS already may not be used by add_custom_{command,target}, > because cmake does not portably know the path to the object files. > > http://public.kitware.com/Bug/view.php?id=15226 > > If you want to lift that restriction for Makefile|Ninja generators and non- > portable buildsystems, we can discuss that in a different thread. I think > it's probably a good idea. OK, I'll just leave it with allowing OBJECT libraries to use the genex. Further branches to address other usage can come later. > Ben Boeckel wrote: > > Sure, I *can*, but it's also not how I've used object libraries so far > > (basically as static libraries I don't need to export). > > They're probably different enough to that that that mental model of them is > unhelpful. So I think of it that way because my usual usage for them is to bring source files from all over the place into a single library. The biggest place is in VTK's Kit setup where each module is turned into an OBJECT library and then used when the Kit library is defined (VTK uses variables rather than usage requirements, so using target_link_libraries was nothing more than "oh well, I'll use the variables" at the time. > If you want to affect a particular downstream target, as opposed to a > category of downstreams, transitive usage requirements and putting something > like that in an INTERFACE are probably not the right tools. As I said, tail-wagging-the-dog :) . Right now, I just need PRIVATE usage, so there's no need for me to have this transitive interface stuff, but in implementing it for PRIVATE, it's an issue I have to deal with. > It is just as easy to get into this situation when linking static libraries, > right? Object libraries are not part of the problem, right? Or could you > post a sscce? It is, so maybe it's less of an issue. I just think it is much easier to stumble upon it when you start throwing objects directly into link lines implicitly rather than with a staticWithGlobalStatic -> {sharedA, sharedB} -> exeUsingAandB setup. > > For the diamond-usage problem, is there some way of utilizing the > > COMPATIBLE_INTERFACES to deny the mixing of two libraries where each > > built with an object libraries' objects? Having a property to trigger > > that would be nice... > > Yes, that's possible by adding an ExclusiveList compatible type and > populating an appropriate property when linking to OBJECT libraries. I've > written a prototype and can clean it up and post it if that's part of the > solution. As long as it is opt-in, I'm fine with this (it only really makes sense in the presence of global statics with dtors). > > Until that problem is solved we cannot make object libraries > > implicitly offer their objects just through tll(). > > Honestly, the problem is still not clear to me. Is it something you would > want to write and expect to be correct, but which would actually be > incorrect? Is the static global object instance a necessary part of the > problem-scenario? So this problem came up in a project where the current code uses LIBADD in autotools. These added libraries are conditionally built and have varying usage requirements (headers, linking, defines, etc.). Oh, they also have symbols which need exporting. Removing the autotools buildsystem altogether has been NAK'd already, so we're stuck with their code layout or revamping the autotools (though even if that had been done, the code probably still wouldn't get reorganized). Passing all of the usage requirements around either in internal cache variables or global properties (PARENT_SCOPE won't scale because I need to push umpteen vars up 3 directories then inherit it into another) is less than ideal. Yes, I already tried using static libraries (I think $ made the duplicate symbols occur in dependent projects which use shared libs through the transitive linking which then all went into an executable); that's how I ended up trying object libraries. --Ben From raffi.enficiaud at free.fr Wed Feb 25 04:11:34 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Wed, 25 Feb 2015 10:11:34 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54EB694A.9030605@kitware.com> References: <54C01A82.6080400@kitware.com> <8017F6A3-A9D0-47D2-9B53-DE4C0E2C3FDE@free.fr> <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5F072.3090903@kitware.com> <06983E90-D75E-4335-8D02-1D40DF89B9C2@free.fr> <54EB694A.9030605@kitware.com> Message-ID: <7BCB5D1E-275E-43B2-B0FF-0ECEE0A78585@free.fr> Hi Brad, Thanks, I started addressing the issues, hopefully I will finish today. Is it ok if I rebase on 1416d21? Best, Raffi > On 23 Feb 2015, at 18:54, Brad King wrote: > > Hi Raffi, > > Your matlab-enabled nightly builds have been clean for a few days on all > the platforms. I've moved them to the "Nightly Expected" section of the > dashboard. > > Now I'm just waiting on your next updates to the module based on my > comments elsewhere in this thread to proceed with the FindMatlab > topic. > > Thanks, > -Brad From R.M.R.Bholanath at student.tudelft.nl Wed Feb 25 04:26:47 2015 From: R.M.R.Bholanath at student.tudelft.nl (Radjino Bholanath) Date: Wed, 25 Feb 2015 09:26:47 +0000 Subject: [cmake-developers] Questions about code reviews and static analysis tools for TU Delft research In-Reply-To: <54EC9858.10903@kitware.com> References: <016900840D5AC640A0034E24ACD7F2600EE19303@SRV366.tudelft.net>, <54EC9858.10903@kitware.com> Message-ID: <016900840D5AC640A0034E24ACD7F2600EE1B037@SRV366.tudelft.net> Thanks for answering Brad, I appreciate it. - Radjino ________________________________________ From: Brad King [brad.king at kitware.com] Sent: Tuesday, February 24, 2015 4:27 PM To: Radjino Bholanath Cc: cmake-developers at cmake.org Subject: Re: [cmake-developers] Questions about code reviews and static analysis tools for TU Delft research Every change is reviewed before it is merged to the 'master' branch for official inclusion. ... We also use dynamic analysis with valgrind and Clang AddressSanitizer. -Brad From fengliutie at gmail.com Wed Feb 25 06:25:18 2015 From: fengliutie at gmail.com (=?UTF-8?B?5YiY6ZOB5Yia?=) Date: Wed, 25 Feb 2015 19:25:18 +0800 Subject: [cmake-developers] Fwd: CMake Error when configure nanomsg on Windows 8.1 and VS2013 In-Reply-To: <54ECA285.7050507@kitware.com> References: <54EC8D1D.2090407@kitware.com> <54ECA285.7050507@kitware.com> Message-ID: I extracted .zip with WinRAR. Since you said extracting the .zip is expected to work,I uninstall CMake and extracting the .zip again. It's works well this time. No only that, I've done the same thing(extracting and run directly) on another clean machine,it also works well. It's strange,right? Maybe I did some stupid things when i extracted CMake the first time.Who knows. Thank you again for your help! 2015-02-25 0:10 GMT+08:00 Brad King : > On 02/24/2015 11:00 AM, ??? wrote: > > what i did is only download and unzip the cmake-3.2.0-rc1-win32-x86.zip. > > > > Now it works well on this machine after I installed it again with the > cmake-3.2.0-rc1-win32-x86.exe. > > I'm glad you have it working, but extracting the .zip is expected to work. > What tool did you use to extract it? > > -Brad > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Wed Feb 25 08:32:52 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 25 Feb 2015 08:32:52 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <7BCB5D1E-275E-43B2-B0FF-0ECEE0A78585@free.fr> References: <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5F072.3090903@kitware.com> <06983E90-D75E-4335-8D02-1D40DF89B9C2@free.fr> <54EB694A.9030605@kitware.com> <7BCB5D1E-275E-43B2-B0FF-0ECEE0A78585@free.fr> Message-ID: <54EDCF04.2000909@kitware.com> On 02/25/2015 04:11 AM, Raffi Enficiaud wrote: > Is it ok if I rebase on 1416d21? Yes, please. Thanks, -Brad From roman.wueger at gmx.at Wed Feb 25 09:07:03 2015 From: roman.wueger at gmx.at (=?utf-8?Q?Roman_W=C3=BCger?=) Date: Wed, 25 Feb 2015 15:07:03 +0100 Subject: [cmake-developers] [ANNOUNCE] CMake 3.2.0-rc2 now ready for testing! In-Reply-To: References: Message-ID: Hello Robert, is there a list which showing the changes between rc1 and rc2, to test such things explicitly? Regards Roman > Am 24.02.2015 um 16:01 schrieb Robert Maynard : > > I am proud to announce the CMake 3.2 second release candidate. > > Sources and binaries are available at: > http://www.cmake.org/download/ > http://www.cmake.org/files/v3.2/?C=M;O=D > > Documentation is available at: > http://www.cmake.org/cmake/help/v3.2 > > Release notes appear below and are also published at > http://www.cmake.org/cmake/help/v3.2/release/3.2.html > Some of the more significant features of CMake 3.2 are: > > * CMake learned to support unicode characters *encoded as UTF-8* on > Windows. This was already supported on platforms whose system APIs > accept UTF-8 encoded strings. Unicode characters may now be used in > CMake code, paths to source files, configured files such as ".h.in" > files, and other files read and written by CMake. Note that because > CMake interoperates with many other tools, there may still be some > limitations when using certain unicode characters. > > * The "Compile Features" functionality is now aware of features > supported by more compilers, including: > > * Apple Clang ("AppleClang") for Xcode versions 4.4 though 6.1. > > * GNU compiler versions 4.4 through 5.0 on UNIX and Apple ("GNU"). > > * Microsoft Visual Studio ("MSVC") for versions 2010 through 2015. > > * Oracle SolarisStudio ("SunPro") version 12.4. > > * The "add_custom_command()" and "add_custom_target()" commands > learned a new "BYPRODUCTS" option to specify files produced as side > effects of the custom commands. These are not outputs because they > do not always have to be newer than inputs. > > * The "file(GENERATE)" command can now generate files which are used > as source files for buildsystem targets. Generated files > automatically get their "GENERATED" property set to "TRUE". > > Deprecated and Removed Features: > > * Files written in the "cmake-language(7)", such as "CMakeLists.txt" > or "*.cmake" files, are now expected to be encoded as UTF-8. If > files are already ASCII, they will be compatible. If files were in > a different encoding, including Latin 1, they will need to be > converted. > > * The "FindOpenGL" module no longer explicitly searches for any > dependency on X11 libraries with the "FindX11" module. Such > dependencies should not need to be explicit. Applications using X11 > APIs themselves should find and link to X11 libraries explicitly. > > > CMake 3.2 Release Notes > *********************** > > Changes made since CMake 3.1 include the following. > > > New Features > ============ > > > Syntax > ------ > > * CMake learned to support unicode characters *encoded as UTF-8* on > Windows. This was already supported on platforms whose system APIs > accept UTF-8 encoded strings. Unicode characters may now be used in > CMake code, paths to source files, configured files such as ".h.in" > files, and other files read and written by CMake. Note that because > CMake interoperates with many other tools, there may still be some > limitations when using certain unicode characters. > > > Commands > -------- > > * The "add_custom_command()" and "add_custom_target()" commands > learned a new "BYPRODUCTS" option to specify files produced as side > effects of the custom commands. These are not outputs because they > do not always have to be newer than inputs. > > * The "add_custom_command()" and "add_custom_target()" commands > learned a new "USES_TERMINAL" option to request that the command be > given direct access to the terminal if possible. The "Ninja" > generator will places such commands in the "console" "pool". Build > targets provided by CMake that are meant for individual interactive > use, such as "install", are now placed in this pool. > > * A new "continue()" command was added that can be called inside > loop contexts to end the current iteration and start the next one at > the top of the loop block. > > * The "file(LOCK)" subcommand was created to allow CMake processes > to synchronize through file and directory locks. > > * The "file(STRINGS)" now supports UTF-16LE, UTF-16BE, UTF-32LE, > UTF- 32BE as "ENCODING" options. > > * The "install(EXPORT)" command now works with an absolute > "DESTINATION" even if targets in the export set are installed with a > destination or *usage requirements* specified relative to the > install prefix. The value of the "CMAKE_INSTALL_PREFIX" variable is > hard-coded into the installed export file as the base for relative > references. > > * The "try_compile()" command source file signature now honors link > flags (e.g. "CMAKE_EXE_LINKER_FLAGS") in the generated test project. > See policy "CMP0056". > > * The "try_run()" command learned to honor the "LINK_LIBRARIES" > option just as "try_compile()" already does. > > * The "file(GENERATE)" command now generates the output file with > the same permissions as the input file if set. > > * The "file(GENERATE)" command can now generate files which are used > as source files for buildsystem targets. Generated files > automatically get their "GENERATED" property set to "TRUE". > > > Variables > --------- > > * The "CMAKE_MATCH_COUNT" variable was introduced to record the > number of matches made in the last regular expression matched in an > "if()" command or a "string()" command. > > > Properties > ---------- > > * An "ANDROID_API_MIN" target property was introduced to specify the > minimum version to be targeted by the toolchain. > > * A "VS_SHADER_FLAGS" source file property was added to specify > additional shader flags to ".hlsl" files, for the Visual Studio > generators. > > > Modules > ------- > > * The "ExternalData" module learned to support *Custom Fetch > Scripts*. This allows projects to specify custom ".cmake" scripts > for fetching data objects during the build. > > * The "ExternalProject" module learned options to create independent > external project step targets that do not depend on the builtin > steps. > > * The "ExternalProject" module "ExternalProject_Add()" command > learned a new "CMAKE_CACHE_DEFAULT_ARGS" option to initialize cache > values in the external project without setting them on future > builds. > > * The "ExternalProject" module "ExternalProject_Add()" command > learned a new "TEST_EXCLUDE_FROM_MAIN" option to exclude tests from > the main build. > > * The "ExternalProject" module "ExternalProject_Add()" command > learned a new "UPDATE_DISCONNECTED" option to avoid automatically > updating the source tree checkout from version control. > > * The "FindCUDA" module learned about the "cusolver" library in CUDA > 7.0. > > * The "FindGit" module learned to find the "git" command-line tool > that comes with GitHub for Windows installed in user home > directories. > > * A "FindGSL" module was introduced to find the GNU Scientific > Library. > > * A "FindIntl" module was introduced to find the Gettext "libintl" > library. > > * The "FindLATEX" module learned to support components. > > * The "FindMPI" module learned to find MS-MPI on Windows. > > * The "FindOpenSSL" module now reports "crypto" and "ssl" libraries > separately in "OPENSSL_CRYPTO_LIBRARY" and "OPENSSL_SSL_LIBRARY", > respectively, to allow applications to link to one without the > other. > > * The "WriteCompilerDetectionHeader" module learned to create a > define for portability of the "cxx_thread_local" feature. The define > expands to either the C++11 "thread_local" keyword, or a pre- > standardization compiler-specific equivalent, as appropriate. > > * The "WriteCompilerDetectionHeader" module learned to create > multiple output files per compiler and per language, instead of > creating one large file. > > > CTest > ----- > > * The "ctest_coverage()" command learned to support Delphi coverage. > > * The "ctest_coverage()" command learned to support Javascript > coverage. > > * The "CTestCoverageCollectGCOV" module was introduced as an > alternative to the "ctest_coverage()" command for collecting "gcov" > results for submission to CDash. > > > CPack > ----- > > * The "CPackRPM" module learned options to set per-component > descriptions and summaries. See the > "CPACK_RPM__PACKAGE_DESCRIPTION" and > "CPACK_RPM__PACKAGE_SUMMARY" variables. > > * The "CPackRPM" module learned options to specify requirements for > pre- and post-install scripts. See the > "CPACK_RPM_PACKAGE_REQUIRES_PRE" and > "CPACK_RPM_PACKAGE_REQUIRES_POST" variables. > > * The "CPackRPM" module learned options to specify requirements for > pre- and post-uninstall scripts. See the > "CPACK_RPM_PACKAGE_REQUIRES_PREUN" and > "CPACK_RPM_PACKAGE_REQUIRES_POSTUN" variables. > > * The "CPackRPM" module learned a new > "CPACK_RPM__PACKAGE_PREFIX" variable to specify a > component-specific value to use instead of > "CPACK_PACKAGING_INSTALL_PREFIX". > > * The "CPackRPM" module learned a new "CPACK_RPM_RELOCATION_PATHS" > variable to specify multiple relocation prefixes for a single rpm > package. > > > Other > ----- > > * The "cmake(1)" "-E tar" command now supports creating > ".xz"-compressed archives with the "J" flag. > > * The "cmake(1)" "-E tar" command learned a new "--files- > from=" option to specify file names using lines in a file to > overcome command-line length limits. > > * The "cmake(1)" "-E tar" command learned a new "--mtime=" > option to specify the modification time recorded in tarball entries. > > * The "Compile Features" functionality is now aware of features > supported by more compilers, including: > > * Apple Clang ("AppleClang") for Xcode versions 4.4 though 6.1. > > * GNU compiler versions 4.4 through 5.0 on UNIX and Apple ("GNU"). > > * Microsoft Visual Studio ("MSVC") for versions 2010 through 2015. > > * Oracle SolarisStudio ("SunPro") version 12.4. > > * The *AUTORCC* feature now tracks files listed in ".qrc" files as > dependencies. If an input file to the "rcc" tool is changed, the > tool is automatically re-run. > > > New Diagnostics > =============== > > * The "break()" command now rejects calls outside of a loop context > or that pass arguments to the command. See policy "CMP0055". > > > Deprecated and Removed Features > =============================== > > * Files written in the "cmake-language(7)", such as "CMakeLists.txt" > or "*.cmake" files, are now expected to be encoded as UTF-8. If > files are already ASCII, they will be compatible. If files were in > a different encoding, including Latin 1, they will need to be > converted. > > * The "FindOpenGL" module no longer explicitly searches for any > dependency on X11 libraries with the "FindX11" module. Such > dependencies should not need to be explicit. Applications using X11 > APIs themselves should find and link to X11 libraries explicitly. > > * The implementation of CMake now relies on some C++ compiler > features which are not supported by some older compilers. As a > result, those old compilers can no longer be used to build CMake > itself. CMake continues to be able to generate Makefiles and > project files for users of those old compilers however. Compilers > known to no longer be capable of building CMake are: > > * Visual Studio 6 and 7.0 -- superseded by VisualStudio 7.1 and > newer. > > * GCC 2.95 -- superseded by GCC 3 and newer compilers. > > * Borland compilers -- superseded by other Windows compilers. > > * Compaq compilers -- superseded by other compilers. > > * SGI compilers -- IRIX was dropped as a host platform. > > > Other Changes > ============= > > * On Windows and OS X, commands supporting network communication via > "https", such as "file(DOWNLOAD)", "file(UPLOAD)", and > "ctest_submit()", now support SSL/TLS even when CMake is not built > against OpenSSL. The Windows or OS X native SSL/TLS implementation > is used by default. OS-configured certificate authorities will be > trusted automatically. > > On other platforms, when CMake is built with OpenSSL, these commands > now search for OS-configured certificate authorities in a few "/etc" > paths to be trusted automatically. > > * On OS X with Makefile and Ninja generators, when a compiler is > found in "/usr/bin" it is now mapped to the corresponding compiler > inside the Xcode application folder, if any. This allows such build > trees to continue to work with their original compiler even when > "xcode- select" switches to a different Xcode installation. > > * The Visual Studio generators now write solution and project files > in UTF-8 instead of Windows-1252. Windows-1252 supported Latin 1 > languages such as those found in North and South America and Western > Europe. With UTF-8, additional languages are now supported. > > * The "Xcode" generator no longer requires a value for the > "CMAKE_MAKE_PROGRAM" variable to be located up front. It now locates > "xcodebuild" when needed at build time. > > * When building CMake itself using SolarisStudio 12, the default > "libCStd" standard library is not sufficient to build CMake. The > SolarisStudio distribution supports compiler options to use > "STLPort4" or "libstdc++". An appropriate option to select the > standard library is now added automatically when building CMake with > SolarisStudio compilers. > > ------------------------------------------------------------------- > > Changes made since CMake 3.1.0-rc1: > > Brad King (8): > Help: Revise configure_file documentation (#15403) > Help: In 3.2 relnotes move OpenGL/X11 to deprecated/removed section > Utilities/Release: Build OS X and Win binaries without OpenSSL > cmake-gui: Reset generator platform and toolset on configure (#15411) > FindJsonCpp: Drop new module due to upstream jsoncpp providing package > bootstrap: Add --(no-)system-jsoncpp options > FindCurses: Drop unused check for cbreak in tinfo library > CMake 3.2.0-rc2 > > Tiago St?rmer Daitx (1): > FindJNI: Add arch-specific library dir for JDK 9 layout (#15408) > -- > > 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 From robert.maynard at kitware.com Wed Feb 25 09:12:17 2015 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 25 Feb 2015 09:12:17 -0500 Subject: [cmake-developers] [ANNOUNCE] CMake 3.2.0-rc2 now ready for testing! In-Reply-To: References: Message-ID: Hi Roman, We do attach the short-log of all changes made between each RC version to the bottom of the annoucement. But here are the changes plus the git SHA1's for each ( produced with git log --no-merges --oneline v3.2.0-rc1..v3.2.0-rc2) 99575c9 CMake 3.2.0-rc2 b4005a3 FindCurses: Drop unused check for cbreak in tinfo library a41d621 bootstrap: Add --(no-)system-jsoncpp options a576844 FindJsonCpp: Drop new module due to upstream jsoncpp providing package 1ade687 cmake-gui: Reset generator platform and toolset on configure (#15411) 7e6608f Utilities/Release: Build OS X and Win binaries without OpenSSL bce4e20 FindJNI: Add arch-specific library dir for JDK 9 layout (#15408) 6d19ef9 Help: In 3.2 relnotes move OpenGL/X11 to deprecated/removed section 029d38f Help: Revise configure_file documentation (#15403) On Wed, Feb 25, 2015 at 9:07 AM, Roman W?ger wrote: > Hello Robert, > > is there a list which showing the changes between rc1 and rc2, to test such things explicitly? > > Regards > Roman > > >> Am 24.02.2015 um 16:01 schrieb Robert Maynard : >> >> I am proud to announce the CMake 3.2 second release candidate. >> >> Sources and binaries are available at: >> http://www.cmake.org/download/ >> http://www.cmake.org/files/v3.2/?C=M;O=D >> >> Documentation is available at: >> http://www.cmake.org/cmake/help/v3.2 >> >> Release notes appear below and are also published at >> http://www.cmake.org/cmake/help/v3.2/release/3.2.html >> Some of the more significant features of CMake 3.2 are: >> >> * CMake learned to support unicode characters *encoded as UTF-8* on >> Windows. This was already supported on platforms whose system APIs >> accept UTF-8 encoded strings. Unicode characters may now be used in >> CMake code, paths to source files, configured files such as ".h.in" >> files, and other files read and written by CMake. Note that because >> CMake interoperates with many other tools, there may still be some >> limitations when using certain unicode characters. >> >> * The "Compile Features" functionality is now aware of features >> supported by more compilers, including: >> >> * Apple Clang ("AppleClang") for Xcode versions 4.4 though 6.1. >> >> * GNU compiler versions 4.4 through 5.0 on UNIX and Apple ("GNU"). >> >> * Microsoft Visual Studio ("MSVC") for versions 2010 through 2015. >> >> * Oracle SolarisStudio ("SunPro") version 12.4. >> >> * The "add_custom_command()" and "add_custom_target()" commands >> learned a new "BYPRODUCTS" option to specify files produced as side >> effects of the custom commands. These are not outputs because they >> do not always have to be newer than inputs. >> >> * The "file(GENERATE)" command can now generate files which are used >> as source files for buildsystem targets. Generated files >> automatically get their "GENERATED" property set to "TRUE". >> >> Deprecated and Removed Features: >> >> * Files written in the "cmake-language(7)", such as "CMakeLists.txt" >> or "*.cmake" files, are now expected to be encoded as UTF-8. If >> files are already ASCII, they will be compatible. If files were in >> a different encoding, including Latin 1, they will need to be >> converted. >> >> * The "FindOpenGL" module no longer explicitly searches for any >> dependency on X11 libraries with the "FindX11" module. Such >> dependencies should not need to be explicit. Applications using X11 >> APIs themselves should find and link to X11 libraries explicitly. >> >> >> CMake 3.2 Release Notes >> *********************** >> >> Changes made since CMake 3.1 include the following. >> >> >> New Features >> ============ >> >> >> Syntax >> ------ >> >> * CMake learned to support unicode characters *encoded as UTF-8* on >> Windows. This was already supported on platforms whose system APIs >> accept UTF-8 encoded strings. Unicode characters may now be used in >> CMake code, paths to source files, configured files such as ".h.in" >> files, and other files read and written by CMake. Note that because >> CMake interoperates with many other tools, there may still be some >> limitations when using certain unicode characters. >> >> >> Commands >> -------- >> >> * The "add_custom_command()" and "add_custom_target()" commands >> learned a new "BYPRODUCTS" option to specify files produced as side >> effects of the custom commands. These are not outputs because they >> do not always have to be newer than inputs. >> >> * The "add_custom_command()" and "add_custom_target()" commands >> learned a new "USES_TERMINAL" option to request that the command be >> given direct access to the terminal if possible. The "Ninja" >> generator will places such commands in the "console" "pool". Build >> targets provided by CMake that are meant for individual interactive >> use, such as "install", are now placed in this pool. >> >> * A new "continue()" command was added that can be called inside >> loop contexts to end the current iteration and start the next one at >> the top of the loop block. >> >> * The "file(LOCK)" subcommand was created to allow CMake processes >> to synchronize through file and directory locks. >> >> * The "file(STRINGS)" now supports UTF-16LE, UTF-16BE, UTF-32LE, >> UTF- 32BE as "ENCODING" options. >> >> * The "install(EXPORT)" command now works with an absolute >> "DESTINATION" even if targets in the export set are installed with a >> destination or *usage requirements* specified relative to the >> install prefix. The value of the "CMAKE_INSTALL_PREFIX" variable is >> hard-coded into the installed export file as the base for relative >> references. >> >> * The "try_compile()" command source file signature now honors link >> flags (e.g. "CMAKE_EXE_LINKER_FLAGS") in the generated test project. >> See policy "CMP0056". >> >> * The "try_run()" command learned to honor the "LINK_LIBRARIES" >> option just as "try_compile()" already does. >> >> * The "file(GENERATE)" command now generates the output file with >> the same permissions as the input file if set. >> >> * The "file(GENERATE)" command can now generate files which are used >> as source files for buildsystem targets. Generated files >> automatically get their "GENERATED" property set to "TRUE". >> >> >> Variables >> --------- >> >> * The "CMAKE_MATCH_COUNT" variable was introduced to record the >> number of matches made in the last regular expression matched in an >> "if()" command or a "string()" command. >> >> >> Properties >> ---------- >> >> * An "ANDROID_API_MIN" target property was introduced to specify the >> minimum version to be targeted by the toolchain. >> >> * A "VS_SHADER_FLAGS" source file property was added to specify >> additional shader flags to ".hlsl" files, for the Visual Studio >> generators. >> >> >> Modules >> ------- >> >> * The "ExternalData" module learned to support *Custom Fetch >> Scripts*. This allows projects to specify custom ".cmake" scripts >> for fetching data objects during the build. >> >> * The "ExternalProject" module learned options to create independent >> external project step targets that do not depend on the builtin >> steps. >> >> * The "ExternalProject" module "ExternalProject_Add()" command >> learned a new "CMAKE_CACHE_DEFAULT_ARGS" option to initialize cache >> values in the external project without setting them on future >> builds. >> >> * The "ExternalProject" module "ExternalProject_Add()" command >> learned a new "TEST_EXCLUDE_FROM_MAIN" option to exclude tests from >> the main build. >> >> * The "ExternalProject" module "ExternalProject_Add()" command >> learned a new "UPDATE_DISCONNECTED" option to avoid automatically >> updating the source tree checkout from version control. >> >> * The "FindCUDA" module learned about the "cusolver" library in CUDA >> 7.0. >> >> * The "FindGit" module learned to find the "git" command-line tool >> that comes with GitHub for Windows installed in user home >> directories. >> >> * A "FindGSL" module was introduced to find the GNU Scientific >> Library. >> >> * A "FindIntl" module was introduced to find the Gettext "libintl" >> library. >> >> * The "FindLATEX" module learned to support components. >> >> * The "FindMPI" module learned to find MS-MPI on Windows. >> >> * The "FindOpenSSL" module now reports "crypto" and "ssl" libraries >> separately in "OPENSSL_CRYPTO_LIBRARY" and "OPENSSL_SSL_LIBRARY", >> respectively, to allow applications to link to one without the >> other. >> >> * The "WriteCompilerDetectionHeader" module learned to create a >> define for portability of the "cxx_thread_local" feature. The define >> expands to either the C++11 "thread_local" keyword, or a pre- >> standardization compiler-specific equivalent, as appropriate. >> >> * The "WriteCompilerDetectionHeader" module learned to create >> multiple output files per compiler and per language, instead of >> creating one large file. >> >> >> CTest >> ----- >> >> * The "ctest_coverage()" command learned to support Delphi coverage. >> >> * The "ctest_coverage()" command learned to support Javascript >> coverage. >> >> * The "CTestCoverageCollectGCOV" module was introduced as an >> alternative to the "ctest_coverage()" command for collecting "gcov" >> results for submission to CDash. >> >> >> CPack >> ----- >> >> * The "CPackRPM" module learned options to set per-component >> descriptions and summaries. See the >> "CPACK_RPM__PACKAGE_DESCRIPTION" and >> "CPACK_RPM__PACKAGE_SUMMARY" variables. >> >> * The "CPackRPM" module learned options to specify requirements for >> pre- and post-install scripts. See the >> "CPACK_RPM_PACKAGE_REQUIRES_PRE" and >> "CPACK_RPM_PACKAGE_REQUIRES_POST" variables. >> >> * The "CPackRPM" module learned options to specify requirements for >> pre- and post-uninstall scripts. See the >> "CPACK_RPM_PACKAGE_REQUIRES_PREUN" and >> "CPACK_RPM_PACKAGE_REQUIRES_POSTUN" variables. >> >> * The "CPackRPM" module learned a new >> "CPACK_RPM__PACKAGE_PREFIX" variable to specify a >> component-specific value to use instead of >> "CPACK_PACKAGING_INSTALL_PREFIX". >> >> * The "CPackRPM" module learned a new "CPACK_RPM_RELOCATION_PATHS" >> variable to specify multiple relocation prefixes for a single rpm >> package. >> >> >> Other >> ----- >> >> * The "cmake(1)" "-E tar" command now supports creating >> ".xz"-compressed archives with the "J" flag. >> >> * The "cmake(1)" "-E tar" command learned a new "--files- >> from=" option to specify file names using lines in a file to >> overcome command-line length limits. >> >> * The "cmake(1)" "-E tar" command learned a new "--mtime=" >> option to specify the modification time recorded in tarball entries. >> >> * The "Compile Features" functionality is now aware of features >> supported by more compilers, including: >> >> * Apple Clang ("AppleClang") for Xcode versions 4.4 though 6.1. >> >> * GNU compiler versions 4.4 through 5.0 on UNIX and Apple ("GNU"). >> >> * Microsoft Visual Studio ("MSVC") for versions 2010 through 2015. >> >> * Oracle SolarisStudio ("SunPro") version 12.4. >> >> * The *AUTORCC* feature now tracks files listed in ".qrc" files as >> dependencies. If an input file to the "rcc" tool is changed, the >> tool is automatically re-run. >> >> >> New Diagnostics >> =============== >> >> * The "break()" command now rejects calls outside of a loop context >> or that pass arguments to the command. See policy "CMP0055". >> >> >> Deprecated and Removed Features >> =============================== >> >> * Files written in the "cmake-language(7)", such as "CMakeLists.txt" >> or "*.cmake" files, are now expected to be encoded as UTF-8. If >> files are already ASCII, they will be compatible. If files were in >> a different encoding, including Latin 1, they will need to be >> converted. >> >> * The "FindOpenGL" module no longer explicitly searches for any >> dependency on X11 libraries with the "FindX11" module. Such >> dependencies should not need to be explicit. Applications using X11 >> APIs themselves should find and link to X11 libraries explicitly. >> >> * The implementation of CMake now relies on some C++ compiler >> features which are not supported by some older compilers. As a >> result, those old compilers can no longer be used to build CMake >> itself. CMake continues to be able to generate Makefiles and >> project files for users of those old compilers however. Compilers >> known to no longer be capable of building CMake are: >> >> * Visual Studio 6 and 7.0 -- superseded by VisualStudio 7.1 and >> newer. >> >> * GCC 2.95 -- superseded by GCC 3 and newer compilers. >> >> * Borland compilers -- superseded by other Windows compilers. >> >> * Compaq compilers -- superseded by other compilers. >> >> * SGI compilers -- IRIX was dropped as a host platform. >> >> >> Other Changes >> ============= >> >> * On Windows and OS X, commands supporting network communication via >> "https", such as "file(DOWNLOAD)", "file(UPLOAD)", and >> "ctest_submit()", now support SSL/TLS even when CMake is not built >> against OpenSSL. The Windows or OS X native SSL/TLS implementation >> is used by default. OS-configured certificate authorities will be >> trusted automatically. >> >> On other platforms, when CMake is built with OpenSSL, these commands >> now search for OS-configured certificate authorities in a few "/etc" >> paths to be trusted automatically. >> >> * On OS X with Makefile and Ninja generators, when a compiler is >> found in "/usr/bin" it is now mapped to the corresponding compiler >> inside the Xcode application folder, if any. This allows such build >> trees to continue to work with their original compiler even when >> "xcode- select" switches to a different Xcode installation. >> >> * The Visual Studio generators now write solution and project files >> in UTF-8 instead of Windows-1252. Windows-1252 supported Latin 1 >> languages such as those found in North and South America and Western >> Europe. With UTF-8, additional languages are now supported. >> >> * The "Xcode" generator no longer requires a value for the >> "CMAKE_MAKE_PROGRAM" variable to be located up front. It now locates >> "xcodebuild" when needed at build time. >> >> * When building CMake itself using SolarisStudio 12, the default >> "libCStd" standard library is not sufficient to build CMake. The >> SolarisStudio distribution supports compiler options to use >> "STLPort4" or "libstdc++". An appropriate option to select the >> standard library is now added automatically when building CMake with >> SolarisStudio compilers. >> >> ------------------------------------------------------------------- >> >> Changes made since CMake 3.1.0-rc1: >> >> Brad King (8): >> Help: Revise configure_file documentation (#15403) >> Help: In 3.2 relnotes move OpenGL/X11 to deprecated/removed section >> Utilities/Release: Build OS X and Win binaries without OpenSSL >> cmake-gui: Reset generator platform and toolset on configure (#15411) >> FindJsonCpp: Drop new module due to upstream jsoncpp providing package >> bootstrap: Add --(no-)system-jsoncpp options >> FindCurses: Drop unused check for cbreak in tinfo library >> CMake 3.2.0-rc2 >> >> Tiago St?rmer Daitx (1): >> FindJNI: Add arch-specific library dir for JDK 9 layout (#15408) >> -- >> >> 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 From mantis at public.kitware.com Wed Feb 25 09:38:16 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Wed, 25 Feb 2015 09:38:16 -0500 Subject: [cmake-developers] [CMake 0015418]: Wrong encoding for generated .sln Message-ID: <4f1e266a0ee9d3090ee70dd63a497e17@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15418 ====================================================================== Reported By: rhabarbersaft Assigned To: ====================================================================== Project: CMake Issue ID: 15418 Category: CMake Reproducibility: always Severity: major Priority: high Status: new ====================================================================== Date Submitted: 2015-02-25 09:38 EST Last Modified: 2015-02-25 09:38 EST ====================================================================== Summary: Wrong encoding for generated .sln Description: When generating Visual Studio 2008 projects using CMake 3.2.0-rc2, the generated solutions are UTF8-encoded. This leads to Visual Studio not opening them anymore when double-clicking on the .sln file. Changing the encoding of the .sln file to ANSI resolves the problem. The Visual Studio solutions should be generated using ANSI encoding to prevent this problem. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-25 09:38 rhabarbersaft New Issue ====================================================================== From brad.king at kitware.com Wed Feb 25 10:21:12 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 25 Feb 2015 10:21:12 -0500 Subject: [cmake-developers] KWSys patches In-Reply-To: <54EB6985.6020200@kitware.com> References: <54E20763.2070306@kitware.com> <54E24B99.3010709@kitware.com> <54EB6985.6020200@kitware.com> Message-ID: <54EDE868.406@kitware.com> On 02/23/2015 12:55 PM, Brad King wrote: > On 02/21/2015 04:33 PM, Domen Vrankar wrote: >> Attached are patches with fixed patch 3. > > Thanks. I'll start with the SystemTools change which I've split > out into its own commit and pushed here: > > http://review.source.kitware.com/#/c/19304/ That one is now in KWSys 'master'. Next I've taken the two cleanup changes: http://review.source.kitware.com/19315 http://review.source.kitware.com/19316 For the other two changes, please refactor things to avoid use of function-local classes. They will likely not work on the older compilers KWSys supports. Also, please use the coding style of "this->Member" when referencing class members from method code. Thanks, -Brad From brad.king at kitware.com Wed Feb 25 10:47:58 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 25 Feb 2015 10:47:58 -0500 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) In-Reply-To: References: <20150223184413.GA2033@megas.kitwarein.com> <20150224005032.GA11905@megas.kitwarein.com> <54ECE05F.10408@kitware.com> Message-ID: <54EDEEAE.8080308@kitware.com> On 02/24/2015 05:25 PM, Stephen Kelly wrote: >> Until that problem is solved we cannot make object libraries >> implicitly offer their objects just through tll(). > > Honestly, the problem is still not clear to me. Consider an object library with some usage requirements: add_library(objlib OBJECT ...) target_compile_definitions(objlib PUBLIC MYDEF) Now try using that library and assume that tll() takes the objects without explicit $ in the sources: add_library(mylib SHARED ...) target_link_libraries(mylib PUBLIC objlib) We link publicly to forward the usage requirements of objlib through mylib. Now consumers of mylib will get objlib's objects too. That is not desired. It is the same problem as transitive interface sources. My solution to that when first designing object libraries was to disallow the tll() altogether and require the consumer that wants the object files to reference them as $ sources explicitly. Of course that pre-dated usage requirements. Now we want to allow add_library(mylib SHARED ... $ ...) target_link_libraries(mylib PUBLIC objlib) to put the objects in mylib and also forward usage requirements. So long as the objlib does not have any INTERFACE_SOURCES then it will work well. What I envision for the future is: add_library(objlib OBJECT ...) target_compile_definitions(objlib PUBLIC MYDEF) target_sources(objlib INTERFACE $) That will allow consumers of objlib to get the objects through tll() just like any other INTERFACE_SOURCES. What I said in my previous response was that until the transitive interface sources problem is solved I'd rather not allow this. OTOH, since this population of INTERFACE_SOURCES is not automatic perhaps it is simplest and most consistent to go ahead and allow projects to do this. The problem will be no worse than for other interface sources. -Brad From roman.wueger at gmx.at Wed Feb 25 12:10:43 2015 From: roman.wueger at gmx.at (=?utf-8?Q?Roman_W=C3=BCger?=) Date: Wed, 25 Feb 2015 18:10:43 +0100 Subject: [cmake-developers] [ANNOUNCE] CMake 3.2.0-rc2 now ready for testing! In-Reply-To: References: Message-ID: <88A622F3-B593-4FCF-8357-3A6CD88EAF04@gmx.at> Thank you very much > Am 25.02.2015 um 15:12 schrieb Robert Maynard : > > Hi Roman, > > We do attach the short-log of all changes made between each RC version > to the bottom of the annoucement. But here are the changes plus the > git SHA1's for each ( produced with git log --no-merges --oneline > v3.2.0-rc1..v3.2.0-rc2) > > 99575c9 CMake 3.2.0-rc2 > b4005a3 FindCurses: Drop unused check for cbreak in tinfo library > a41d621 bootstrap: Add --(no-)system-jsoncpp options > a576844 FindJsonCpp: Drop new module due to upstream jsoncpp providing package > 1ade687 cmake-gui: Reset generator platform and toolset on configure (#15411) > 7e6608f Utilities/Release: Build OS X and Win binaries without OpenSSL > bce4e20 FindJNI: Add arch-specific library dir for JDK 9 layout (#15408) > 6d19ef9 Help: In 3.2 relnotes move OpenGL/X11 to deprecated/removed section > 029d38f Help: Revise configure_file documentation (#15403) > >> On Wed, Feb 25, 2015 at 9:07 AM, Roman W?ger wrote: >> Hello Robert, >> >> is there a list which showing the changes between rc1 and rc2, to test such things explicitly? >> >> Regards >> Roman >> >> >>> Am 24.02.2015 um 16:01 schrieb Robert Maynard : >>> >>> I am proud to announce the CMake 3.2 second release candidate. >>> >>> Sources and binaries are available at: >>> http://www.cmake.org/download/ >>> http://www.cmake.org/files/v3.2/?C=M;O=D >>> >>> Documentation is available at: >>> http://www.cmake.org/cmake/help/v3.2 >>> >>> Release notes appear below and are also published at >>> http://www.cmake.org/cmake/help/v3.2/release/3.2.html >>> Some of the more significant features of CMake 3.2 are: >>> >>> * CMake learned to support unicode characters *encoded as UTF-8* on >>> Windows. This was already supported on platforms whose system APIs >>> accept UTF-8 encoded strings. Unicode characters may now be used in >>> CMake code, paths to source files, configured files such as ".h.in" >>> files, and other files read and written by CMake. Note that because >>> CMake interoperates with many other tools, there may still be some >>> limitations when using certain unicode characters. >>> >>> * The "Compile Features" functionality is now aware of features >>> supported by more compilers, including: >>> >>> * Apple Clang ("AppleClang") for Xcode versions 4.4 though 6.1. >>> >>> * GNU compiler versions 4.4 through 5.0 on UNIX and Apple ("GNU"). >>> >>> * Microsoft Visual Studio ("MSVC") for versions 2010 through 2015. >>> >>> * Oracle SolarisStudio ("SunPro") version 12.4. >>> >>> * The "add_custom_command()" and "add_custom_target()" commands >>> learned a new "BYPRODUCTS" option to specify files produced as side >>> effects of the custom commands. These are not outputs because they >>> do not always have to be newer than inputs. >>> >>> * The "file(GENERATE)" command can now generate files which are used >>> as source files for buildsystem targets. Generated files >>> automatically get their "GENERATED" property set to "TRUE". >>> >>> Deprecated and Removed Features: >>> >>> * Files written in the "cmake-language(7)", such as "CMakeLists.txt" >>> or "*.cmake" files, are now expected to be encoded as UTF-8. If >>> files are already ASCII, they will be compatible. If files were in >>> a different encoding, including Latin 1, they will need to be >>> converted. >>> >>> * The "FindOpenGL" module no longer explicitly searches for any >>> dependency on X11 libraries with the "FindX11" module. Such >>> dependencies should not need to be explicit. Applications using X11 >>> APIs themselves should find and link to X11 libraries explicitly. >>> >>> >>> CMake 3.2 Release Notes >>> *********************** >>> >>> Changes made since CMake 3.1 include the following. >>> >>> >>> New Features >>> ============ >>> >>> >>> Syntax >>> ------ >>> >>> * CMake learned to support unicode characters *encoded as UTF-8* on >>> Windows. This was already supported on platforms whose system APIs >>> accept UTF-8 encoded strings. Unicode characters may now be used in >>> CMake code, paths to source files, configured files such as ".h.in" >>> files, and other files read and written by CMake. Note that because >>> CMake interoperates with many other tools, there may still be some >>> limitations when using certain unicode characters. >>> >>> >>> Commands >>> -------- >>> >>> * The "add_custom_command()" and "add_custom_target()" commands >>> learned a new "BYPRODUCTS" option to specify files produced as side >>> effects of the custom commands. These are not outputs because they >>> do not always have to be newer than inputs. >>> >>> * The "add_custom_command()" and "add_custom_target()" commands >>> learned a new "USES_TERMINAL" option to request that the command be >>> given direct access to the terminal if possible. The "Ninja" >>> generator will places such commands in the "console" "pool". Build >>> targets provided by CMake that are meant for individual interactive >>> use, such as "install", are now placed in this pool. >>> >>> * A new "continue()" command was added that can be called inside >>> loop contexts to end the current iteration and start the next one at >>> the top of the loop block. >>> >>> * The "file(LOCK)" subcommand was created to allow CMake processes >>> to synchronize through file and directory locks. >>> >>> * The "file(STRINGS)" now supports UTF-16LE, UTF-16BE, UTF-32LE, >>> UTF- 32BE as "ENCODING" options. >>> >>> * The "install(EXPORT)" command now works with an absolute >>> "DESTINATION" even if targets in the export set are installed with a >>> destination or *usage requirements* specified relative to the >>> install prefix. The value of the "CMAKE_INSTALL_PREFIX" variable is >>> hard-coded into the installed export file as the base for relative >>> references. >>> >>> * The "try_compile()" command source file signature now honors link >>> flags (e.g. "CMAKE_EXE_LINKER_FLAGS") in the generated test project. >>> See policy "CMP0056". >>> >>> * The "try_run()" command learned to honor the "LINK_LIBRARIES" >>> option just as "try_compile()" already does. >>> >>> * The "file(GENERATE)" command now generates the output file with >>> the same permissions as the input file if set. >>> >>> * The "file(GENERATE)" command can now generate files which are used >>> as source files for buildsystem targets. Generated files >>> automatically get their "GENERATED" property set to "TRUE". >>> >>> >>> Variables >>> --------- >>> >>> * The "CMAKE_MATCH_COUNT" variable was introduced to record the >>> number of matches made in the last regular expression matched in an >>> "if()" command or a "string()" command. >>> >>> >>> Properties >>> ---------- >>> >>> * An "ANDROID_API_MIN" target property was introduced to specify the >>> minimum version to be targeted by the toolchain. >>> >>> * A "VS_SHADER_FLAGS" source file property was added to specify >>> additional shader flags to ".hlsl" files, for the Visual Studio >>> generators. >>> >>> >>> Modules >>> ------- >>> >>> * The "ExternalData" module learned to support *Custom Fetch >>> Scripts*. This allows projects to specify custom ".cmake" scripts >>> for fetching data objects during the build. >>> >>> * The "ExternalProject" module learned options to create independent >>> external project step targets that do not depend on the builtin >>> steps. >>> >>> * The "ExternalProject" module "ExternalProject_Add()" command >>> learned a new "CMAKE_CACHE_DEFAULT_ARGS" option to initialize cache >>> values in the external project without setting them on future >>> builds. >>> >>> * The "ExternalProject" module "ExternalProject_Add()" command >>> learned a new "TEST_EXCLUDE_FROM_MAIN" option to exclude tests from >>> the main build. >>> >>> * The "ExternalProject" module "ExternalProject_Add()" command >>> learned a new "UPDATE_DISCONNECTED" option to avoid automatically >>> updating the source tree checkout from version control. >>> >>> * The "FindCUDA" module learned about the "cusolver" library in CUDA >>> 7.0. >>> >>> * The "FindGit" module learned to find the "git" command-line tool >>> that comes with GitHub for Windows installed in user home >>> directories. >>> >>> * A "FindGSL" module was introduced to find the GNU Scientific >>> Library. >>> >>> * A "FindIntl" module was introduced to find the Gettext "libintl" >>> library. >>> >>> * The "FindLATEX" module learned to support components. >>> >>> * The "FindMPI" module learned to find MS-MPI on Windows. >>> >>> * The "FindOpenSSL" module now reports "crypto" and "ssl" libraries >>> separately in "OPENSSL_CRYPTO_LIBRARY" and "OPENSSL_SSL_LIBRARY", >>> respectively, to allow applications to link to one without the >>> other. >>> >>> * The "WriteCompilerDetectionHeader" module learned to create a >>> define for portability of the "cxx_thread_local" feature. The define >>> expands to either the C++11 "thread_local" keyword, or a pre- >>> standardization compiler-specific equivalent, as appropriate. >>> >>> * The "WriteCompilerDetectionHeader" module learned to create >>> multiple output files per compiler and per language, instead of >>> creating one large file. >>> >>> >>> CTest >>> ----- >>> >>> * The "ctest_coverage()" command learned to support Delphi coverage. >>> >>> * The "ctest_coverage()" command learned to support Javascript >>> coverage. >>> >>> * The "CTestCoverageCollectGCOV" module was introduced as an >>> alternative to the "ctest_coverage()" command for collecting "gcov" >>> results for submission to CDash. >>> >>> >>> CPack >>> ----- >>> >>> * The "CPackRPM" module learned options to set per-component >>> descriptions and summaries. See the >>> "CPACK_RPM__PACKAGE_DESCRIPTION" and >>> "CPACK_RPM__PACKAGE_SUMMARY" variables. >>> >>> * The "CPackRPM" module learned options to specify requirements for >>> pre- and post-install scripts. See the >>> "CPACK_RPM_PACKAGE_REQUIRES_PRE" and >>> "CPACK_RPM_PACKAGE_REQUIRES_POST" variables. >>> >>> * The "CPackRPM" module learned options to specify requirements for >>> pre- and post-uninstall scripts. See the >>> "CPACK_RPM_PACKAGE_REQUIRES_PREUN" and >>> "CPACK_RPM_PACKAGE_REQUIRES_POSTUN" variables. >>> >>> * The "CPackRPM" module learned a new >>> "CPACK_RPM__PACKAGE_PREFIX" variable to specify a >>> component-specific value to use instead of >>> "CPACK_PACKAGING_INSTALL_PREFIX". >>> >>> * The "CPackRPM" module learned a new "CPACK_RPM_RELOCATION_PATHS" >>> variable to specify multiple relocation prefixes for a single rpm >>> package. >>> >>> >>> Other >>> ----- >>> >>> * The "cmake(1)" "-E tar" command now supports creating >>> ".xz"-compressed archives with the "J" flag. >>> >>> * The "cmake(1)" "-E tar" command learned a new "--files- >>> from=" option to specify file names using lines in a file to >>> overcome command-line length limits. >>> >>> * The "cmake(1)" "-E tar" command learned a new "--mtime=" >>> option to specify the modification time recorded in tarball entries. >>> >>> * The "Compile Features" functionality is now aware of features >>> supported by more compilers, including: >>> >>> * Apple Clang ("AppleClang") for Xcode versions 4.4 though 6.1. >>> >>> * GNU compiler versions 4.4 through 5.0 on UNIX and Apple ("GNU"). >>> >>> * Microsoft Visual Studio ("MSVC") for versions 2010 through 2015. >>> >>> * Oracle SolarisStudio ("SunPro") version 12.4. >>> >>> * The *AUTORCC* feature now tracks files listed in ".qrc" files as >>> dependencies. If an input file to the "rcc" tool is changed, the >>> tool is automatically re-run. >>> >>> >>> New Diagnostics >>> =============== >>> >>> * The "break()" command now rejects calls outside of a loop context >>> or that pass arguments to the command. See policy "CMP0055". >>> >>> >>> Deprecated and Removed Features >>> =============================== >>> >>> * Files written in the "cmake-language(7)", such as "CMakeLists.txt" >>> or "*.cmake" files, are now expected to be encoded as UTF-8. If >>> files are already ASCII, they will be compatible. If files were in >>> a different encoding, including Latin 1, they will need to be >>> converted. >>> >>> * The "FindOpenGL" module no longer explicitly searches for any >>> dependency on X11 libraries with the "FindX11" module. Such >>> dependencies should not need to be explicit. Applications using X11 >>> APIs themselves should find and link to X11 libraries explicitly. >>> >>> * The implementation of CMake now relies on some C++ compiler >>> features which are not supported by some older compilers. As a >>> result, those old compilers can no longer be used to build CMake >>> itself. CMake continues to be able to generate Makefiles and >>> project files for users of those old compilers however. Compilers >>> known to no longer be capable of building CMake are: >>> >>> * Visual Studio 6 and 7.0 -- superseded by VisualStudio 7.1 and >>> newer. >>> >>> * GCC 2.95 -- superseded by GCC 3 and newer compilers. >>> >>> * Borland compilers -- superseded by other Windows compilers. >>> >>> * Compaq compilers -- superseded by other compilers. >>> >>> * SGI compilers -- IRIX was dropped as a host platform. >>> >>> >>> Other Changes >>> ============= >>> >>> * On Windows and OS X, commands supporting network communication via >>> "https", such as "file(DOWNLOAD)", "file(UPLOAD)", and >>> "ctest_submit()", now support SSL/TLS even when CMake is not built >>> against OpenSSL. The Windows or OS X native SSL/TLS implementation >>> is used by default. OS-configured certificate authorities will be >>> trusted automatically. >>> >>> On other platforms, when CMake is built with OpenSSL, these commands >>> now search for OS-configured certificate authorities in a few "/etc" >>> paths to be trusted automatically. >>> >>> * On OS X with Makefile and Ninja generators, when a compiler is >>> found in "/usr/bin" it is now mapped to the corresponding compiler >>> inside the Xcode application folder, if any. This allows such build >>> trees to continue to work with their original compiler even when >>> "xcode- select" switches to a different Xcode installation. >>> >>> * The Visual Studio generators now write solution and project files >>> in UTF-8 instead of Windows-1252. Windows-1252 supported Latin 1 >>> languages such as those found in North and South America and Western >>> Europe. With UTF-8, additional languages are now supported. >>> >>> * The "Xcode" generator no longer requires a value for the >>> "CMAKE_MAKE_PROGRAM" variable to be located up front. It now locates >>> "xcodebuild" when needed at build time. >>> >>> * When building CMake itself using SolarisStudio 12, the default >>> "libCStd" standard library is not sufficient to build CMake. The >>> SolarisStudio distribution supports compiler options to use >>> "STLPort4" or "libstdc++". An appropriate option to select the >>> standard library is now added automatically when building CMake with >>> SolarisStudio compilers. >>> >>> ------------------------------------------------------------------- >>> >>> Changes made since CMake 3.1.0-rc1: >>> >>> Brad King (8): >>> Help: Revise configure_file documentation (#15403) >>> Help: In 3.2 relnotes move OpenGL/X11 to deprecated/removed section >>> Utilities/Release: Build OS X and Win binaries without OpenSSL >>> cmake-gui: Reset generator platform and toolset on configure (#15411) >>> FindJsonCpp: Drop new module due to upstream jsoncpp providing package >>> bootstrap: Add --(no-)system-jsoncpp options >>> FindCurses: Drop unused check for cbreak in tinfo library >>> CMake 3.2.0-rc2 >>> >>> Tiago St?rmer Daitx (1): >>> FindJNI: Add arch-specific library dir for JDK 9 layout (#15408) >>> -- >>> >>> 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 From gjasny at googlemail.com Wed Feb 25 12:38:51 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Wed, 25 Feb 2015 18:38:51 +0100 Subject: [cmake-developers] Ninja Generator and CMAKE_VERBOSE_MAKEFILE Message-ID: <54EE08AB.4000709@googlemail.com> Hello, For our CI and production build we call cmake --build to execute the actual build. To be able to examine the build logs we added -DCMAKE_VERBOSE_MAKEFILE=ON to the configuration step. This worked as expected for the Makefile generator but is ignored for Ninja. As far as I understand the code, the Makefile generator adds a VERBOSE statement to the Makefile so that make automatically switches to verbose mode when being executed. Unfortunately Ninja has no equivalent option. As a work-around would it be possible that cmake --build examines the cache, detects CMAKE_VERBOSE_MAKEFILE=ON and adds a -v to the Ninja invocation? If you think that this is a reasonable approach could you please give me some pointers where to insert the necessary code? Thanks, Gregor From brad.king at kitware.com Wed Feb 25 14:30:42 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 25 Feb 2015 14:30:42 -0500 Subject: [cmake-developers] Ninja Generator and CMAKE_VERBOSE_MAKEFILE In-Reply-To: <54EE08AB.4000709@googlemail.com> References: <54EE08AB.4000709@googlemail.com> Message-ID: <54EE22E2.6010403@kitware.com> On 02/25/2015 12:38 PM, Gregor Jasny wrote: > Ninja has no equivalent option. > > As a work-around would it be possible that cmake --build examines the > cache, detects CMAKE_VERBOSE_MAKEFILE=ON and adds a -v to the Ninja > invocation? If you know that the build tree was generated with the Ninja generator then you can do cmake --build . -- -v to pass the flag to ninja. Of course if you knew that then you could always run "ninja -v" instead of using "cmake --build" ;) > As a work-around would it be possible that cmake --build examines the > cache, detects CMAKE_VERBOSE_MAKEFILE=ON and adds a -v to the Ninja > invocation? > > If you think that this is a reasonable approach could you please give me > some pointers where to insert the necessary code? Yes, I think that is reasonable if the above is not sufficient. The cmake::Build method in Source/cmake.cxx loads the cache already to get CMAKE_GENERATOR and create the generator, which is then used to compute the generator-specific build command. You could extract CMAKE_VERBOSE_MAKEFILE there too and extend the signatures of the methods as necessary to thread the value through. -Brad From ben.boeckel at kitware.com Wed Feb 25 14:49:03 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 25 Feb 2015 14:49:03 -0500 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) In-Reply-To: <20150223184413.GA2033@megas.kitwarein.com> References: <20150223184413.GA2033@megas.kitwarein.com> Message-ID: <20150225194903.GA9043@megas.kitwarein.com> On Mon, Feb 23, 2015 at 13:44:13 -0500, Ben Boeckel wrote: After discussion with Brad here, the current, tentative, plan is as follows: - When creating $ generator expressions, if the name is a target, add $ as well. This will help the exporter find targets which need exporting from the build. - When exporting, if $> is found and ifacelib has no link interface, remove the entire expression. This will address bug #15415 so that interface libraries linked with PRIVATE can stay unexported. This will at least allow the INTERFACE-for-OBJECT use case work for PRIVATE usage of them. For the OBJECT library half of this: - Add support for tll(objlib foo) and tll(foo objlib); tll(objlib1 objlib2) will be unsupported for now; implementation for it can come later as there are could be other issues with that case. - Use $ for PRIVATE libraries in the INTERFACE of object libraries (will use the same code path as static libraries here). - When exporting, if an OBJECT library is found to be referenced such that it also needs to be exported, add it to the current export set as an INTERFACE library with all of the interface properties of the object library. * The above check for stripping LINK_ONLY will also do so for object libraries. * Targets exported this way will be placed in the same export set as the target which triggered it and will share a namespace, export set, etc. The name will be mangled as it is purely an implementation detail. * Manually exporting object libraries will still be disallowed. Things that crossed my mind since the discussion (or were mentioned before but not resolved completely): - Make it an error to use a non-empty INTERFACE_SOURCES for object libraries (a new policy). - When exporting the object library's interface, empty INTERFACE_SOURCES regardless of the above policy ($ will only cause errors on the now-INTERFACE library). Stripping it in the common case is possible, but it could be deep in genex conditions and not able to be found. Another, much lower priority, branch (only tangentially related to either of the above) would be to make the following work as one would expect: add_library(A OBJECT a.c) add_library(B OBJECT b.c $) add_library(C SHARED c.c $) Where $ would bring in $ as well (currently OBJECT libraries may not have TARGET_OBJECTS as sources). I have a patch for the implementation of this already if anyone else would like to add the tests and docs for it before I get around to it. Thoughts? --Ben From gjasny at googlemail.com Wed Feb 25 15:07:42 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Wed, 25 Feb 2015 21:07:42 +0100 Subject: [cmake-developers] [PATCH v6 0/2] Add XCTest Bundle Support In-Reply-To: <54EB6EEF.7030402@kitware.com> References: <54EB6EEF.7030402@kitware.com> Message-ID: <1424894864-32527-1-git-send-email-gjasny@googlemail.com> Hello, this series contains the latest XCTest patches. Changes since v5: * Rebased against master (could drop two applied patches) * kept help modules list sorted * indirected xctest wiring Thanks, Gregor Gregor Jasny (2): Add handling for XCTest bundles Add XCTest example to test Frameworks and Cocoa App Bundles Help/manual/cmake-modules.7.rst | 1 + Help/manual/cmake-properties.7.rst | 1 + Help/module/XCTestUtilities.rst | 1 + Help/prop_tgt/XCTEST.rst | 13 + Help/release/dev/xcode-xctest.rst | 6 + Modules/XCTestUtilities.cmake | 123 ++++ Source/cmGlobalXCodeGenerator.cxx | 12 +- Source/cmTarget.cxx | 16 +- Source/cmTarget.h | 3 + Tests/CMakeLists.txt | 13 + Tests/XCTest/CMakeLists.txt | 62 ++ Tests/XCTest/CocoaExample/AppDelegate.h | 7 + Tests/XCTest/CocoaExample/AppDelegate.m | 18 + Tests/XCTest/CocoaExample/Info.plist | 30 + Tests/XCTest/CocoaExample/MainMenu.xib | 680 +++++++++++++++++++++ Tests/XCTest/CocoaExample/main.m | 5 + Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m | 13 + Tests/XCTest/FrameworkExample/FrameworkExample.c | 6 + Tests/XCTest/FrameworkExample/FrameworkExample.h | 1 + Tests/XCTest/FrameworkExample/Info.plist | 28 + .../FrameworkExampleTests/FrameworkExampleTests.m | 16 + Tests/XCTest/FrameworkExampleTests/Info.plist | 24 + 22 files changed, 1076 insertions(+), 3 deletions(-) create mode 100644 Help/module/XCTestUtilities.rst create mode 100644 Help/prop_tgt/XCTEST.rst create mode 100644 Help/release/dev/xcode-xctest.rst create mode 100644 Modules/XCTestUtilities.cmake create mode 100644 Tests/XCTest/CMakeLists.txt create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.h create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.m create mode 100644 Tests/XCTest/CocoaExample/Info.plist create mode 100644 Tests/XCTest/CocoaExample/MainMenu.xib create mode 100644 Tests/XCTest/CocoaExample/main.m create mode 100644 Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.c create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.h create mode 100644 Tests/XCTest/FrameworkExample/Info.plist create mode 100644 Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m create mode 100644 Tests/XCTest/FrameworkExampleTests/Info.plist -- 2.3.0 From gjasny at googlemail.com Wed Feb 25 15:07:43 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Wed, 25 Feb 2015 21:07:43 +0100 Subject: [cmake-developers] [PATCH v6 1/2] Add handling for XCTest bundles In-Reply-To: <1424894864-32527-1-git-send-email-gjasny@googlemail.com> References: <54EB6EEF.7030402@kitware.com> <1424894864-32527-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424894864-32527-2-git-send-email-gjasny@googlemail.com> An XCTest bundle is a CFBundle with a special product-type and bundle extension. For more information about XCTest visit the Mac Developer library at: http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/ Signed-off-by: Gregor Jasny --- Help/manual/cmake-modules.7.rst | 1 + Help/manual/cmake-properties.7.rst | 1 + Help/module/XCTestUtilities.rst | 1 + Help/prop_tgt/XCTEST.rst | 13 ++++ Help/release/dev/xcode-xctest.rst | 6 ++ Modules/XCTestUtilities.cmake | 123 +++++++++++++++++++++++++++++++++++++ Source/cmGlobalXCodeGenerator.cxx | 12 +++- Source/cmTarget.cxx | 16 ++++- Source/cmTarget.h | 3 + 9 files changed, 173 insertions(+), 3 deletions(-) create mode 100644 Help/module/XCTestUtilities.rst create mode 100644 Help/prop_tgt/XCTEST.rst create mode 100644 Help/release/dev/xcode-xctest.rst create mode 100644 Modules/XCTestUtilities.cmake diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 2b26cc9..a2a2d24 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -241,3 +241,4 @@ All Modules /module/Use_wxWindows /module/WriteBasicConfigVersionFile /module/WriteCompilerDetectionHeader + /module/XCTestUtilities diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 19fdf23..1dff33e 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -243,6 +243,7 @@ Properties on Targets /prop_tgt/VS_WINRT_REFERENCES /prop_tgt/WIN32_EXECUTABLE /prop_tgt/XCODE_ATTRIBUTE_an-attribute + /prop_tgt/XCTEST Properties on Tests =================== diff --git a/Help/module/XCTestUtilities.rst b/Help/module/XCTestUtilities.rst new file mode 100644 index 0000000..c96f515 --- /dev/null +++ b/Help/module/XCTestUtilities.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../Modules/XCTestUtilities.cmake diff --git a/Help/prop_tgt/XCTEST.rst b/Help/prop_tgt/XCTEST.rst new file mode 100644 index 0000000..8a2ef8b --- /dev/null +++ b/Help/prop_tgt/XCTEST.rst @@ -0,0 +1,13 @@ +XCTEST +------ + +This target is a XCTest CFBundle on the Mac. + +This property will usually get set via the ``add_xctest`` macro in +:module:`XCTestUtilities` module. + +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 depends on :prop_tgt:`BUNDLE` to be effective. diff --git a/Help/release/dev/xcode-xctest.rst b/Help/release/dev/xcode-xctest.rst new file mode 100644 index 0000000..af9f705 --- /dev/null +++ b/Help/release/dev/xcode-xctest.rst @@ -0,0 +1,6 @@ +Xcode XCTest Support +-------------------- + +* CMake gained the abiltity to create XCTest bundles to test + Frameworks and App Bundles within Xcode. The :module:`XCTestUtilities` + module provides convenience functions to handle :prop_tgt:`XCTEST` bundles. diff --git a/Modules/XCTestUtilities.cmake b/Modules/XCTestUtilities.cmake new file mode 100644 index 0000000..0ff648c --- /dev/null +++ b/Modules/XCTestUtilities.cmake @@ -0,0 +1,123 @@ +#.rst: +# XCTestUtilities +# --------------- +# +# Functions to help creating and executing XCTest bundles. +# +# An XCTest bundle is a CFBundle with a special product-type +# and bundle extension. For more information about XCTest visit +# the Mac Developer library at: +# http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/ +# +# The following functions are provided by this module: +# +# :: +# +# add_xctest +# add_test_xctest +# +# :: +# +# add_xctest( ) +# +# Create a XCTest bundle named which will test the target +# . Supported target types for testee are Frameworks and +# App Bundles. +# +# :: +# +# add_test_xctest( ) +# +# Add an XCTest bundle to the project to be run by :manual:`ctest(1)`. +# The test will be named and tests . + +#============================================================================= +# Copyright 2015 Gregor Jasny +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +function(add_xctest target testee) + + if(NOT CMAKE_OSX_SYSROOT) + message(STATUS "Adding XCTest bundles requires CMAKE_OSX_SYSROOT to be set.") + endif() + + # check that testee is a valid target type + get_target_property(TESTEE_TYPE ${testee} TYPE) + get_target_property(TESTEE_FRAMEWORK ${testee} FRAMEWORK) + get_target_property(TESTEE_MACOSX_BUNDLE ${testee} MACOSX_BUNDLE) + + if(TESTEE_TYPE STREQUAL "SHARED_LIBRARY" AND TESTEE_FRAMEWORK) + # found a framework + elseif(TESTEE_TYPE STREQUAL "EXECUTABLE" AND TESTEE_MACOSX_BUNDLE) + # found an app bundle + else() + message(FATAL_ERROR "Testee ${testee} is of unsupported type: ${TESTEE_TYPE}") + endif() + + add_library(${target} MODULE ${ARGN}) + + set_target_properties(${target} PROPERTIES + BUNDLE TRUE + XCTEST TRUE) + + find_library(FOUNDATION_LIBRARY Foundation) + if(NOT FOUNDATION_LIBRARY) + message(STATUS "Could not find Foundation Framework.") + endif() + + find_library(XCTEST_LIBRARY XCTest) + if(NOT XCTEST_LIBRARY) + message(STATUS "Could not find XCTest Framework.") + endif() + + target_link_libraries(${target} PRIVATE ${FOUNDATION_LIBRARY} ${XCTEST_LIBRARY}) + mark_as_advanced(FOUNDATION_LIBRARY XCTEST_LIBRARY) + + if(TESTEE_TYPE STREQUAL "SHARED_LIBRARY" AND TESTEE_FRAMEWORK) + set_target_properties(${testee} PROPERTIES + BUILD_WITH_INSTALL_RPATH TRUE + INSTALL_NAME_DIR "@rpath") + + target_link_libraries(${target} PRIVATE ${testee}) + elseif(TESTEE_TYPE STREQUAL "EXECUTABLE" AND TESTEE_MACOSX_BUNDLE) + add_dependencies(${target} ${testee}) + if(XCODE) + set_target_properties(${target} PROPERTIES + XCODE_ATTRIBUTE_BUNDLE_LOADER "$(TEST_HOST)" + XCODE_ATTRIBUTE_TEST_HOST "$") + else(XCODE) + target_link_libraries(${target} PRIVATE "-bundle_loader $") + endif(XCODE) + endif() +endfunction(add_xctest) + +function(add_test_xctest name target) + get_target_property(TARGET_TYPE ${target} TYPE) + get_target_property(TARGET_XCTEST ${target} XCTEST) + + if(NOT TARGET_TYPE STREQUAL "MODULE_LIBRARY" OR NOT TARGET_XCTEST) + message(FATAL_ERROR "Test ${target} is not a XCTest") + endif() + + execute_process( + COMMAND xcrun --find xctest + OUTPUT_VARIABLE XCTEST_EXECUTABLE + OUTPUT_STRIP_TRAILING_WHITESPACE) + + if(NOT XCTEST_EXECUTABLE) + message(STATUS "Unable to finc xctest binary.") + endif() + + add_test( + NAME ${name} + COMMAND ${XCTEST_EXECUTABLE} $/../..) +endfunction(add_test_xctest) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index aea134e..784bc24 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -804,6 +804,10 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext, { sourcecode = "compiled.mach-o.objfile"; } + else if(ext == "xctest") + { + sourcecode = "wrapper.cfbundle"; + } else if(ext == "xib") { keepLastKnownFileType = true; @@ -2598,7 +2602,9 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget) case cmTarget::STATIC_LIBRARY: return "archive.ar"; case cmTarget::MODULE_LIBRARY: - if (cmtarget.IsCFBundleOnApple()) + if (cmtarget.IsXCTestOnApple()) + return "wrapper.cfbundle"; + else if (cmtarget.IsCFBundleOnApple()) return "wrapper.plug-in"; else return ((this->XcodeVersion >= 22)? @@ -2622,7 +2628,9 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(cmTarget& cmtarget) case cmTarget::STATIC_LIBRARY: return "com.apple.product-type.library.static"; case cmTarget::MODULE_LIBRARY: - if (cmtarget.IsCFBundleOnApple()) + if (cmtarget.IsXCTestOnApple()) + return "com.apple.product-type.bundle.unit-test"; + else if (cmtarget.IsCFBundleOnApple()) return "com.apple.product-type.bundle"; else return ((this->XcodeVersion >= 22)? diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index e046bef..6753895 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -615,6 +615,13 @@ bool cmTarget::IsCFBundleOnApple() const } //---------------------------------------------------------------------------- +bool cmTarget::IsXCTestOnApple() const +{ + return (this->IsCFBundleOnApple() && + this->GetPropertyAsBool("XCTEST")); +} + +//---------------------------------------------------------------------------- bool cmTarget::IsBundleOnApple() const { return this->IsFrameworkOnApple() || this->IsAppBundleOnApple() || @@ -6774,7 +6781,14 @@ std::string cmTarget::GetCFBundleDirectory(const std::string& config, const char *ext = this->GetProperty("BUNDLE_EXTENSION"); if (!ext) { - ext = "bundle"; + if (this->IsXCTestOnApple()) + { + ext = "xctest"; + } + else + { + ext = "bundle"; + } } fpath += ext; fpath += "/Contents"; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index ddd9859..b58e0a0 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -526,6 +526,9 @@ public: /** Return whether this target is a CFBundle (plugin) on Apple. */ bool IsCFBundleOnApple() const; + /** Return whether this target is a XCTest on Apple. */ + bool IsXCTestOnApple() const; + /** Return whether this target is an executable Bundle on Apple. */ bool IsAppBundleOnApple() const; -- 2.3.0 From gjasny at googlemail.com Wed Feb 25 15:07:44 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Wed, 25 Feb 2015 21:07:44 +0100 Subject: [cmake-developers] [PATCH v6 2/2] Add XCTest example to test Frameworks and Cocoa App Bundles In-Reply-To: <1424894864-32527-1-git-send-email-gjasny@googlemail.com> References: <54EB6EEF.7030402@kitware.com> <1424894864-32527-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424894864-32527-3-git-send-email-gjasny@googlemail.com> Signed-off-by: Gregor Jasny --- Tests/CMakeLists.txt | 13 + Tests/XCTest/CMakeLists.txt | 62 ++ Tests/XCTest/CocoaExample/AppDelegate.h | 7 + Tests/XCTest/CocoaExample/AppDelegate.m | 18 + Tests/XCTest/CocoaExample/Info.plist | 30 + Tests/XCTest/CocoaExample/MainMenu.xib | 680 +++++++++++++++++++++ Tests/XCTest/CocoaExample/main.m | 5 + Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m | 13 + Tests/XCTest/FrameworkExample/FrameworkExample.c | 6 + Tests/XCTest/FrameworkExample/FrameworkExample.h | 1 + Tests/XCTest/FrameworkExample/Info.plist | 28 + .../FrameworkExampleTests/FrameworkExampleTests.m | 16 + Tests/XCTest/FrameworkExampleTests/Info.plist | 24 + 13 files changed, 903 insertions(+) create mode 100644 Tests/XCTest/CMakeLists.txt create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.h create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.m create mode 100644 Tests/XCTest/CocoaExample/Info.plist create mode 100644 Tests/XCTest/CocoaExample/MainMenu.xib create mode 100644 Tests/XCTest/CocoaExample/main.m create mode 100644 Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.c create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.h create mode 100644 Tests/XCTest/FrameworkExample/Info.plist create mode 100644 Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m create mode 100644 Tests/XCTest/FrameworkExampleTests/Info.plist diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 08765de..6afedf2 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3064,4 +3064,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(NOT CMake_TEST_EXTERNAL_CMAKE) add_subdirectory(CMakeTests) endif() + + if(XCODE_VERSION AND NOT "${XCODE_VERSION}" VERSION_LESS 5) + add_test(XCTest ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/XCTest" + "${CMake_BINARY_DIR}/Tests/XCTest" + ${build_generator_args} + --build-project XCTest + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE} -V + ) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/XCTest") + endif() endif() diff --git a/Tests/XCTest/CMakeLists.txt b/Tests/XCTest/CMakeLists.txt new file mode 100644 index 0000000..e13d126 --- /dev/null +++ b/Tests/XCTest/CMakeLists.txt @@ -0,0 +1,62 @@ +cmake_minimum_required(VERSION 3.1) +project(XCTest) +enable_testing() + +set(CMAKE_SKIP_RPATH OFF) + +include(XCTestUtilities) + +# Framework + +add_library(FrameworkExample SHARED + FrameworkExample/FrameworkExample.c + FrameworkExample/FrameworkExample.h + FrameworkExample/Info.plist) + +target_include_directories(FrameworkExample PUBLIC .) + +set_target_properties(FrameworkExample PROPERTIES + FRAMEWORK TRUE + VERSION "1.0.0" + SOVERSION "1.0.0" + FRAMEWORK_VERSION "A" + MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/FrameworkExample/Info.plist + PUBLIC_HEADER FrameworkExample/FrameworkExample.h) + +# XCTest for Framework + +add_xctest(FrameworkExampleTests FrameworkExample + FrameworkExampleTests/FrameworkExampleTests.m + FrameworkExampleTests/Info.plist) + +set_target_properties(FrameworkExampleTests PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/FrameworkExampleTests/Info.plist + ) + +add_test_xctest(XCTest.FrameworkExample FrameworkExampleTests) + +# Cocoa App Bundle + +add_executable(CocoaExample MACOSX_BUNDLE + CocoaExample/main.m + CocoaExample/AppDelegate.m + CocoaExample/AppDelegate.h + CocoaExample/MainMenu.xib +) + +find_library(FOUNDATION_LIBRARY Foundation) +find_library(APPKIT_LIBRARY AppKit) +mark_as_advanced(FOUNDATION_LIBRARY APPKIT_LIBRARY) + +target_link_libraries(CocoaExample PRIVATE ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY}) + +set_target_properties(CocoaExample PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/CocoaExample/Info.plist + RESOURCE "CocoaExample/MainMenu.xib") + +# XCTest for Cocoa App Bundle + +add_xctest(CocoaExampleTests CocoaExample + CocoaExampleTests/CocoaExampleTests.m) + +add_test_xctest(XCTest.CocoaExample CocoaExampleTests) diff --git a/Tests/XCTest/CocoaExample/AppDelegate.h b/Tests/XCTest/CocoaExample/AppDelegate.h new file mode 100644 index 0000000..69b6e0f --- /dev/null +++ b/Tests/XCTest/CocoaExample/AppDelegate.h @@ -0,0 +1,7 @@ +#import + + at interface AppDelegate : NSObject + + + at end + diff --git a/Tests/XCTest/CocoaExample/AppDelegate.m b/Tests/XCTest/CocoaExample/AppDelegate.m new file mode 100644 index 0000000..07af62f --- /dev/null +++ b/Tests/XCTest/CocoaExample/AppDelegate.m @@ -0,0 +1,18 @@ +#import "AppDelegate.h" + + at interface AppDelegate () + + at property (assign) IBOutlet NSWindow *window; + at end + + at implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application +} + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + + at end diff --git a/Tests/XCTest/CocoaExample/Info.plist b/Tests/XCTest/CocoaExample/Info.plist new file mode 100644 index 0000000..5267c63 --- /dev/null +++ b/Tests/XCTest/CocoaExample/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + CocoaExample + CFBundleIconFile + + CFBundleIdentifier + org.cmake.CocoaExample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + CocoaExample + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/Tests/XCTest/CocoaExample/MainMenu.xib b/Tests/XCTest/CocoaExample/MainMenu.xib new file mode 100644 index 0000000..9498a0a --- /dev/null +++ b/Tests/XCTest/CocoaExample/MainMenu.xib @@ -0,0 +1,680 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/XCTest/CocoaExample/main.m b/Tests/XCTest/CocoaExample/main.m new file mode 100644 index 0000000..8a6799b --- /dev/null +++ b/Tests/XCTest/CocoaExample/main.m @@ -0,0 +1,5 @@ +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m b/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m new file mode 100644 index 0000000..70d61d6 --- /dev/null +++ b/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m @@ -0,0 +1,13 @@ +#import + + at interface CocoaExampleTests : XCTestCase + + at end + + at implementation CocoaExampleTests + +- (void)testExample { + XCTAssert(YES, @"Pass"); +} + + at end diff --git a/Tests/XCTest/FrameworkExample/FrameworkExample.c b/Tests/XCTest/FrameworkExample/FrameworkExample.c new file mode 100644 index 0000000..2da78da --- /dev/null +++ b/Tests/XCTest/FrameworkExample/FrameworkExample.c @@ -0,0 +1,6 @@ +#include "FrameworkExample.h" + +int FourtyTwo() +{ + return 42; +} diff --git a/Tests/XCTest/FrameworkExample/FrameworkExample.h b/Tests/XCTest/FrameworkExample/FrameworkExample.h new file mode 100644 index 0000000..2e0b499 --- /dev/null +++ b/Tests/XCTest/FrameworkExample/FrameworkExample.h @@ -0,0 +1 @@ +int FourtyTwo(); diff --git a/Tests/XCTest/FrameworkExample/Info.plist b/Tests/XCTest/FrameworkExample/Info.plist new file mode 100644 index 0000000..a22acea --- /dev/null +++ b/Tests/XCTest/FrameworkExample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + FrameworkExample + CFBundleIdentifier + org.cmake.FrameworkExample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + FrameworkExample + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + + NSHumanReadableCopyright + + NSPrincipalClass + + + diff --git a/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m b/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m new file mode 100644 index 0000000..7cba23e --- /dev/null +++ b/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m @@ -0,0 +1,16 @@ +#import + +#import "FrameworkExample/FrameworkExample.h" + + at interface FrameworkExampleTests : XCTestCase + + at end + + at implementation FrameworkExampleTests + +- (void)testFourtyTwo { + // This is an example of a functional test case. + XCTAssertEqual(42, FourtyTwo()); +} + + at end diff --git a/Tests/XCTest/FrameworkExampleTests/Info.plist b/Tests/XCTest/FrameworkExampleTests/Info.plist new file mode 100644 index 0000000..293921b --- /dev/null +++ b/Tests/XCTest/FrameworkExampleTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + FrameworkExampleTests + CFBundleIdentifier + org.cmake.FrameworkExampleTests + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + FrameworkExampleTests + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + -- 2.3.0 From gjasny at googlemail.com Wed Feb 25 16:24:06 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Wed, 25 Feb 2015 22:24:06 +0100 Subject: [cmake-developers] [PATCH] Pass CMAKE_VERBOSE_MAKEFILE value to Ninja Generator In-Reply-To: <54EE22E2.6010403@kitware.com> References: <54EE22E2.6010403@kitware.com> Message-ID: <1424899446-55717-1-git-send-email-gjasny@googlemail.com> Ninja build system does not support a in-Makefile verbositiy switch. So we use cmake --build as a fall back to extract the CMAKE_VERBOSE_MAKEFILE property and pass it as an optional -v argument to Ninja. Signed-off-by: Gregor Jasny --- Source/cmGlobalGenerator.cxx | 2 ++ Source/cmGlobalGenerator.h | 5 +++++ Source/cmGlobalNinjaGenerator.cxx | 5 +++++ Source/cmake.cxx | 5 +++++ 4 files changed, 17 insertions(+) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 6147009..0a4e60a 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -69,6 +69,8 @@ cmGlobalGenerator::cmGlobalGenerator() this->ExtraGenerator = 0; this->CurrentLocalGenerator = 0; this->TryCompileOuterMakefile = 0; + + this->VerboseBuild = false; } cmGlobalGenerator::~cmGlobalGenerator() diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 08f061a..1e948f3 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -349,6 +349,9 @@ public: std::set const& GetFilenameTargetDepends(cmSourceFile* sf) const; + void SetVerboseBuild(bool verbose) { this->VerboseBuild = verbose; } + bool GetVerboseBuild() const { return this->VerboseBuild; } + #if defined(CMAKE_BUILD_WITH_CMAKE) cmFileLockPool& GetFileLockPool() { return FileLockPool; } #endif @@ -506,6 +509,8 @@ private: mutable std::map > FilenameTargetDepends; + bool VerboseBuild; + #if defined(CMAKE_BUILD_WITH_CMAKE) // Pool of file locks cmFileLockPool FileLockPool; diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 3c07be1..850f891 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -580,6 +580,11 @@ void cmGlobalNinjaGenerator this->SelectMakeProgram(makeProgram) ); + if(GetVerboseBuild()) + { + makeCommand.push_back("-v"); + } + makeCommand.insert(makeCommand.end(), makeOptions.begin(), makeOptions.end()); if(!targetName.empty()) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 47be481..19835c4 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2789,6 +2789,11 @@ int cmake::Build(const std::string& dir, return 1; } projName = it.GetValue(); + if(it.Find("CMAKE_VERBOSE_MAKEFILE")) + { + bool verboseBuild = it.GetValueAsBool(); + gen->SetVerboseBuild(verboseBuild); + } return gen->Build("", dir, projName, target, output, -- 2.3.0 From mantis at public.kitware.com Wed Feb 25 16:26:36 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Wed, 25 Feb 2015 22:26:36 +0100 Subject: [cmake-developers] [CMake 0015419]: QtAutogen does not regenerate moc file when moc inputs change Message-ID: <279a99eac51b57b68ad4b3cc5a16f03d@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15419 ====================================================================== Reported By: Stephen Kelly Assigned To: ====================================================================== Project: CMake Issue ID: 15419 Category: CMake Reproducibility: have not tried Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-25 22:26 CET Last Modified: 2015-02-25 22:26 CET ====================================================================== Summary: QtAutogen does not regenerate moc file when moc inputs change Description: There are two file-inputs to moc in Qt 5 - the C++ header file being moc'd, and the optional JSON metadata files referenced therein. CMake performs file timestamp comparison on the C++ header file during autogen, but does not do similar tracking for the JSON files. CMake should parse the C++ header file for the Q_PLUGIN_METADATA macro FILE argument, and add the list of referenced JSON files to the generated AutogenInfo.cmake file. The contents of this list should then be file-timestamp-checked. Similar logic for lists of input files affecting the tool input was added for qrc files in commit v3.2.0-rc1~480^2 (QtAutogen: Regenerate qrc files if their input changes (http://public.kitware.com/Bug/view.php?id=15074), 2014-09-17), and the solution to this issue with the moc tool will be similar. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-25 22:26 Stephen Kelly New Issue ====================================================================== From mantis at public.kitware.com Wed Feb 25 16:44:02 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Wed, 25 Feb 2015 22:44:02 +0100 Subject: [cmake-developers] [CMake 0015420]: QtAutogen should track uic external inputs Message-ID: <4ca81f6610853de288105ec9d23945f3@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15420 ====================================================================== Reported By: Stephen Kelly Assigned To: ====================================================================== Project: CMake Issue ID: 15420 Category: CMake Reproducibility: have not tried Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-25 22:44 CET Last Modified: 2015-02-25 22:44 CET ====================================================================== Summary: QtAutogen should track uic external inputs Description: Similar to the issue reported in http://public.kitware.com/Bug/view.php?id=15419, the uic tool may read external files specified in the .ui file. For example * An instance of a QLabel can specify a pixmap to load. If the pixmap changes, uic should be re-run. * Similarly, a QPushButton can have an icon specified on the filesystem. * A ui file can refer to a .qrc file. If the qrc file is known to cmake and rcc is run on it to generate the result into the target, uic should be re-run too (afterward). ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-25 22:44 Stephen Kelly New Issue ====================================================================== From brad.king at kitware.com Wed Feb 25 16:45:35 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 25 Feb 2015 16:45:35 -0500 Subject: [cmake-developers] [PATCH] Pass CMAKE_VERBOSE_MAKEFILE value to Ninja Generator In-Reply-To: <1424899446-55717-1-git-send-email-gjasny@googlemail.com> References: <54EE22E2.6010403@kitware.com> <1424899446-55717-1-git-send-email-gjasny@googlemail.com> Message-ID: <54EE427F.3000001@kitware.com> On 02/25/2015 04:24 PM, Gregor Jasny wrote: > Ninja build system does not support a in-Makefile verbositiy > switch. So we use cmake --build as a fall back to extract the > CMAKE_VERBOSE_MAKEFILE property and pass it as an optional > -v argument to Ninja. Thanks for working on this. > + if(it.Find("CMAKE_VERBOSE_MAKEFILE")) > + { > + bool verboseBuild = it.GetValueAsBool(); > + gen->SetVerboseBuild(verboseBuild); > + } > return gen->Build("", dir, > projName, target, > output, Instead of having a generator-wide state (member variable) that affects only one method, please extend the Build() and GenerateBuildCommand() signatures to thread the value through. Thanks, -Brad From steveire at gmail.com Wed Feb 25 16:57:13 2015 From: steveire at gmail.com (Stephen Kelly) Date: Wed, 25 Feb 2015 22:57:13 +0100 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) References: <20150223184413.GA2033@megas.kitwarein.com> <20150224005032.GA11905@megas.kitwarein.com> <54ECE05F.10408@kitware.com> <54EDEEAE.8080308@kitware.com> Message-ID: Brad King wrote: > On 02/24/2015 05:25 PM, Stephen Kelly wrote: >>> Until that problem is solved we cannot make object libraries >>> implicitly offer their objects just through tll(). >> >> Honestly, the problem is still not clear to me. > > Consider an object library with some usage requirements: > > add_library(objlib OBJECT ...) > target_compile_definitions(objlib PUBLIC MYDEF) > > Now try using that library and assume that tll() takes the objects > without explicit $ in the sources: > > add_library(mylib SHARED ...) > target_link_libraries(mylib PUBLIC objlib) > > We link publicly to forward the usage requirements of objlib through > mylib. Now consumers of mylib will get objlib's objects too. That > is not desired. It is the same problem as transitive interface > sources. Ok, I see. Now I also understand Bens commit message referenced at the beginning of the thread: The real fix is to make INTERFACE_SOURCES only applicable when directly linked and not transitive, but that is a bigger change. > What I envision for the future is: > > add_library(objlib OBJECT ...) > target_compile_definitions(objlib PUBLIC MYDEF) > target_sources(objlib INTERFACE $) Do you envision that as the idiomatic way to declare object libraries? Would CMakeLists authors have to write the target_sources line explicitly, if this future becomes possible? Thanks, Steve. From ben.boeckel at kitware.com Wed Feb 25 17:37:56 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 25 Feb 2015 17:37:56 -0500 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) In-Reply-To: References: <20150223184413.GA2033@megas.kitwarein.com> <20150224005032.GA11905@megas.kitwarein.com> <54ECE05F.10408@kitware.com> <54EDEEAE.8080308@kitware.com> Message-ID: <20150225223756.GA22675@megas.kitwarein.com> On Wed, Feb 25, 2015 at 22:57:13 +0100, Stephen Kelly wrote: > > What I envision for the future is: > > > > add_library(objlib OBJECT ...) > > target_compile_definitions(objlib PUBLIC MYDEF) > > target_sources(objlib INTERFACE $) > > Do you envision that as the idiomatic way to declare object libraries? It would be nice if that's the pattern anyways. There'd probably have to be a policy to ignore using TARGET_OBJECTS within target_sources (only for itself? except INTERFACE libs? So many edge cases :/ ). > Would CMakeLists authors have to write the target_sources line > explicitly, if this future becomes possible? No, I have a commit which initializes INTERFACE_SOURCES when object libraries are created. Currently floating on its own branch. --Ben From steveire at gmail.com Wed Feb 25 17:43:18 2015 From: steveire at gmail.com (Stephen Kelly) Date: Wed, 25 Feb 2015 23:43:18 +0100 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) References: <20150223184413.GA2033@megas.kitwarein.com> <20150224005032.GA11905@megas.kitwarein.com> <54ECE05F.10408@kitware.com> <20150225060111.GA942@bronto-burt.dev.benboeckel.net> Message-ID: Ben Boeckel wrote: >> It is just as easy to get into this situation when linking static >> libraries, right? Object libraries are not part of the problem, right? Or >> could you post a sscce? > > It is, so maybe it's less of an issue. I just think it is much easier to > stumble upon it when you start throwing objects directly into link lines > implicitly rather than with a staticWithGlobalStatic -> {sharedA, > sharedB} -> exeUsingAandB setup. Right. Consider add_library(upstream ...) add_library(middle ...) target_link_libraries(middle ${SCOPE} upstream} add_executable(consumer1) target_link_libraries(consumer1 middle) add_library(consumer2 SHARED) target_link_libraries(consumer2 middle) We have these possible scenarios (omitting INTERFACE scope, and omitting middle=OBJECT because I think it doesn't change anything): upstream SCOPE middle ---------- --------- -------- STATIC PRIVATE STATIC OBJECT PRIVATE STATIC STATIC PUBLIC STATIC OBJECT PUBLIC STATIC STATIC PRIVATE SHARED SHARED PRIVATE SHARED OBJECT PRIVATE SHARED STATIC PUBLIC SHARED SHARED PUBLIC SHARED OBJECT PUBLIC SHARED Omitting the upstream = SHARED or STATIC cases too, because I think they're not relevant to this discussion. upstream SCOPE middle ---------- --------- -------- OBJECT PRIVATE STATIC OBJECT PUBLIC STATIC OBJECT PRIVATE SHARED OBJECT PUBLIC SHARED If middle is STATIC, and SCOPE is PRIVATE, then the upstream objects are archived together with the rest of middle. Consumers use middle as if the upstream objects were not declared separately. If SCOPE is PUBLIC, perhaps it should be treated as PRIVATE or INTERFACE? That is, either not archive the upstream objects with middle (letting downstreams link the objects directly instead), or not link them in with downstreams (which will get them anyway through linking with middle). If middle is SHARED and scope is PRIVATE, then there is no problem (Except perhaps the global object issue, but that is present also if upstream is STATIC and it can be argued that no library should legitimately do that anyway). If middle is SHARED and scope is PUBLIC, then the situation is very similar to upstream=STATIC, in that the objects get compiled into middle and into each of the consumers. Is this an undesired effect? Let's imagine upstream is statically compiled zlib and middle is the FooCompress library which uses zlib in its implementation and uses zlib headers in FooCompress.h, but doesn't dllexport the zlib symbols (Is that a realistic scenario?), and expects consumers to also link the zlib.a instead. I have trouble imagining any other reason a SHARED library would PUBLIC link a STATIC or OBJECT library otherwise. But in the scenario I described, consumers must link the zlib.a (or .o), right? Or should it be prohibited to put OBJECT libraries in the INTERFACE of SHARED libraries? Again, even if the upstream is STATIC, this is a problem only in the presence of global objects provided by upstream. >> > For the diamond-usage problem, is there some way of utilizing the >> > COMPATIBLE_INTERFACES to deny the mixing of two libraries where each >> > built with an object libraries' objects? Having a property to trigger >> > that would be nice... >> >> Yes, that's possible by adding an ExclusiveList compatible type and >> populating an appropriate property when linking to OBJECT libraries. I've >> written a prototype and can clean it up and post it if that's part of the >> solution. > > As long as it is opt-in, I'm fine with this (it only really makes sense > in the presence of global statics with dtors). That appears to be the only problem being discussed here. I'm sure ExclusiveList could help, but in the case you describe, CMake wouldn't populate anything automatically (thereby making it opt-in). >> > Until that problem is solved we cannot make object libraries >> > implicitly offer their objects just through tll(). >> >> Honestly, the problem is still not clear to me. Is it something you would >> want to write and expect to be correct, but which would actually be >> incorrect? Is the static global object instance a necessary part of the >> problem-scenario? > > So this problem came up in a project where the current code uses LIBADD > in autotools. These added libraries are conditionally built and have > varying usage requirements (headers, linking, defines, etc.). Oh, they > also have symbols which need exporting. What is the type of these libraries? I'm guessing SHARED as you talk about exporting. > Yes, I already tried using static libraries (I think $ made > the duplicate symbols occur in dependent projects which use shared libs > through the transitive linking which then all went into an executable); > that's how I ended up trying object libraries. Maybe something I wrote above is fuel for thought here? Thanks, Steve. From steveire at gmail.com Wed Feb 25 17:45:47 2015 From: steveire at gmail.com (Stephen Kelly) Date: Wed, 25 Feb 2015 23:45:47 +0100 Subject: [cmake-developers] Object library linking (and a bit about INTERFACE_SOURCES) References: <20150223184413.GA2033@megas.kitwarein.com> <20150224005032.GA11905@megas.kitwarein.com> <54ECE05F.10408@kitware.com> <54EDEEAE.8080308@kitware.com> <20150225223756.GA22675@megas.kitwarein.com> Message-ID: Ben Boeckel wrote: > On Wed, Feb 25, 2015 at 22:57:13 +0100, Stephen Kelly wrote: >> > What I envision for the future is: >> > >> > add_library(objlib OBJECT ...) >> > target_compile_definitions(objlib PUBLIC MYDEF) >> > target_sources(objlib INTERFACE $) >> >> Do you envision that as the idiomatic way to declare object libraries? > > It would be nice if that's the pattern anyways. ... >> Would CMakeLists authors have to write the target_sources line >> explicitly, if this future becomes possible? > > No ... But then the idiomatic way would be add_library(objlib OBJECT ...) target_compile_definitions(objlib PUBLIC MYDEF) Right? Not the above which also includes a target_sources call, right? Thanks, Steve. From gjasny at googlemail.com Thu Feb 26 05:32:26 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Thu, 26 Feb 2015 11:32:26 +0100 Subject: [cmake-developers] [PATCH] Pass CMAKE_VERBOSE_MAKEFILE value to Ninja Generator In-Reply-To: <54EE427F.3000001@kitware.com> References: <54EE427F.3000001@kitware.com> Message-ID: <1424946746-58907-1-git-send-email-gjasny@googlemail.com> Ninja build system does not support a in-Makefile verbositiy switch. So we use cmake --build as a fall back to extract the CMAKE_VERBOSE_MAKEFILE property and pass it as an optional -v argument to Ninja. Signed-off-by: Gregor Jasny --- Source/CPack/cmCPackGenerator.cxx | 2 +- Source/CTest/cmCTestBuildAndTestHandler.cxx | 2 +- Source/cmGlobalGenerator.cxx | 11 ++++++----- Source/cmGlobalGenerator.h | 5 +++-- Source/cmGlobalNinjaGenerator.cxx | 6 ++++++ Source/cmGlobalNinjaGenerator.h | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 2 +- Source/cmGlobalUnixMakefileGenerator3.h | 2 +- Source/cmGlobalVisualStudio10Generator.cxx | 4 ++-- Source/cmGlobalVisualStudio10Generator.h | 2 +- Source/cmGlobalVisualStudio6Generator.cxx | 2 +- Source/cmGlobalVisualStudio6Generator.h | 2 +- Source/cmGlobalVisualStudio7Generator.cxx | 2 +- Source/cmGlobalVisualStudio7Generator.h | 2 +- Source/cmGlobalXCodeGenerator.cxx | 2 +- Source/cmGlobalXCodeGenerator.h | 2 +- Source/cmake.cxx | 7 ++++++- 17 files changed, 35 insertions(+), 22 deletions(-) diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 006239a..ee255af 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -664,7 +664,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( globalGenerator->GenerateBuildCommand(buildCommand, cmakeMakeProgram, installProjectName, installDirectory, globalGenerator->GetPreinstallTargetName(), - buildConfig, false); + buildConfig, false, false); std::string buildCommandStr = cmSystemTools::PrintSingleCommand(buildCommand); cmCPackLogger(cmCPackLog::LOG_DEBUG, diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index 4cdce71..0827037 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -310,7 +310,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) output, this->BuildMakeProgram, config, !this->BuildNoClean, - false, remainingTime); + false, false, remainingTime); out << output; // if the build failed then return if (retVal) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 6147009..36395aa 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1677,14 +1677,14 @@ int cmGlobalGenerator::TryCompile(const std::string& srcdir, mf->GetSafeDefinition("CMAKE_TRY_COMPILE_CONFIGURATION"); return this->Build(srcdir,bindir,projectName, newTarget, - output,"",config,false,fast, + output,"",config,false,fast,false, this->TryCompileTimeout); } void cmGlobalGenerator::GenerateBuildCommand( std::vector& makeCommand, const std::string&, const std::string&, const std::string&, const std::string&, - const std::string&, bool, + const std::string&, bool, bool, std::vector const&) { makeCommand.push_back( @@ -1697,7 +1697,7 @@ int cmGlobalGenerator::Build( std::string& output, const std::string& makeCommandCSTR, const std::string& config, - bool clean, bool fast, + bool clean, bool fast, bool verbose, double timeout, cmSystemTools::OutputOption outputflag, std::vector const& nativeOptions) @@ -1722,7 +1722,7 @@ int cmGlobalGenerator::Build( { std::vector cleanCommand; this->GenerateBuildCommand(cleanCommand, makeCommandCSTR, projectName, - bindir, "clean", config, fast); + bindir, "clean", config, fast, verbose); output += "\nRun Clean Command:"; output += cmSystemTools::PrintSingleCommand(cleanCommand); output += "\n"; @@ -1745,7 +1745,8 @@ int cmGlobalGenerator::Build( // now build std::vector makeCommand; this->GenerateBuildCommand(makeCommand, makeCommandCSTR, projectName, - bindir, target, config, fast, nativeOptions); + bindir, target, config, fast, verbose, + nativeOptions); std::string makeCommandStr = cmSystemTools::PrintSingleCommand(makeCommand); output += "\nRun Build Command:"; output += makeCommandStr; diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 08f061a..5b9ddee 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -134,7 +134,7 @@ public: const std::string& projectName, const std::string& targetName, std::string& output, const std::string& makeProgram, const std::string& config, - bool clean, bool fast, + bool clean, bool fast, bool verbose, double timeout, cmSystemTools::OutputOption outputflag=cmSystemTools::OUTPUT_NONE, std::vector const& nativeOptions = @@ -144,7 +144,8 @@ public: std::vector& makeCommand, const std::string& makeProgram, const std::string& projectName, const std::string& projectDir, - const std::string& targetName, const std::string& config, bool fast, + const std::string& targetName, const std::string& config, + bool fast, bool verbose, std::vector const& makeOptions = std::vector() ); diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 3c07be1..69b1a9d 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -574,12 +574,18 @@ void cmGlobalNinjaGenerator const std::string& targetName, const std::string& /*config*/, bool /*fast*/, + bool verbose, std::vector const& makeOptions) { makeCommand.push_back( this->SelectMakeProgram(makeProgram) ); + if(verbose) + { + makeCommand.push_back("-v"); + } + makeCommand.insert(makeCommand.end(), makeOptions.begin(), makeOptions.end()); if(!targetName.empty()) diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 3d443d8..c7bb782 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -196,7 +196,7 @@ public: const std::string& projectDir, const std::string& targetName, const std::string& config, - bool fast, + bool fast, bool verbose, std::vector const& makeOptions = std::vector() ); diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index e0ccaa9..1d2dd34 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -554,7 +554,7 @@ void cmGlobalUnixMakefileGenerator3 const std::string& /*projectDir*/, const std::string& targetName, const std::string& /*config*/, - bool fast, + bool fast, bool /*verbose*/, std::vector const& makeOptions) { makeCommand.push_back( diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index c61c36e..50a901e 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -114,7 +114,7 @@ public: const std::string& projectDir, const std::string& targetName, const std::string& config, - bool fast, + bool fast, bool verbose, std::vector const& makeOptions = std::vector() ); diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 531a714..7df2073 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -459,7 +459,7 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand( const std::string& projectDir, const std::string& targetName, const std::string& config, - bool fast, + bool fast, bool verbose, std::vector const& makeOptions) { // Select the caller- or user-preferred make program, else MSBuild. @@ -507,7 +507,7 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand( // Use devenv to build solutions containing Intel Fortran projects. cmGlobalVisualStudio7Generator::GenerateBuildCommand( makeCommand, makeProgram, projectName, projectDir, - targetName, config, fast, makeOptions); + targetName, config, fast, verbose, makeOptions); return; } diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 3b0a5cf..92202ba 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -41,7 +41,7 @@ public: const std::string& projectDir, const std::string& targetName, const std::string& config, - bool fast, + bool fast, bool verbose, std::vector const& makeOptions = std::vector() ); diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index 455a7a2..62a308e 100644 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -120,7 +120,7 @@ cmGlobalVisualStudio6Generator::GenerateBuildCommand( const std::string& /*projectDir*/, const std::string& targetName, const std::string& config, - bool /*fast*/, + bool /*fast*/, bool /*verbose*/, std::vector const& makeOptions ) { diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h index 58efb25..a59a0b2 100644 --- a/Source/cmGlobalVisualStudio6Generator.h +++ b/Source/cmGlobalVisualStudio6Generator.h @@ -59,7 +59,7 @@ public: const std::string& projectDir, const std::string& targetName, const std::string& config, - bool fast, + bool fast, bool verbose, std::vector const& makeOptions = std::vector() ); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 401e475..0e0e63a 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -191,7 +191,7 @@ void cmGlobalVisualStudio7Generator::GenerateBuildCommand( const std::string& /*projectDir*/, const std::string& targetName, const std::string& config, - bool /*fast*/, + bool /*fast*/, bool /*verbose*/, std::vector const& makeOptions) { // Select the caller- or user-preferred make program, else devenv. diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index b591653..d641c02 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -69,7 +69,7 @@ public: const std::string& projectDir, const std::string& targetName, const std::string& config, - bool fast, + bool fast, bool verbose, std::vector const& makeOptions = std::vector() ); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index aea134e..e89161d 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -310,7 +310,7 @@ cmGlobalXCodeGenerator::GenerateBuildCommand( const std::string& /*projectDir*/, const std::string& targetName, const std::string& config, - bool /*fast*/, + bool /*fast*/, bool /*verbose*/, std::vector const& makeOptions) { // now build the test diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index f513e28..b272f6a 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -60,7 +60,7 @@ public: const std::string& projectDir, const std::string& targetName, const std::string& config, - bool fast, + bool fast, bool verbose, std::vector const& makeOptions = std::vector() ); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 47be481..80e90a8 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2789,11 +2789,16 @@ int cmake::Build(const std::string& dir, return 1; } projName = it.GetValue(); + bool verbose = false; + if(it.Find("CMAKE_VERBOSE_MAKEFILE")) + { + verbose = it.GetValueAsBool(); + } return gen->Build("", dir, projName, target, output, "", - config, clean, false, 0, + config, clean, false, verbose, 0, cmSystemTools::OUTPUT_PASSTHROUGH, nativeOptions); } -- 2.3.0 From mantis at public.kitware.com Thu Feb 26 09:07:16 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Thu, 26 Feb 2015 09:07:16 -0500 Subject: [cmake-developers] [CMake 0015421]: FindOpenMP always re-run Message-ID: <5bdf86bc647a6e33d5656e7c9d112643@www.cmake.org> The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15421 ====================================================================== Reported By: Mathieu Malaterre Assigned To: ====================================================================== Project: CMake Issue ID: 15421 Category: (No Category) Reproducibility: have not tried Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-26 09:07 EST Last Modified: 2015-02-26 09:07 EST ====================================================================== Summary: FindOpenMP always re-run Description: On MacOSX mavericks, the default clang compiler does not support OpenMP. It would be nice in this case to not re-run the openmp system inspection everytime. Ref: [...] Michaels-MacBook-Pro-2:bin-macosx dev$ make -- Try OpenMP C flag = [ ] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP C flag = [-fopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP C flag = [/openmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP C flag = [-Qopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP C flag = [-openmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP C flag = [-xopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP C flag = [+Oopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP C flag = [-qsmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP C flag = [-mp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP CXX flag = [ ] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP CXX flag = [-fopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP CXX flag = [/openmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP CXX flag = [-Qopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP CXX flag = [-openmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP CXX flag = [-xopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP CXX flag = [+Oopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP CXX flag = [-qsmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Try OpenMP CXX flag = [-mp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Failed -- Could NOT find OpenMP (missing: OpenMP_C_FLAGS OpenMP_CXX_FLAGS) [...] ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-26 09:07 Mathieu MalaterreNew Issue ====================================================================== From brad.king at kitware.com Thu Feb 26 09:50:24 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 26 Feb 2015 09:50:24 -0500 Subject: [cmake-developers] [PATCH v6 0/2] Add XCTest Bundle Support In-Reply-To: <1424894864-32527-1-git-send-email-gjasny@googlemail.com> References: <54EB6EEF.7030402@kitware.com> <1424894864-32527-1-git-send-email-gjasny@googlemail.com> Message-ID: <54EF32B0.6010406@kitware.com> On 02/25/2015 03:07 PM, Gregor Jasny wrote: > Changes since v5: > * Rebased against master (could drop two applied patches) > * kept help modules list sorted > * indirected xctest wiring Great. The tests pass on my machine with no special configuration. The basic functionality is in good shape. My remaining comments are on the XCTestUtilities module that I hadn't fully reviewed before: * Please split addition of XCTestUtilities into its own commit between the current two with its own commit message. * Please use the ".. command:: ..." explicit markup to document the module API. That will make the functions indexed and linkable from other documentation. See the ExternalData module documentation for an example. * Please rename the APIs to start in "xctest_", e.g. add_xctest => xctest_add. We like to keep module-provided APIs prefixed with something related to the module name. > if(NOT CMAKE_OSX_SYSROOT) > message(STATUS "Adding XCTest bundles requires CMAKE_OSX_SYSROOT to be set.") > endif() Should this be a FATAL_ERROR? > get_target_property(TESTEE_TYPE ${testee} TYPE) > get_target_property(TESTEE_FRAMEWORK ${testee} FRAMEWORK) > get_target_property(TESTEE_MACOSX_BUNDLE ${testee} MACOSX_BUNDLE) Please use get_property(... TARGET ${testee} ...) instead. We may one day deprecate the get_*_property commands because they are so inconsistent in how they report undefined properties. > find_library(FOUNDATION_LIBRARY Foundation) > if(NOT FOUNDATION_LIBRARY) > message(STATUS "Could not find Foundation Framework.") > endif() > > find_library(XCTEST_LIBRARY XCTest) > if(NOT XCTEST_LIBRARY) > message(STATUS "Could not find XCTest Framework.") > endif() Rather than polluting the cache with these, we could just trust that they exist. Is there any reason not to do: target_link_libraries(${target} PRIVATE "-framework Foundation" "-framework XCTest") instead? Let Xcode find its own frameworks. Alternatively these should be something that the XCTestUtilities module finds as part of include()ing it instead of calling find_library again on every invocation of the API. > execute_process( > COMMAND xcrun --find xctest > OUTPUT_VARIABLE XCTEST_EXECUTABLE > OUTPUT_STRIP_TRAILING_WHITESPACE) Use ERROR_VARIABLE here with a bogus local variable name just to hide any stderr output from the user running CMake. As above one could pre-find this outside of any API call. > if(NOT XCTEST_EXECUTABLE) > message(STATUS "Unable to finc xctest binary.") > endif() If you go with the pre-find approach then this can still be in the function because we only need the value there. However, shouldn't this be an error too? Thanks, -Brad From brad.king at kitware.com Thu Feb 26 10:27:20 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 26 Feb 2015 10:27:20 -0500 Subject: [cmake-developers] [PATCH] Pass CMAKE_VERBOSE_MAKEFILE value to Ninja Generator In-Reply-To: <1424946746-58907-1-git-send-email-gjasny@googlemail.com> References: <54EE427F.3000001@kitware.com> <1424946746-58907-1-git-send-email-gjasny@googlemail.com> Message-ID: <54EF3B58.9080405@kitware.com> On 02/26/2015 05:32 AM, Gregor Jasny wrote: > Ninja build system does not support a in-Makefile verbositiy > switch. So we use cmake --build as a fall back to extract the > CMAKE_VERBOSE_MAKEFILE property and pass it as an optional > -v argument to Ninja. Applied and test case added: cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for Ninja http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce935ebe Tests: Extend RunCMake.CommandLine to cover 'cmake --build' for 'ninja -v' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1082448 Thanks, -Brad From raffi.enficiaud at free.fr Thu Feb 26 12:02:45 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Thu, 26 Feb 2015 18:02:45 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54EDCF04.2000909@kitware.com> References: <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5F072.3090903@kitware.com> <06983E90-D75E-4335-8D02-1D40DF89B9C2@free.fr> <54EB694A.9030605@kitware.com> <7BCB5D1E-275E-43B2-B0FF-0ECEE0A78585@free.fr> <54EDCF04.2000909@kitware.com> Message-ID: Hi Brad, Please find the patch addressing the issues you raised. My local tests are clear on the 3 platforms. I removed the RunCMake test on Linux as now the Matlab_MAIN_PROGRAM is required if MATLAB_USER_ROOT is not specified. In the previous implementation, I used temporary variables to avoid bringing this program to the user. Any feedback welcome, Best, Raffi -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Simplified-workflow.patch Type: application/octet-stream Size: 22748 bytes Desc: not available URL: -------------- next part -------------- > On 25 Feb 2015, at 14:32, Brad King wrote: > > On 02/25/2015 04:11 AM, Raffi Enficiaud wrote: >> Is it ok if I rebase on 1416d21? > > Yes, please. > > Thanks, > -Brad > From raffi.enficiaud at free.fr Thu Feb 26 12:06:18 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Thu, 26 Feb 2015 18:06:18 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: References: <54C129FB.3070102@kitware.com> <073A6DE2-B2DF-4DF8-A603-DAA6429C142E@free.fr> <54C2A96A.3060100@kitware.com> <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5F072.3090903@kitware.com> <06983E90-D75E-4335-8D02-1D40DF89B9C2@free.fr> <54EB694A.9030605@kitware.com> <7BCB5D1E-275E-43B2-B0FF-0ECEE0A78585@free.fr> <54EDCF04.2000909@kitware.com> Message-ID: <442BD016-E925-4186-9FBA-DA566C5C5886@free.fr> Quick question: Is it possible to redirect the input stream of execute_process from /dev/null on OSX and Linux ? Right now on these platforms, I need to "reset" my shell. If I run the ctest command with < /dev/null, everything is fine. So my guess is that Matlab is manipulating the console somehow. Thanks, Raffi > On 26 Feb 2015, at 18:02, Raffi Enficiaud wrote: > > Hi Brad, > > Please find the patch addressing the issues you raised. My local tests are clear on the 3 platforms. > I removed the RunCMake test on Linux as now the Matlab_MAIN_PROGRAM is required if MATLAB_USER_ROOT is not specified. In the previous implementation, I used temporary variables to avoid bringing this program to the user. > > Any feedback welcome, > > Best, > Raffi > > <0001-Simplified-workflow.patch> >> On 25 Feb 2015, at 14:32, Brad King wrote: >> >> On 02/25/2015 04:11 AM, Raffi Enficiaud wrote: >>> Is it ok if I rebase on 1416d21? >> >> Yes, please. >> >> 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 From brad.king at kitware.com Thu Feb 26 12:52:33 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 26 Feb 2015 12:52:33 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <442BD016-E925-4186-9FBA-DA566C5C5886@free.fr> References: <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5F072.3090903@kitware.com> <06983E90-D75E-4335-8D02-1D40DF89B9C2@free.fr> <54EB694A.9030605@kitware.com> <7BCB5D1E-275E-43B2-B0FF-0ECEE0A78585@free.fr> <54EDCF04.2000909@kitware.com> <442BD016-E925-4186-9FBA-DA566C5C5886@free.fr> Message-ID: <54EF5D61.8010708@kitware.com> On 02/26/2015 12:06 PM, Raffi Enficiaud wrote: > Is it possible to redirect the input stream of execute_process > from /dev/null on OSX and Linux ? Yes: INPUT_FILE /dev/null and on Windows: INPUT_FILE NUL -Brad From Robert.Goulet at autodesk.com Thu Feb 26 14:18:04 2015 From: Robert.Goulet at autodesk.com (Robert Goulet) Date: Thu, 26 Feb 2015 19:18:04 +0000 Subject: [cmake-developers] cmake install command expected performance? In-Reply-To: <54EC9384.9080907@kitware.com> References: <54EB4927.709@gmail.com> <54EC9132.8090202@kitware.com> <54EC9384.9080907@kitware.com> Message-ID: Here is what we discovered. It looks like that when cmake write the install manifest file, it does it in a for_loop for each file, which in the end turns out to be 5000+ file open/close, and then our administrator controlled anti-virus checks the file each time, considerably slowing everything down. We just changed the logic to write the install manifest file in a single file open/close rather than for each file, and it completely fixes our issue; it's now back to normal install times, now takes less than a second compared to 50+ seconds previously. Patch file attached. Please consider it for CMake 3.2! Thanks! -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Tuesday, February 24, 2015 10:07 AM To: Robert Goulet; Joshua Clayton Cc: cmake-developers at cmake.org Subject: Re: [cmake-developers] cmake install command expected performance? On 02/24/2015 10:03 AM, Robert Goulet wrote: > Yes comparing timestamp is the way to go, but why is it so slow in cmake? I've never observed that being slow in practice. You'll have to profile CMake while running in this case, or add some print statements with high-precision timestamps to see where the time is going. -Brad -------------- next part -------------- A non-text attachment was scrubbed... Name: patch_install_manifest_optimize.patch Type: application/octet-stream Size: 888 bytes Desc: patch_install_manifest_optimize.patch URL: From mantis at public.kitware.com Thu Feb 26 14:29:16 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Thu, 26 Feb 2015 20:29:16 +0100 Subject: [cmake-developers] [CMake 0015422]: cmake --help should be explicit about how to specify architecture. Message-ID: <6cc2ecec26f84e1430368f4197bf123e@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15422 ====================================================================== Reported By: Stephen Kelly Assigned To: ====================================================================== Project: CMake Issue ID: 15422 Category: CMake Reproducibility: have not tried Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-26 20:29 CET Last Modified: 2015-02-26 20:29 CET ====================================================================== Summary: cmake --help should be explicit about how to specify architecture. Description: In previous releases, it was necessary to specify Win64 in the generator name to do a 64 bit build. This is not mentioned in the output of cmake --help. http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/51673 Now there is also a -A option. The help output should be explicit about whatever the user should use. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-26 20:29 Stephen Kelly New Issue ====================================================================== From brad.king at kitware.com Thu Feb 26 15:12:38 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 26 Feb 2015 15:12:38 -0500 Subject: [cmake-developers] cmake install command expected performance? In-Reply-To: References: <54EB4927.709@gmail.com> <54EC9132.8090202@kitware.com> <54EC9384.9080907@kitware.com> Message-ID: <54EF7E36.808@kitware.com> On 02/26/2015 02:18 PM, Robert Goulet wrote: > turns out to be 5000+ file open/close Good catch! It looks like it's been that way since manifest generation was first added here: ENH: When installing project, write manifest http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=99feab35 I've applied your patch with a few tweaks to avoid a leading newline and improve code formatting: install: Write the entire installation manifest at once http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c4814174 > Please consider it for CMake 3.2! Normally we don't take non-regression, non-new-feature-bugfix changes during a release candidate cycle. Given your antivirus config one could consider this an environmental regression. I'll consider it if it tests cleanly. Thanks, -Brad From raffi.enficiaud at free.fr Thu Feb 26 15:23:02 2015 From: raffi.enficiaud at free.fr (Raffi Enficiaud) Date: Thu, 26 Feb 2015 21:23:02 +0100 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <54EF5D61.8010708@kitware.com> References: <54c2ecb9.6308b40a.75ff.ffffa484SMTPIN_ADDED_BROKEN@mx.google.com> <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5F072.3090903@kitware.com> <06983E90-D75E-4335-8D02-1D40DF89B9C2@free.fr> <54EB694A.9030605@kitware.com> <7BCB5D1E-275E-43B2-B0FF-0ECEE0A78585@free.fr> <54EDCF04.2000909@kitware.com> <442BD016-E925-4186-9FBA-DA566C5C5886@free.fr> <54EF5D61.8010708@kitware.co m> Message-ID: <61974444-FEDF-4FE0-9FCE-2797CC7DE528@free.fr> Thanks! here is the patch then, replacing the previous one, rebased on 1416d214b3. Best, Raffi -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Simplified-workflow.patch Type: application/octet-stream Size: 22748 bytes Desc: not available URL: -------------- next part -------------- > On 26 Feb 2015, at 18:52, Brad King wrote: > > On 02/26/2015 12:06 PM, Raffi Enficiaud wrote: >> Is it possible to redirect the input stream of execute_process >> from /dev/null on OSX and Linux ? > > Yes: > > INPUT_FILE /dev/null > > and on Windows: > > INPUT_FILE NUL > > -Brad > From Robert.Goulet at autodesk.com Thu Feb 26 15:25:01 2015 From: Robert.Goulet at autodesk.com (Robert Goulet) Date: Thu, 26 Feb 2015 20:25:01 +0000 Subject: [cmake-developers] cmake install command expected performance? In-Reply-To: <54EF7E36.808@kitware.com> References: <54EB4927.709@gmail.com> <54EC9132.8090202@kitware.com> <54EC9384.9080907@kitware.com> <54EF7E36.808@kitware.com> Message-ID: Great, let us know if the test is clean! Cheers! -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Thursday, February 26, 2015 3:13 PM To: Robert Goulet; Joshua Clayton Cc: cmake-developers at cmake.org Subject: Re: [cmake-developers] cmake install command expected performance? On 02/26/2015 02:18 PM, Robert Goulet wrote: > turns out to be 5000+ file open/close Good catch! It looks like it's been that way since manifest generation was first added here: ENH: When installing project, write manifest http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=99feab35 I've applied your patch with a few tweaks to avoid a leading newline and improve code formatting: install: Write the entire installation manifest at once http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c4814174 > Please consider it for CMake 3.2! Normally we don't take non-regression, non-new-feature-bugfix changes during a release candidate cycle. Given your antivirus config one could consider this an environmental regression. I'll consider it if it tests cleanly. Thanks, -Brad From brad.king at kitware.com Thu Feb 26 15:32:57 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 26 Feb 2015 15:32:57 -0500 Subject: [cmake-developers] Introduction and volunteering for the Matlab package In-Reply-To: <61974444-FEDF-4FE0-9FCE-2797CC7DE528@free.fr> References: <54C64499.3050707@kitware.com> <98EDE7BE-00E7-4EFE-8D74-E51F41B49535@free.fr> <08F24DF8-41E7-4FD8-837E-5FC514C65338@free.fr> <54D128BE.9030109@kitware.com> <54D222A4.7090500@kitware.com> <2F7B25D2-7E72-44C1-B371-16F9399071BC@free.fr> <54DE0B41.5080000@kitware.com> <66AF3BFE-070C-4A57-BCBC-4184DB1EB387@free.fr> <54DE1A19.8050403@kitware.com> <54E49E02.5030105@kitware.com> <54E5F072.3090903@kitware.com> <06983E90-D75E-4335-8D02-1D40DF89B9C2@free.fr> <54EB694A.9030605@kitware.com> <7BCB5D1E-275E-43B2-B0FF-0ECEE0A78585@free.fr> <54EDCF04.2000909@kitware.com> <442BD016-E925-4186-9FBA-DA566C5C5886@free.fr> <54EF5D61.8010708@kitware.co m> <61974444-FEDF-4FE0-9FCE-2797CC7DE528@free.fr> Message-ID: <54EF82F9.4000305@kitware.com> On 02/26/2015 03:23 PM, Raffi Enficiaud wrote: > Thanks! here is the patch then, replacing the previous one, > rebased on 1416d214b3. Okay. In our earlier discussion: On 02/19/2015 12:52 PM, Brad King wrote: >> you propose to merge the variables MATLAB_USER_ROOT and >> Matlab_ROOT_DIR, is that correct? > Yes. Furthermore, if we can always compute the other information > from that value then as little of it should be cached as possible. We never specified explicitly which name to use. I think it should be Matlab_ROOT_DIR because that makes sense whether the user specified it or not. > I removed the RunCMake test on Linux as now the > Matlab_MAIN_PROGRAM is required if MATLAB_USER_ROOT is not > specified. In the previous implementation, I used temporary > variables to avoid bringing this program to the user. We shouldn't have to disable the test. It can still be an error for the MAIN_PROGRAM component to not be requested. You can separate the name of the cache variable used as the "one" search for "matlab" from the name of the result variable used to provide the MAIN_PROGRAM component. That will be consistent with the view that finding "matlab" is an implementation detail on some platforms even when the MAIN_PROGRAM component is not requested. Please revise this patch further for the above. Thanks, -Brad From gjasny at googlemail.com Thu Feb 26 15:55:11 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Thu, 26 Feb 2015 21:55:11 +0100 Subject: [cmake-developers] [PATCH v6 0/2] Add XCTest Bundle Support In-Reply-To: <54EF32B0.6010406@kitware.com> References: <54EB6EEF.7030402@kitware.com> <1424894864-32527-1-git-send-email-gjasny@googlemail.com> <54EF32B0.6010406@kitware.com> Message-ID: <54EF882F.7010203@googlemail.com> Hello Brad, thank you for the review. In addition to the last series I added a test case also for the Makefile generator. On 26/02/15 15:50, Brad King wrote: > The basic functionality is in good shape. My remaining comments > are on the XCTestUtilities module that I hadn't fully reviewed > before: > > * Please split addition of XCTestUtilities into its own commit > between the current two with its own commit message. > > * Please use the ".. command:: ..." explicit markup to document > the module API. That will make the functions indexed and > linkable from other documentation. See the ExternalData > module documentation for an example. > > * Please rename the APIs to start in "xctest_", e.g. > add_xctest => xctest_add. We like to keep module-provided > APIs prefixed with something related to the module name. > >> if(NOT CMAKE_OSX_SYSROOT) >> message(STATUS "Adding XCTest bundles requires CMAKE_OSX_SYSROOT to be set.") >> endif() > > Should this be a FATAL_ERROR? > >> get_target_property(TESTEE_TYPE ${testee} TYPE) >> get_target_property(TESTEE_FRAMEWORK ${testee} FRAMEWORK) >> get_target_property(TESTEE_MACOSX_BUNDLE ${testee} MACOSX_BUNDLE) > > Please use get_property(... TARGET ${testee} ...) instead. We > may one day deprecate the get_*_property commands because they > are so inconsistent in how they report undefined properties. > Everything addressed. >> find_library(FOUNDATION_LIBRARY Foundation) >> if(NOT FOUNDATION_LIBRARY) >> message(STATUS "Could not find Foundation Framework.") >> endif() >> >> find_library(XCTEST_LIBRARY XCTest) >> if(NOT XCTEST_LIBRARY) >> message(STATUS "Could not find XCTest Framework.") >> endif() > > Rather than polluting the cache with these, we could just trust > that they exist. Is there any reason not to do: > > target_link_libraries(${target} PRIVATE > "-framework Foundation" "-framework XCTest") > > instead? Let Xcode find its own frameworks. > > Alternatively these should be something that the XCTestUtilities > module finds as part of include()ing it instead of calling > find_library again on every invocation of the API. This approach works properly for Xcode. But when building with the Makefile Generator the XCTest framework is not in the default compiler search path (but in CMAKE_SYSTEM_FRAMEWORK_PATH). So I could use a if(XCODE) conditional to avoid looking up the XCTest framework. But consistency across generators is also a nice thing. >> execute_process( >> COMMAND xcrun --find xctest >> OUTPUT_VARIABLE XCTEST_EXECUTABLE >> OUTPUT_STRIP_TRAILING_WHITESPACE) > > Use ERROR_VARIABLE here with a bogus local variable name just > to hide any stderr output from the user running CMake. As > above one could pre-find this outside of any API call. > >> if(NOT XCTEST_EXECUTABLE) >> message(STATUS "Unable to finc xctest binary.") >> endif() > > If you go with the pre-find approach then this can still be > in the function because we only need the value there. However, > shouldn't this be an error too? Also everything addressed. Thanks, Gregor From gjasny at googlemail.com Thu Feb 26 15:55:44 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Thu, 26 Feb 2015 21:55:44 +0100 Subject: [cmake-developers] [PATCH v7 1/4] Add handling for XCTest bundles In-Reply-To: <54EF882F.7010203@googlemail.com> References: <54EF882F.7010203@googlemail.com> Message-ID: <1424984147-98650-1-git-send-email-gjasny@googlemail.com> An XCTest bundle is a CFBundle with a special product-type and bundle extension. For more information about XCTest visit the Mac Developer library at: http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/ Signed-off-by: Gregor Jasny --- Help/manual/cmake-properties.7.rst | 1 + Help/prop_tgt/XCTEST.rst | 13 +++++++++++++ Help/release/dev/xcode-xctest.rst | 6 ++++++ Source/cmGlobalXCodeGenerator.cxx | 12 ++++++++++-- Source/cmTarget.cxx | 16 +++++++++++++++- Source/cmTarget.h | 3 +++ 6 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 Help/prop_tgt/XCTEST.rst create mode 100644 Help/release/dev/xcode-xctest.rst diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 19fdf23..1dff33e 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -243,6 +243,7 @@ Properties on Targets /prop_tgt/VS_WINRT_REFERENCES /prop_tgt/WIN32_EXECUTABLE /prop_tgt/XCODE_ATTRIBUTE_an-attribute + /prop_tgt/XCTEST Properties on Tests =================== diff --git a/Help/prop_tgt/XCTEST.rst b/Help/prop_tgt/XCTEST.rst new file mode 100644 index 0000000..8a2ef8b --- /dev/null +++ b/Help/prop_tgt/XCTEST.rst @@ -0,0 +1,13 @@ +XCTEST +------ + +This target is a XCTest CFBundle on the Mac. + +This property will usually get set via the ``add_xctest`` macro in +:module:`XCTestUtilities` module. + +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 depends on :prop_tgt:`BUNDLE` to be effective. diff --git a/Help/release/dev/xcode-xctest.rst b/Help/release/dev/xcode-xctest.rst new file mode 100644 index 0000000..af9f705 --- /dev/null +++ b/Help/release/dev/xcode-xctest.rst @@ -0,0 +1,6 @@ +Xcode XCTest Support +-------------------- + +* CMake gained the abiltity to create XCTest bundles to test + Frameworks and App Bundles within Xcode. The :module:`XCTestUtilities` + module provides convenience functions to handle :prop_tgt:`XCTEST` bundles. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index aea134e..784bc24 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -804,6 +804,10 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext, { sourcecode = "compiled.mach-o.objfile"; } + else if(ext == "xctest") + { + sourcecode = "wrapper.cfbundle"; + } else if(ext == "xib") { keepLastKnownFileType = true; @@ -2598,7 +2602,9 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget) case cmTarget::STATIC_LIBRARY: return "archive.ar"; case cmTarget::MODULE_LIBRARY: - if (cmtarget.IsCFBundleOnApple()) + if (cmtarget.IsXCTestOnApple()) + return "wrapper.cfbundle"; + else if (cmtarget.IsCFBundleOnApple()) return "wrapper.plug-in"; else return ((this->XcodeVersion >= 22)? @@ -2622,7 +2628,9 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(cmTarget& cmtarget) case cmTarget::STATIC_LIBRARY: return "com.apple.product-type.library.static"; case cmTarget::MODULE_LIBRARY: - if (cmtarget.IsCFBundleOnApple()) + if (cmtarget.IsXCTestOnApple()) + return "com.apple.product-type.bundle.unit-test"; + else if (cmtarget.IsCFBundleOnApple()) return "com.apple.product-type.bundle"; else return ((this->XcodeVersion >= 22)? diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index e046bef..6753895 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -615,6 +615,13 @@ bool cmTarget::IsCFBundleOnApple() const } //---------------------------------------------------------------------------- +bool cmTarget::IsXCTestOnApple() const +{ + return (this->IsCFBundleOnApple() && + this->GetPropertyAsBool("XCTEST")); +} + +//---------------------------------------------------------------------------- bool cmTarget::IsBundleOnApple() const { return this->IsFrameworkOnApple() || this->IsAppBundleOnApple() || @@ -6774,7 +6781,14 @@ std::string cmTarget::GetCFBundleDirectory(const std::string& config, const char *ext = this->GetProperty("BUNDLE_EXTENSION"); if (!ext) { - ext = "bundle"; + if (this->IsXCTestOnApple()) + { + ext = "xctest"; + } + else + { + ext = "bundle"; + } } fpath += ext; fpath += "/Contents"; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index ddd9859..b58e0a0 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -526,6 +526,9 @@ public: /** Return whether this target is a CFBundle (plugin) on Apple. */ bool IsCFBundleOnApple() const; + /** Return whether this target is a XCTest on Apple. */ + bool IsXCTestOnApple() const; + /** Return whether this target is an executable Bundle on Apple. */ bool IsAppBundleOnApple() const; -- 2.3.0 From gjasny at googlemail.com Thu Feb 26 15:55:45 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Thu, 26 Feb 2015 21:55:45 +0100 Subject: [cmake-developers] [PATCH v7 2/4] Add XCTest Utilities In-Reply-To: <1424984147-98650-1-git-send-email-gjasny@googlemail.com> References: <54EF882F.7010203@googlemail.com> <1424984147-98650-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424984147-98650-2-git-send-email-gjasny@googlemail.com> Signed-off-by: Gregor Jasny --- Help/manual/cmake-modules.7.rst | 1 + Help/module/XCTestUtilities.rst | 1 + Modules/XCTestUtilities.cmake | 139 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 141 insertions(+) create mode 100644 Help/module/XCTestUtilities.rst create mode 100644 Modules/XCTestUtilities.cmake diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 2b26cc9..a2a2d24 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -241,3 +241,4 @@ All Modules /module/Use_wxWindows /module/WriteBasicConfigVersionFile /module/WriteCompilerDetectionHeader + /module/XCTestUtilities diff --git a/Help/module/XCTestUtilities.rst b/Help/module/XCTestUtilities.rst new file mode 100644 index 0000000..c96f515 --- /dev/null +++ b/Help/module/XCTestUtilities.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../Modules/XCTestUtilities.cmake diff --git a/Modules/XCTestUtilities.cmake b/Modules/XCTestUtilities.cmake new file mode 100644 index 0000000..fe38629 --- /dev/null +++ b/Modules/XCTestUtilities.cmake @@ -0,0 +1,139 @@ +#[=======================================================================[.rst: +XCTestUtilities +--------------- + +Functions to help creating and executing XCTest bundles. + +An XCTest bundle is a CFBundle with a special product-type +and bundle extension. For more information about XCTest visit +the Mac Developer library at: +http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/ + +Module Functions +^^^^^^^^^^^^^^^^ + +.. command:: xctest_add_bundle + + The ``xctest_add_bundle`` function creates a XCTest bundle named + which will test the target . Supported target types + for testee are Frameworks and App Bundles:: + + xctest_add_bundle( + # Name of the XCTest bundle + # Target name of the testee + ) + +.. command:: xctest_add_test + + The ``xctest_add_test`` function adds an XCTest bundle to the + project to be run by :manual:`ctest(1)`. The test will be named + and tests :: + + xctest_add_test( + # Test name + # Target name of XCTest bundle + ) + +Module Variables +^^^^^^^^^^^^^^^^ + +The following variables are set by including this module: + +.. variable:: XCTEST_EXECUTABLE + + The ``XCTEST_EXECUTABLE`` variable contains the path to the xctest + command line tool used to execute XCTest bundles. + +.. variable:: XCTEST_LIBRARY + + The ``XCTEST_LIBRARY`` variable contains the location of the XCTest + Framework. + +#]=======================================================================] + +#============================================================================= +# Copyright 2015 Gregor Jasny +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +find_library(XCTEST_LIBRARY XCTest) +mark_as_advanced(XCTEST_LIBRARY) + +execute_process( + COMMAND xcrun --find xctest + OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE _xcrun_err) +if(_xcrun_out) + set(XCTEST_EXECUTABLE "${_xcrun_out}" CACHE FILEPATH "xctest executable") + mark_as_advanced(XCTEST_EXECUTABLE) +endif() + +function(xctest_add_bundle target testee) + if(NOT CMAKE_OSX_SYSROOT) + message(FATAL_ERROR "Adding XCTest bundles requires CMAKE_OSX_SYSROOT to be set.") + endif() + + # check that testee is a valid target type + get_property(TESTEE_TYPE TARGET ${testee} PROPERTY TYPE) + get_property(TESTEE_FRAMEWORK TARGET ${testee} PROPERTY FRAMEWORK) + get_property(TESTEE_MACOSX_BUNDLE TARGET ${testee} PROPERTY MACOSX_BUNDLE) + + if(TESTEE_TYPE STREQUAL "SHARED_LIBRARY" AND TESTEE_FRAMEWORK) + # found a framework + elseif(TESTEE_TYPE STREQUAL "EXECUTABLE" AND TESTEE_MACOSX_BUNDLE) + # found an app bundle + else() + message(FATAL_ERROR "Testee ${testee} is of unsupported type: ${TESTEE_TYPE}") + endif() + + add_library(${target} MODULE ${ARGN}) + + set_target_properties(${target} PROPERTIES + BUNDLE TRUE + XCTEST TRUE) + + target_link_libraries(${target} PRIVATE "-framework Foundation") + target_link_libraries(${target} PRIVATE ${XCTEST_LIBRARY}) + + if(TESTEE_TYPE STREQUAL "SHARED_LIBRARY" AND TESTEE_FRAMEWORK) + set_target_properties(${testee} PROPERTIES + BUILD_WITH_INSTALL_RPATH TRUE + INSTALL_NAME_DIR "@rpath") + + target_link_libraries(${target} PRIVATE ${testee}) + elseif(TESTEE_TYPE STREQUAL "EXECUTABLE" AND TESTEE_MACOSX_BUNDLE) + add_dependencies(${target} ${testee}) + if(XCODE) + set_target_properties(${target} PROPERTIES + XCODE_ATTRIBUTE_BUNDLE_LOADER "$(TEST_HOST)" + XCODE_ATTRIBUTE_TEST_HOST "$") + else(XCODE) + target_link_libraries(${target} PRIVATE "-bundle_loader $") + endif(XCODE) + endif() +endfunction(xctest_add_bundle) + +function(xctest_add_test name bundle) + get_property(TARGET_TYPE TARGET ${bundle} PROPERTY TYPE) + get_property(TARGET_XCTEST TARGET ${bundle} PROPERTY XCTEST) + + if(NOT TARGET_TYPE STREQUAL "MODULE_LIBRARY" OR NOT TARGET_XCTEST) + message(FATAL_ERROR "Test ${bundle} is not a XCTest") + endif() + + if(NOT XCTEST_EXECUTABLE) + message(FATAL_ERROR "Unable to finc xctest binary.") + endif() + + add_test( + NAME ${name} + COMMAND ${XCTEST_EXECUTABLE} $/../..) +endfunction(xctest_add_test) -- 2.3.0 From gjasny at googlemail.com Thu Feb 26 15:55:46 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Thu, 26 Feb 2015 21:55:46 +0100 Subject: [cmake-developers] [PATCH v7 3/4] Add XCTest example to test Frameworks and Cocoa App Bundles In-Reply-To: <1424984147-98650-1-git-send-email-gjasny@googlemail.com> References: <54EF882F.7010203@googlemail.com> <1424984147-98650-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424984147-98650-3-git-send-email-gjasny@googlemail.com> Signed-off-by: Gregor Jasny --- Tests/CMakeLists.txt | 13 + Tests/XCTest/CMakeLists.txt | 59 ++ Tests/XCTest/CocoaExample/AppDelegate.h | 7 + Tests/XCTest/CocoaExample/AppDelegate.m | 18 + Tests/XCTest/CocoaExample/Info.plist | 30 + Tests/XCTest/CocoaExample/MainMenu.xib | 680 +++++++++++++++++++++ Tests/XCTest/CocoaExample/main.m | 5 + Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m | 13 + Tests/XCTest/FrameworkExample/FrameworkExample.c | 6 + Tests/XCTest/FrameworkExample/FrameworkExample.h | 1 + Tests/XCTest/FrameworkExample/Info.plist | 28 + .../FrameworkExampleTests/FrameworkExampleTests.m | 16 + Tests/XCTest/FrameworkExampleTests/Info.plist | 24 + 13 files changed, 900 insertions(+) create mode 100644 Tests/XCTest/CMakeLists.txt create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.h create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.m create mode 100644 Tests/XCTest/CocoaExample/Info.plist create mode 100644 Tests/XCTest/CocoaExample/MainMenu.xib create mode 100644 Tests/XCTest/CocoaExample/main.m create mode 100644 Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.c create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.h create mode 100644 Tests/XCTest/FrameworkExample/Info.plist create mode 100644 Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m create mode 100644 Tests/XCTest/FrameworkExampleTests/Info.plist diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 08765de..6afedf2 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3064,4 +3064,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(NOT CMake_TEST_EXTERNAL_CMAKE) add_subdirectory(CMakeTests) endif() + + if(XCODE_VERSION AND NOT "${XCODE_VERSION}" VERSION_LESS 5) + add_test(XCTest ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/XCTest" + "${CMake_BINARY_DIR}/Tests/XCTest" + ${build_generator_args} + --build-project XCTest + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE} -V + ) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/XCTest") + endif() endif() diff --git a/Tests/XCTest/CMakeLists.txt b/Tests/XCTest/CMakeLists.txt new file mode 100644 index 0000000..f21ff59 --- /dev/null +++ b/Tests/XCTest/CMakeLists.txt @@ -0,0 +1,59 @@ +cmake_minimum_required(VERSION 3.1) +project(XCTest) +enable_testing() + +set(CMAKE_SKIP_RPATH OFF) + +include(XCTestUtilities) + +# Framework + +add_library(FrameworkExample SHARED + FrameworkExample/FrameworkExample.c + FrameworkExample/FrameworkExample.h + FrameworkExample/Info.plist) + +target_include_directories(FrameworkExample PUBLIC .) + +set_target_properties(FrameworkExample PROPERTIES + FRAMEWORK TRUE + VERSION "1.0.0" + SOVERSION "1.0.0" + FRAMEWORK_VERSION "A" + MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/FrameworkExample/Info.plist + PUBLIC_HEADER FrameworkExample/FrameworkExample.h) + +# XCTest for Framework + +xctest_add_bundle(FrameworkExampleTests FrameworkExample + FrameworkExampleTests/FrameworkExampleTests.m + FrameworkExampleTests/Info.plist) + +set_target_properties(FrameworkExampleTests PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/FrameworkExampleTests/Info.plist + ) + +xctest_add_test(XCTest.FrameworkExample FrameworkExampleTests) + +# Cocoa App Bundle + +add_executable(CocoaExample MACOSX_BUNDLE + CocoaExample/main.m + CocoaExample/AppDelegate.m + CocoaExample/AppDelegate.h + CocoaExample/MainMenu.xib +) + +target_link_libraries(CocoaExample PRIVATE "-framework Foundation") +target_link_libraries(CocoaExample PRIVATE "-framework AppKit") + +set_target_properties(CocoaExample PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/CocoaExample/Info.plist + RESOURCE "CocoaExample/MainMenu.xib") + +# XCTest for Cocoa App Bundle + +xctest_add_bundle(CocoaExampleTests CocoaExample + CocoaExampleTests/CocoaExampleTests.m) + +xctest_add_test(XCTest.CocoaExample CocoaExampleTests) diff --git a/Tests/XCTest/CocoaExample/AppDelegate.h b/Tests/XCTest/CocoaExample/AppDelegate.h new file mode 100644 index 0000000..69b6e0f --- /dev/null +++ b/Tests/XCTest/CocoaExample/AppDelegate.h @@ -0,0 +1,7 @@ +#import + + at interface AppDelegate : NSObject + + + at end + diff --git a/Tests/XCTest/CocoaExample/AppDelegate.m b/Tests/XCTest/CocoaExample/AppDelegate.m new file mode 100644 index 0000000..07af62f --- /dev/null +++ b/Tests/XCTest/CocoaExample/AppDelegate.m @@ -0,0 +1,18 @@ +#import "AppDelegate.h" + + at interface AppDelegate () + + at property (assign) IBOutlet NSWindow *window; + at end + + at implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application +} + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + + at end diff --git a/Tests/XCTest/CocoaExample/Info.plist b/Tests/XCTest/CocoaExample/Info.plist new file mode 100644 index 0000000..5267c63 --- /dev/null +++ b/Tests/XCTest/CocoaExample/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + CocoaExample + CFBundleIconFile + + CFBundleIdentifier + org.cmake.CocoaExample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + CocoaExample + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/Tests/XCTest/CocoaExample/MainMenu.xib b/Tests/XCTest/CocoaExample/MainMenu.xib new file mode 100644 index 0000000..9498a0a --- /dev/null +++ b/Tests/XCTest/CocoaExample/MainMenu.xib @@ -0,0 +1,680 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/XCTest/CocoaExample/main.m b/Tests/XCTest/CocoaExample/main.m new file mode 100644 index 0000000..8a6799b --- /dev/null +++ b/Tests/XCTest/CocoaExample/main.m @@ -0,0 +1,5 @@ +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m b/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m new file mode 100644 index 0000000..70d61d6 --- /dev/null +++ b/Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m @@ -0,0 +1,13 @@ +#import + + at interface CocoaExampleTests : XCTestCase + + at end + + at implementation CocoaExampleTests + +- (void)testExample { + XCTAssert(YES, @"Pass"); +} + + at end diff --git a/Tests/XCTest/FrameworkExample/FrameworkExample.c b/Tests/XCTest/FrameworkExample/FrameworkExample.c new file mode 100644 index 0000000..2da78da --- /dev/null +++ b/Tests/XCTest/FrameworkExample/FrameworkExample.c @@ -0,0 +1,6 @@ +#include "FrameworkExample.h" + +int FourtyTwo() +{ + return 42; +} diff --git a/Tests/XCTest/FrameworkExample/FrameworkExample.h b/Tests/XCTest/FrameworkExample/FrameworkExample.h new file mode 100644 index 0000000..2e0b499 --- /dev/null +++ b/Tests/XCTest/FrameworkExample/FrameworkExample.h @@ -0,0 +1 @@ +int FourtyTwo(); diff --git a/Tests/XCTest/FrameworkExample/Info.plist b/Tests/XCTest/FrameworkExample/Info.plist new file mode 100644 index 0000000..a22acea --- /dev/null +++ b/Tests/XCTest/FrameworkExample/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + FrameworkExample + CFBundleIdentifier + org.cmake.FrameworkExample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + FrameworkExample + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + + NSHumanReadableCopyright + + NSPrincipalClass + + + diff --git a/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m b/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m new file mode 100644 index 0000000..7cba23e --- /dev/null +++ b/Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m @@ -0,0 +1,16 @@ +#import + +#import "FrameworkExample/FrameworkExample.h" + + at interface FrameworkExampleTests : XCTestCase + + at end + + at implementation FrameworkExampleTests + +- (void)testFourtyTwo { + // This is an example of a functional test case. + XCTAssertEqual(42, FourtyTwo()); +} + + at end diff --git a/Tests/XCTest/FrameworkExampleTests/Info.plist b/Tests/XCTest/FrameworkExampleTests/Info.plist new file mode 100644 index 0000000..293921b --- /dev/null +++ b/Tests/XCTest/FrameworkExampleTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + FrameworkExampleTests + CFBundleIdentifier + org.cmake.FrameworkExampleTests + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + FrameworkExampleTests + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + -- 2.3.0 From gjasny at googlemail.com Thu Feb 26 15:55:47 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Thu, 26 Feb 2015 21:55:47 +0100 Subject: [cmake-developers] [PATCH v7 4/4] Also test XCTest on command line In-Reply-To: <1424984147-98650-1-git-send-email-gjasny@googlemail.com> References: <54EF882F.7010203@googlemail.com> <1424984147-98650-1-git-send-email-gjasny@googlemail.com> Message-ID: <1424984147-98650-4-git-send-email-gjasny@googlemail.com> Signed-off-by: Gregor Jasny --- Tests/CMakeLists.txt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 6afedf2..a2e2e24 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3066,15 +3066,26 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() if(XCODE_VERSION AND NOT "${XCODE_VERSION}" VERSION_LESS 5) - add_test(XCTest ${CMAKE_CTEST_COMMAND} + add_test(XCTest.Xcode ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/XCTest" - "${CMake_BINARY_DIR}/Tests/XCTest" + "${CMake_BINARY_DIR}/Tests/XCTest.Xcode" ${build_generator_args} --build-project XCTest --build-options ${build_options} --test-command ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE} -V ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/XCTest") + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/XCTest.Xcode") + + add_test(XCTest.Make ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/XCTest" + "${CMake_BINARY_DIR}/Tests/XCTest.Make" + --build-generator "Unix Makefiles" + --build-project XCTest + --build-options ${build_options} -DCMAKE_OSX_SYSROOT=macosx + --test-command ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE} -V + ) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/XCTest.Make") endif() endif() -- 2.3.0 From orion at cora.nwra.com Thu Feb 26 20:58:12 2015 From: orion at cora.nwra.com (Orion Poplawski) Date: Thu, 26 Feb 2015 18:58:12 -0700 Subject: [cmake-developers] [ANNOUNCE] CMake 3.2.0-rc1 now ready for testing! In-Reply-To: References: <54E22879.6010605@cora.nwra.com> Message-ID: <54EFCF34.4000500@cora.nwra.com> On 02/17/2015 12:41 AM, Stephen Kelly wrote: > Orion Poplawski wrote: > >> On 02/13/2015 01:12 PM, Robert Maynard wrote: >>> I am proud to announce that CMake 3.2 has entered the release candidate >>> stage. >> >> We're getting a fair number of test failures on Fedora Rawhide (with gcc >> 5 c++11): > > This is a bug in GCC. I filed a bug and committed a workaround: > > http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aaad0bf3 > Work around bug in pre-release GNU CXX 5.0. Thank you very much for filing the upstream bug report. This is now fixed and in Fedora's gcc, so I don't think it makes sense to check any workaround into cmake. -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA/CoRA Division FAX: 303-415-9702 3380 Mitchell Lane orion at cora.nwra.com Boulder, CO 80301 http://www.cora.nwra.com From mantis at public.kitware.com Fri Feb 27 04:44:51 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Fri, 27 Feb 2015 04:44:51 -0500 Subject: [cmake-developers] [CMake 0015423]: Need FindLZMA.cmake Message-ID: The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15423 ====================================================================== Reported By: Mathieu Malaterre Assigned To: ====================================================================== Project: CMake Issue ID: 15423 Category: (No Category) Reproducibility: have not tried Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-27 04:44 EST Last Modified: 2015-02-27 04:44 EST ====================================================================== Summary: Need FindLZMA.cmake Description: Since recent libtiff release, liblzma is internally used. Therefore one will need a find_package(lzma) for proper static linking of libtiff (find_package(TIFF). Current error: Undefined symbols for architecture x86_64: "_lzma_code", referenced from: _LZMADecode in libtiff.a(tif_lzma.o) _LZMAPostEncode in libtiff.a(tif_lzma.o) _LZMAEncode in libtiff.a(tif_lzma.o) "_lzma_end", referenced from: _LZMASetupDecode in libtiff.a(tif_lzma.o) _LZMASetupEncode in libtiff.a(tif_lzma.o) _LZMACleanup in libtiff.a(tif_lzma.o) "_lzma_lzma_preset", referenced from: _TIFFInitLZMA in libtiff.a(tif_lzma.o) _LZMAVSetField in libtiff.a(tif_lzma.o) "_lzma_memusage", referenced from: _LZMADecode in libtiff.a(tif_lzma.o) "_lzma_stream_decoder", referenced from: _LZMAPreDecode in libtiff.a(tif_lzma.o) _LZMADecode in libtiff.a(tif_lzma.o) "_lzma_stream_encoder", referenced from: _LZMAVSetField in libtiff.a(tif_lzma.o) _LZMAPreEncode in libtiff.a(tif_lzma.o) ld: symbol(s) not found for architecture x86_64 ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-27 04:44 Mathieu MalaterreNew Issue ====================================================================== From brad.king at kitware.com Fri Feb 27 10:26:16 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 27 Feb 2015 10:26:16 -0500 Subject: [cmake-developers] [PATCH v7 0/4] Add XCTest Bundle Support In-Reply-To: <54EF882F.7010203@googlemail.com> References: <54EB6EEF.7030402@kitware.com> <1424894864-32527-1-git-send-email-gjasny@googlemail.com> <54EF32B0.6010406@kitware.com> <54EF882F.7010203@googlemail.com> Message-ID: <54F08C98.7010908@kitware.com> On 02/26/2015 03:55 PM, Gregor Jasny wrote: > This approach works properly for Xcode. But when building with the > Makefile Generator the XCTest framework is not in the default compiler > search path (but in CMAKE_SYSTEM_FRAMEWORK_PATH). > > So I could use a if(XCODE) conditional to avoid looking up the XCTest > framework. But consistency across generators is also a nice thing. Okay. > Also everything addressed. Thanks. I've made some revisions of my own and attached the resulting series. Please continue work from this version. Updates include: * Simplify addition of XCTest test case. We only need to test it with the same generator as all the other tests. Our nightly testing infrastructure already has separate testing for each generator. This approach also allows the test to run with the Ninja generator. * Add XCTEST_INCLUDE_DIR to XCTestUtilities. We need it to have the proper include directory added for non-Xcode generators. I didn't document it yet because of the comment below. * Changed the way we pass -bundle_loader. We already support that with the ENABLE_EXPORTS target property and target_link_libraries. Likely further simplifications of the logic are possible now that the approach for testing frameworks and bundles is more similar. However, it no longer sets TEST_HOST in the .pbxproj file. See below. With the above the tests pass for me on Xcode, Ninja, and Makefile generators, and with a space in the path to the source and build tree. Further comments: * The XCTestUtilities module is feeling more like a find module now that it finds XCTest components. Perhaps we should rename it to FindXCTest and use find_package(XCTest) to use it. Then all the cached and result variables should be named the way they are described in the cmake-developer(7) manual. If it is not provided as a find module then we should not document the result variables because they are implementation details of the public APIs. * The -bundle_loader logic in CMake is here: http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmComputeLinkInformation.cxx;hb=v3.2.0-rc2#l284 http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmComputeLinkInformation.cxx;hb=v3.2.0-rc2#l620 One may need to refactor the Xcode generator support for this if setting TEST_HOST in the Xcode project is a requirement. Currently the flag just appears in OTHER_LDFLAGS with my above approach. > if(TESTEE_TYPE STREQUAL "SHARED_LIBRARY" AND TESTEE_FRAMEWORK) > set_target_properties(${testee} PROPERTIES > BUILD_WITH_INSTALL_RPATH TRUE > INSTALL_NAME_DIR "@rpath") The MACOSX_RPATH target property may be useful here. See also documentation of policy CMP0042. Is this kind of modification of the testee safe? Will projects actually want their targets modified by adding tests for them? Currently the settings will affect how the tested targets are installed. Thanks, -Brad -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Tests-Compute-Xcode-version-for-any-generator-on-OS-.patch Type: text/x-diff Size: 1472 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-OS-X-Add-handling-for-XCTest-bundles.patch Type: text/x-diff Size: 5058 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0003-OS-X-Add-XCTestUtilities-module.patch Type: text/x-diff Size: 6425 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0004-Tests-Add-XCTest-example-to-test-Frameworks-and-Coco.patch Type: text/x-diff Size: 61201 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0005-Help-Add-notes-for-topic-xcode-xctest.patch Type: text/x-diff Size: 1079 bytes Desc: not available URL: From mantis at public.kitware.com Fri Feb 27 10:38:24 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Fri, 27 Feb 2015 10:38:24 -0500 Subject: [cmake-developers] [CMake 0015424]: Infinite loop in cmsys::SystemTools::CopyFileAlways Message-ID: <48f1b062a7436a815079b37ef7861d98@public.kitware.com> The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15424 ====================================================================== Reported By: Paul Martin Assigned To: ====================================================================== Project: CMake Issue ID: 15424 Category: CMake Reproducibility: always Severity: crash Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-27 10:38 EST Last Modified: 2015-02-27 10:38 EST ====================================================================== Summary: Infinite loop in cmsys::SystemTools::CopyFileAlways Description: With some (recent) C++ libraries, "failbit" is not set on EOF, hence the while loop in cmsys::SystemTools::CopyFileAlways() never exits. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-27 10:38 Paul Martin New Issue 2015-02-27 10:38 Paul Martin File Added: cmake_copyfilealways.patch ====================================================================== From mantis at public.kitware.com Fri Feb 27 10:53:00 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Fri, 27 Feb 2015 10:53:00 -0500 Subject: [cmake-developers] [CMake 0015425]: Missing OpenMP installation in InstallRequiredSystemLibraries Message-ID: <4d170161aca3b7184d0cb35446e64c4e@www.cmake.org> The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15425 ====================================================================== Reported By: Mathieu Malaterre Assigned To: ====================================================================== Project: CMake Issue ID: 15425 Category: (No Category) Reproducibility: have not tried Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-27 10:53 EST Last Modified: 2015-02-27 10:53 EST ====================================================================== Summary: Missing OpenMP installation in InstallRequiredSystemLibraries Description: It would be nice if InstallRequiredSystemLibraries would be smart to figure out that code was compiled with openmp support and thus add something like: if (OPENMP_FOUND) install(FILES "C:/Program Files/Microsoft Visual Studio 10.0/VC/redist/x86/Microsoft.VC100.OPENMP/vcomp100.dll" DESTINATION bin COMPONENT Libraries) endif(OPENMP_FOUND) ref: https://braintrekking.wordpress.com/2013/04/27/dll-hell-how-to-include-microsoft-redistributable-runtime-libraries-in-your-cmakecpack-project/ -> scroll to "Case 2: You are using openmp" ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-27 10:53 Mathieu MalaterreNew Issue ====================================================================== From Geoffrey.Viola at asirobots.com Fri Feb 27 10:56:48 2015 From: Geoffrey.Viola at asirobots.com (Geoffrey Viola) Date: Fri, 27 Feb 2015 15:56:48 +0000 Subject: [cmake-developers] FW: FW: Initial Attempt at Green Hill MULTI IDE Generator Support References: <0543633b28c7431f93808182fc1e26e1@CO1PR07MB208.namprd07.prod.outlook.com> <543D2BBC.1010306@kitware.com> <0b5b33c4d1f0472782e260f9e5bce980@CO1PR07MB208.namprd07.prod.outlook.com> <544E4C9F.3050408@kitware.com> <64abd7ba273245b686146aa67acb7e8a@DM2PR0701MB1020.namprd07.prod.outlook.com> <545A7C44.6040305@kitware.com> <5474E132.2010705@kitware.com> <54D129E3.60101@kitware.com> <54E365F4.3030104@kitware.com> <54E7542D.6050808@kitware.com> <54EB68C8.7030504@kitware.com> Message-ID: Is there something I can do to improve or expedite the process of pulling my changes? Geoffrey Viola SOFTWARE ENGINEER asirobots.com -----Original Message----- From: Geoffrey Viola Sent: Monday, February 23, 2015 11:11 AM To: 'Brad King' Cc: cmake-developers at cmake.org Subject: RE: FW: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support >Please also add: > > set(dashboard_cache " > CMake_TEST_GreenHillsMULTI:BOOL=ON > ") > >to the nightly script so that the tests will run once we integrate them into 'next' for testing. That line has been added to the nightly script. It might be interesting to note that in the experimental build I manually rewrite the CMakeCache, because it does not use the "write_cache" macro found in cmake_common.cmake. Here is what works for that script: file(READ "${CMAKE_CACHE_FILENAME}" localCache) if (NOT "${localCache}" MATCHES ".*CMake_TEST_GreenHillsMULTI.*") file(APPEND "${CMAKE_CACHE_FILENAME}" " CMake_TEST_GreenHillsMULTI:BOOL=ON ") endif() >> My nightly build passes 50% of the time. > >Many of our nightly test machines have sporadic failures of a few tests due to locally transient conditions or races in the native tools. We've learned to tolerate them. Don't worry about those. Sounds good. I reran the tests this morning and they all passed. Geoffrey Viola SOFTWARE ENGINEER asirobots.com -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Monday, February 23, 2015 10:52 AM To: Geoffrey Viola Cc: cmake-developers at cmake.org Subject: Re: FW: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support On 02/23/2015 11:44 AM, Geoffrey Viola wrote: > I added "set(ENV{PATH})" to clear my path Good, I'm glad that helped. However, I'm surprised a completely empty path works. Typically I at least include the Windows system directories: set(ENV{PATH} "c:\\Windows\\system32;c:\\Windows") Please also add: set(dashboard_cache " CMake_TEST_GreenHillsMULTI:BOOL=ON ") to the nightly script so that the tests will run once we integrate them into 'next' for testing. > My nightly build passes 50% of the time. Many of our nightly test machines have sporadic failures of a few tests due to locally transient conditions or races in the native tools. We've learned to tolerate them. Don't worry about those. Thanks, -Brad This message contains confidential information and is intended only for the recipient. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately if you have received this e-mail by mistake and delete this e-mail from your system. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From brad.king at kitware.com Fri Feb 27 11:02:51 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 27 Feb 2015 11:02:51 -0500 Subject: [cmake-developers] FW: FW: Initial Attempt at Green Hill MULTI IDE Generator Support In-Reply-To: References: <0543633b28c7431f93808182fc1e26e1@CO1PR07MB208.namprd07.prod.outlook.com> <543D2BBC.1010306@kitware.com> <0b5b33c4d1f0472782e260f9e5bce980@CO1PR07MB208.namprd07.prod.outlook.com> <544E4C9F.3050408@kitware.com> <64abd7ba273245b686146aa67acb7e8a@DM2PR0701MB1020.namprd07.prod.outlook.com> <545A7C44.6040305@kitware.com> <5474E132.2010705@kitware.com> <54D129E3.60101@kitware.com> <54E365F4.3030104@kitware.com> <54E7542D.6050808@kitware.com> <54EB68C8.7030504@kitware.com> Message-ID: <54F0952B.5070809@kitware.com> On 02/27/2015 10:56 AM, Geoffrey Viola wrote: > Is there something I can do to improve or expedite the process > of pulling my changes? Sorry it's taking so long but this is a huge change to review and the testing infrastructure was only just worked out. Your dashboard script still says set(ENV{PATH}) instead of set(ENV{PATH} "c:\\Windows\\system32;c:\\Windows") We should test with at least the basic Windows PATH set. Thanks, -Brad From Geoffrey.Viola at asirobots.com Fri Feb 27 11:29:23 2015 From: Geoffrey.Viola at asirobots.com (Geoffrey Viola) Date: Fri, 27 Feb 2015 16:29:23 +0000 Subject: [cmake-developers] FW: FW: Initial Attempt at Green Hill MULTI IDE Generator Support In-Reply-To: <54F0952B.5070809@kitware.com> References: <0543633b28c7431f93808182fc1e26e1@CO1PR07MB208.namprd07.prod.outlook.com> <543D2BBC.1010306@kitware.com> <0b5b33c4d1f0472782e260f9e5bce980@CO1PR07MB208.namprd07.prod.outlook.com> <544E4C9F.3050408@kitware.com> <64abd7ba273245b686146aa67acb7e8a@DM2PR0701MB1020.namprd07.prod.outlook.com> <545A7C44.6040305@kitware.com> <5474E132.2010705@kitware.com> <54D129E3.60101@kitware.com> <54E365F4.3030104@kitware.com> <54E7542D.6050808@kitware.com> <54EB68C8.7030504@kitware.com> <54F0952B.5070809@kitware.com> Message-ID: > Sorry it's taking so long but this is a huge change to review and the testing infrastructure was only just worked out. Thanks for the update. >Your dashboard script still says > > set(ENV{PATH}) > >instead of > > set(ENV{PATH} "c:\\Windows\\system32;c:\\Windows") > We should test with at least the basic Windows PATH set. I made the change just now. I'll rerun the tests. Let me know if there is anything more I can do. Geoffrey Viola SOFTWARE ENGINEER asirobots.com -----Original Message----- From: Brad King [mailto:brad.king at kitware.com] Sent: Friday, February 27, 2015 9:03 AM To: Geoffrey Viola Cc: cmake-developers at cmake.org Subject: Re: FW: FW: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support On 02/27/2015 10:56 AM, Geoffrey Viola wrote: > Is there something I can do to improve or expedite the process of > pulling my changes? Sorry it's taking so long but this is a huge change to review and the testing infrastructure was only just worked out. Your dashboard script still says set(ENV{PATH}) instead of set(ENV{PATH} "c:\\Windows\\system32;c:\\Windows") We should test with at least the basic Windows PATH set. Thanks, -Brad This message contains confidential information and is intended only for the recipient. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately if you have received this e-mail by mistake and delete this e-mail from your system. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From mantis at public.kitware.com Fri Feb 27 16:22:34 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Fri, 27 Feb 2015 16:22:34 -0500 Subject: [cmake-developers] [CMake 0015426]: Segfault/assertion for invalid/unknown _STANDARD Message-ID: The following issue has been SUBMITTED. ====================================================================== https://public.kitware.com/Bug/view.php?id=15426 ====================================================================== Reported By: Nils Gladitz Assigned To: Stephen Kelly ====================================================================== Project: CMake Issue ID: 15426 Category: (No Category) Reproducibility: always Severity: crash Priority: normal Status: assigned ====================================================================== Date Submitted: 2015-02-27 16:22 EST Last Modified: 2015-02-27 16:22 EST ====================================================================== Summary: Segfault/assertion for invalid/unknown _STANDARD Description: Setting the _STANDARD property to an invalid/unknown value results in segfault (release) or assertion (debug). Steps to Reproduce: cmake_minimum_required(VERSION 3.2) project(Foo CXX) set(CMAKE_CXX_STANDARD "foobar") file(WRITE foo.cpp) add_library(foo STATIC foo.cpp) ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-27 16:22 Nils Gladitz New Issue 2015-02-27 16:22 Nils Gladitz Status new => assigned 2015-02-27 16:22 Nils Gladitz Assigned To => Stephen Kelly ====================================================================== From ono at java.pl Sat Feb 28 11:59:55 2015 From: ono at java.pl (Adam Strzelecki) Date: Sat, 28 Feb 2015 17:59:55 +0100 Subject: [cmake-developers] RFC: CMake precompiled header support and custom compiler based implementation Message-ID: Dear CMake developers, I wish to raise up the subject about native precompiled header support in CMake. There are obvious reasons to use precompiled headers with big source code bases, and there were several requests on the list for precompiled header support and several 3rd party implementations. Now I wish to share mine: https://github.com/nanoant/CMakePCHCompiler The main goal is to solve shortcomings on all solutions using custom commands, that simply are not able to catch all compiler defines or flags, like these added via add_definitions, simply because these flags are accessible via any variable back to custom function. My solution uses a CXX meta-compiler (CXXPCH) that simply defines patched compiler run template. This ensures that all defines and flags also apply to precompiled header. I also want to suggest to put native precompiled header support somewhere high on the TODO list and I propose this simple API for specifying precompiled header for given target: target_precompiled_header( ) target_precompiled_header( SHARED ) Regards, -- Adam From mantis at public.kitware.com Sat Feb 28 12:55:00 2015 From: mantis at public.kitware.com (Mantis Bug Tracker) Date: Sat, 28 Feb 2015 12:55:00 -0500 Subject: [cmake-developers] [CMake 0015427]: Xcode generation omits CXX flags for linking Message-ID: The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15427 ====================================================================== Reported By: Clinton Stimpson Assigned To: ====================================================================== Project: CMake Issue ID: 15427 Category: CMake Reproducibility: have not tried Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-28 12:55 EST Last Modified: 2015-02-28 12:55 EST ====================================================================== Summary: Xcode generation omits CXX flags for linking Description: If I set CXXFLAGS (env var) or CMAKE_CXX_FLAGS, the resulting Xcode project does not contain those flags when linking C++ binaries, but a resulting Makefile does. This can result in link errors when building with Xcode which one does not see when building with Makefiles. Steps to Reproduce: Using the attached project, build using Makefiles and it works fine. Build with Xcode and one gets link errors about unresolved symbols from the standard c++ library. Notice how the -stdlib=libstdc++ flag is missing from the link command under Xcode. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-28 12:55 Clinton StimpsonNew Issue 2015-02-28 12:55 Clinton StimpsonFile Added: test-stdlib.tar ====================================================================== From amine.khaldi at reactos.org Sat Feb 28 14:16:22 2015 From: amine.khaldi at reactos.org (Amine Khaldi) Date: Sat, 28 Feb 2015 20:16:22 +0100 Subject: [cmake-developers] RFC: CMake precompiled header support and custom compiler based implementation In-Reply-To: References: Message-ID: <54F21406.9060809@reactos.org> Hi Adam, First of all thank you for working on PCH support, it's something we greatly appreciate at ReactOS, even though right now we're using Peter K?mmel's solution. It didn't make it upstream but it's working nicely for us for quite a while. Does your solution support Ninja generator? I ask because any existing solution based on upstream CMake won't work with the Ninja generator. Peter's solution is the only existing solution we know about. Does your solution support C source files/targets? you mentioned "meta C++ compiler" so it seems to be C++ centric IIUC. Regards, Amine. From dpb at corrigendum.ru Sat Feb 28 18:38:52 2015 From: dpb at corrigendum.ru (=?UTF-8?q?=D0=A0=D0=BE=D0=BC=D0=B0=D0=BD=20=D0=94=D0=BE=D0=BD=D1=87=D0=B5=D0=BD=D0=BA=D0=BE?=) Date: Sun, 1 Mar 2015 02:38:52 +0300 Subject: [cmake-developers] [PATCH] CPack: be more stringent when selecting variables to encode Message-ID: <1425166732-6388-1-git-send-email-dpb@corrigendum.ru> The old version would admit, for example, a variable named "xxxCPACK". --- Modules/CPack.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index ce1536e..532596d 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -314,7 +314,7 @@ macro(cpack_encode_variables) set(_CPACK_OTHER_VARIABLES_) get_cmake_property(res VARIABLES) foreach(var ${res}) - if("xxx${var}" MATCHES "xxxCPACK") + if(var MATCHES "^CPACK") set(_CPACK_OTHER_VARIABLES_ "${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")") endif() -- 2.1.4