[cmake-developers] CMake Xcode Scheme generator
I'm looking at replacing our CMake XCode Scheme generation with CMake's. * Is there a way to only make XCode schemes for some targets? As well as using CMAKE_XCODE_GENERATE_SCHEME is it possible to use XCODE_GENERATE_SCHEME as a target property perhaps? This is useful if you have many targets and want to choose most important ones for the UI. * Has anyone looked at 'run as root'? This was the main reason why we implemented scheme generation originally. I can prepare a PR if not. Best, Harry Harry Mallon Senior Software Engineer T+44 203 7000 989 60 Poland Street | London | England | W1F 7NT -- 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: https://cmake.org/mailman/listinfo/cmake-developers
Re: [CMake] Visual Studio 2015 Generator crash 3.13
Hi again all, I have some more information. https://gitlab.kitware.com/cmake/cmake/commit/83ddc4d2891a0bbb06fb1e3daa00245b3c23eddc That commit causes the crash. When sdks[0] is used I have no SDKs left in the list as it finds 2 but both are a higher version than "10.0.14393.0" which is apparently “The last Windows 10 SDK version that VS 2015 can target”. I am currently downloading a lower SDK version to test. Harry Harry Mallon Senior Software Engineer [http://codex.online/?action=asset=E3D62C3D-A12C-447D-87A5-F36E7C2AA9A4]<https://codex.online/> T +44 203 7000 989 60 Poland Street | London | England | W1F 7NT [http://admin.codex.online/?action=asset=132CD8A9-76B5-48B4-80D3-F5E5C57FB76E] A Star is Born Halloween 13 Reasons Why -- 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: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Visual Studio 2015 Generator crash 3.13
Hi Niels, Apologies for not replying inline, that email didn’t get through (except in the digest). I can reproduce it with that short project file (also with the INTERPROCEDURAL_OPTIMIZATION_RELEASE line commented out). I have just spent some time trying to debug it, but I don’t have a full copy of Visual Studio. I have this information from CDB.exe. Is that more use? = C:\Users\root\temp\build>"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe" -g -y "C:\Users\root\Downloads\cmake-3.13.0\cmake-3.13.0\build\bin\cmake.pdb" "C:\Users\root\Downloads\cmake-3.13.0\cmake-3.13.0\build\bin\cmake.exe" -Ax64 -G"Visual Studio 14 2015" ../ Microsoft (R) Windows Debugger Version 10.0.17763.132 AMD64 Copyright (c) Microsoft Corporation. All rights reserved. CommandLine: "C:\Users\root\Downloads\cmake-3.13.0\cmake-3.13.0\build\bin\cmake.exe" -Ax64 -G"Visual Studio 14 2015" ../ Error: Change all symbol paths attempts to access 'C:\Users\root\Downloads\cmake-3.13.0\cmake-3.13.0\build\bin\cmake.pdb' failed: 0x57 - The parameter is incorrect. * Path validation summary ** Response Time (ms) Location Error C:\Users\root\Downloads\cmake-3.13.0\cmake-3.13.0\build\bin\cmake.pdb Symbol search path is: C:\Users\root\Downloads\cmake-3.13.0\cmake-3.13.0\build\bin\cmake.pdb Executable search path is: ModLoad: 7ff7`6b16 7ff7`6c6ae000 cmake.exe ModLoad: 7ffd`2e00 7ffd`2e1e1000 ntdll.dll < -- snip -- > (3100.3104): C++ EH exception - code e06d7363 (first chance) (3100.3104): C++ EH exception - code e06d7363 (!!! second chance !!!) *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\System32\KERNELBASE.dll - *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\SYSTEM32\VCRUNTIME140D.dll - KERNELBASE!RaiseException+0x68: 7ffd`2a4aa388 488b8c24c000 mov rcx,qword ptr [rsp+0C0h] ss:0029`62788fc0=582dcaa7f282 0:000> ===== Thanks, Harry Harry Mallon Senior Software Engineer [http://codex.online/?action=asset=E3D62C3D-A12C-447D-87A5-F36E7C2AA9A4]<https://codex.online/> T +44 203 7000 989 60 Poland Street | London | England | W1F 7NT [http://admin.codex.online/?action=asset=132CD8A9-76B5-48B4-80D3-F5E5C57FB76E] A Star is Born Halloween 13 Reasons Why -- 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: https://cmake.org/mailman/listinfo/cmake
[CMake] Visual Studio 2015 Generator crash 3.13
Hi, I just updated to CMake 3.13 (to get the IPO in Visual Studio). I am using Visual Studio Build tools 2017 (with 2015 extra tools installed). This crashes (without any feedback): call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_x64 -vcvars_ver=14.0 cmake -Ax64 -G"Visual Studio 14 2015" -DHDE_CREATE_DOCS=%MAKE_DOCS% -DBOOST_ROOT="C:\Libraries\boost_1_66_0" ../ However this works fine: cmake -Ax64 -G"Visual Studio 15 2017" -DHDE_CREATE_DOCS=%MAKE_DOCS% -DBOOST_ROOT="C:\Libraries\boost_1_66_0" ../ Any ideas? I don’t have a debugger on Windows to look at it at the moment. Best, Harry Harry Mallon Senior Software Engineer [http://codex.online/?action=asset=E3D62C3D-A12C-447D-87A5-F36E7C2AA9A4]<https://codex.online/> T +44 203 7000 989 60 Poland Street | London | England | W1F 7NT [http://admin.codex.online/?action=asset=132CD8A9-76B5-48B4-80D3-F5E5C57FB76E] A Star is Born Halloween 13 Reasons Why -- 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: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] How to find GTK3 in CMake
Hi again, Thanks David and Eric. I have actually used cmake’s pkgconfig integration to support this library. As you say (about it not being very portable) I only needed it on Linux so pkgconfig is a reasonable thing to use. Thanks, Harry Harry Mallon Senior Software Engineer [http://codex.online/?action=asset=E3D62C3D-A12C-447D-87A5-F36E7C2AA9A4]<https://codex.online/> T +44 203 7000 989 60 Poland Street | London | England | W1F 7NT [http://admin.codex.online/?action=asset=132CD8A9-76B5-48B4-80D3-F5E5C57FB76E] A Star is Born Halloween 13 Reasons Why -- 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: https://cmake.org/mailman/listinfo/cmake
[CMake] How to find GTK3 in CMake
Hi, FindGTK and FindGTK2 exist in the CMake tree. How come there isn't one for GTK3? Should the GTK2 one work, or is there another way? Harry Harry Mallon Senior Software Engineer T+44 203 7000 989 60 Poland Street | London | England | W1F 7NT -- 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: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Packaging dylibs into app bundles
Hi all, Fixup_bundle works very well for app bundles and seems to be the way to go! The problem I was previously seeing was fixed by setting CMAKE_INSTALL_RPATH_USE_LINK_PATH to True. This fills in the rpath on the installed executable with enough paths to resolve all the dylibs. I also added a merge request to cmake to fail more obviously if the file cannot be found as in previous message. My next question is: Is there a way to do a fixup bundle without a bundle? i.e. I want to fixup (copy required dylibs, fix otool ids and rpaths etc) a structure like this: /usr/local/myapp/bin/myapp /usr/local/myapp/lib/libA.dylib /usr/local/myapp/lib/libB.dylib # etc Is there a sensible way to do this without rewriting a lot of Bundle Utilities? Best, Harry From: Harry Mallon Date: Thursday, 19 July 2018 at 19:04 To: Stephen McDowell Cc: CMake MailingList Subject: Re: [CMake] Packaging dylibs into app bundles Hi, I have been messing arounds with fixup_bundle (which seems to be the correct function). It worked for a small test case, but only if the dylibs required had otool ids of their full path. Ours currently have rpath based ones (e.g. @rpath/libcrypto.dylib). So I get a lot of: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: '@rpath/ libcrypto.dylib’: No such file or directory Hmm, seems like the stuff is there somewhere to make this work… Best, Harry From: Stephen McDowell Date: Thursday, 19 July 2018 at 17:35 To: Harry Mallon Cc: CMake MailingList Subject: Re: [CMake] Packaging dylibs into app bundles Hi Harry, I don't know how useful this will be, but the Instant Meshes application creates an app bundle that has always worked reliably for me. Looking at the code, it doesn't appear like there's much custom stuff going on either. It starts here https://github.com/wjakob/instant-meshes/blob/011fa44ab72037cbc16535090a63ead41963c1e5/CMakeLists.txt#L151 And there's an if APPLE block below that appears to be the core. Hope that is useful :) I've never actually done this for any of my own projects though. And I'm pretty sure them setting the underlying GUI library and TBB to be static (as opposed to shared) is skirting around the issue that you are trying to solve (dylib stuff)... -Stephen On Thu, Jul 19, 2018, 9:03 AM Harry Mallon wrote: Hello all, Is there a good tutorial/article on getting CMake to package required dylibs and frameworks into an app bundle for you on mac. We have a lot of custom stuff to do it and it is fragile and breaks a lot. Thanks, Harry Harry Mallon Senior Software Engineer [Image removed by sender.]<https://codex.online/> T +44 203 7000 989 60 Poland Street | London | England | W1F 7NT [Image removed by sender.] Three Billboards Blade Runner 2049 I, Tonya -- Powered by www.kitware.com<http://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: https://cmake.org/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: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Packaging dylibs into app bundles
Hi, I have been messing arounds with fixup_bundle (which seems to be the correct function). It worked for a small test case, but only if the dylibs required had otool ids of their full path. Ours currently have rpath based ones (e.g. @rpath/libcrypto.dylib). So I get a lot of: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: '@rpath/ libcrypto.dylib’: No such file or directory Hmm, seems like the stuff is there somewhere to make this work… Best, Harry From: Stephen McDowell Date: Thursday, 19 July 2018 at 17:35 To: Harry Mallon Cc: CMake MailingList Subject: Re: [CMake] Packaging dylibs into app bundles Hi Harry, I don't know how useful this will be, but the Instant Meshes application creates an app bundle that has always worked reliably for me. Looking at the code, it doesn't appear like there's much custom stuff going on either. It starts here https://github.com/wjakob/instant-meshes/blob/011fa44ab72037cbc16535090a63ead41963c1e5/CMakeLists.txt#L151 And there's an if APPLE block below that appears to be the core. Hope that is useful :) I've never actually done this for any of my own projects though. And I'm pretty sure them setting the underlying GUI library and TBB to be static (as opposed to shared) is skirting around the issue that you are trying to solve (dylib stuff)... -Stephen On Thu, Jul 19, 2018, 9:03 AM Harry Mallon wrote: Hello all, Is there a good tutorial/article on getting CMake to package required dylibs and frameworks into an app bundle for you on mac. We have a lot of custom stuff to do it and it is fragile and breaks a lot. Thanks, Harry Harry Mallon Senior Software Engineer [Image removed by sender.]<https://codex.online/> T +44 203 7000 989 60 Poland Street | London | England | W1F 7NT [Image removed by sender.] Three Billboards Blade Runner 2049 I, Tonya -- Powered by www.kitware.com<http://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: https://cmake.org/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: https://cmake.org/mailman/listinfo/cmake
[CMake] Packaging dylibs into app bundles
Hello all, Is there a good tutorial/article on getting CMake to package required dylibs and frameworks into an app bundle for you on mac. We have a lot of custom stuff to do it and it is fragile and breaks a lot. Thanks, Harry Harry Mallon Senior Software Engineer [http://codex.online/?action=asset=E3D62C3D-A12C-447D-87A5-F36E7C2AA9A4]<https://codex.online/> T +44 203 7000 989 60 Poland Street | London | England | W1F 7NT [http://codex.online/?action=asset=6F42BDF2-3C6D-4054-A5D2-277E0E535942] Three BillboardsBlade Runner 2049I, Tonya -- 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: https://cmake.org/mailman/listinfo/cmake
Re: [cmake-developers] Retrieving OS Version in CMake
Hi Brad, I hadn't seen cmake_host_system_information, that is pretty useful. It already parses "sw_vers" on macOS. "OS_RELEASE" is "10.13.5" for example. So that is half of the problem. This does mean that "OS_NAME" does not equal "CMAKE_HOST_SYSTEM_NAME" on macOS, which is indicated by the docs. (https://cmake.org/cmake/help/v3.11/command/cmake_host_system_information.html). Would you say on Linux we would change the values of current cmake_host_system_information variables to match the intent on macOS? Or is it best to add new fields? e.g. one of the below? * OS_NAME: "Linux" -> "Fedora", OS_RELEASE: "$(uname -r)" -> "28" * OS_RELEASE: "$(uname -r)" -> "Fedora 28" * LINUX_DISTRO: "Fedora 28" It seems at the moment that macOS behaves slightly differently to Linux. I haven’t tried Windows or other yet. Maybe the docs for cmake_host_system_information should be expanded to cover behaviour on common platforms and a little more info on intent of each thing? Best, Harry Harry Mallon CODEX | Senior Software Engineer 60 Poland Street | London | England | W1F 7NT E harry.mallon@codex.online | T +44 203 7000 989 -- 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: https://cmake.org/mailman/listinfo/cmake-developers
[cmake-developers] Retrieving OS Version in CMake
Hello all, We have some CMake code that sanity checks the build and checks for our supported operating systems. Would there be a use case for a Module that could retrieve OS name and version (e.g. on macOS parse “sw_vers” to get “Mac OS X” and “10.13.4”, on Linux parse /etc/os-release to get “Fedora” and “28”)? Is there already a way to get these in CMake? Best, Harry Harry Mallon Senior Software Engineer [http://codex.online/?action=asset=E3D62C3D-A12C-447D-87A5-F36E7C2AA9A4]<https://codex.online/> T +44 203 7000 989 60 Poland Street | London | England | W1F 7NT [http://codex.online/?action=asset=6F42BDF2-3C6D-4054-A5D2-277E0E535942] Three BillboardsBlade Runner 2049I, Tonya -- 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: https://cmake.org/mailman/listinfo/cmake-developers
[cmake-developers] COMPILE_OPTIONS or COMPILE_FLAGS
Hi all, I just noticed that COMPILE_OPTIONS is 3.11.0 only. I can’t understand from the docs which of COMPILE_OPTIONS or COMPILE_FLAGS is preferred and why I might use one or the other. I will use COMPILE_FLAGS as it is supported on 3.10 (which we have on our linux build machine) for now. I am specifically talking about adding “-mavx” to one file in particular but would prefer a general answer if anyone knows. Thanks, Harry Harry Mallon Senior Software Engineer [http://codex.online/?action=asset=E3D62C3D-A12C-447D-87A5-F36E7C2AA9A4]<https://codex.online/> T +44 203 7000 989<callto:+44%20203%207000%20989> 60 Poland Street | London | England | W1F 7NT [http://codex.online/?action=asset=6F42BDF2-3C6D-4054-A5D2-277E0E535942] Three BillboardsBlade Runner 2049I, Tonya -- 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: https://cmake.org/mailman/listinfo/cmake-developers
[CMake] MSVC C features
Could MSVC be made to work with target_compile_features for C language features? I assume we would need an MSVC-C.cmake file with definitions. At a glance I imagine something simple would do? * C90 available for all supported MSVC * C99 supported/default from MSVC 18.0 = 2013 (https://blogs.msdn.microsoft.com/vcblog/2013/07/19/c99-library-support-in-visual-studio-2013/) * C11 not supported There are no compile flags (like MSVC-CXX.cmake) and some of the C99 features have been supported back to MSVC 2005/2008. Would that work or is there a reason this is not implemented? Best, Harry Harry Mallon CODEX | Senior Software Engineer 60 Poland Street | London | England | W1F 7NT E harry.mallon@codex.online | T +44 203 7000 989 -- 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: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Swift executables with MACOSX_BUNDLE fail to find libswiftCore.dylib
Hi Lucas, With Swift there is a required standard dylib that must be included (and Xcode copies by default). So perhaps CMake should automatically add the rpath option to the Xcode command line? Harry From: Lucas Šoltić <lucas.sol...@orange.fr> Date: Friday, 2 March 2018 at 23:20 To: Harry Mallon <Harry.Mallon@codex.online> Cc: "cmake@cmake.org" <cmake@cmake.org> Subject: Re: [CMake] Swift executables with MACOSX_BUNDLE fail to find libswiftCore.dylib You miss a runtime search path when linking your executable. And this is what you achieved with install_name_tool with an additional step. To avoid this additional step, see https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html or https://stackoverflow.com/questions/42613881/adding-run-time-shared-library-search-path-to-executable-at-compile-time-clang By the way this is not related to Swift at all. Lucas Le 2 mars 2018 à 20:12, Harry Mallon <Harry.Mallon@codex.online<mailto:Harry.Mallon@codex.online>> a écrit : Hello all, When making a pure Swift bundle Xcode automatically copies `libswiftCore.dylib` as follows. ``` ./Tests/SwiftOnly/Debug/SwiftOnly.app └── Contents ├── Frameworks │ └── libswiftCore.dylib ├── Info.plist ├── MacOS │ └── SwiftOnly ├── PkgInfo └── Resources └── libswiftRemoteMirror.dylib ``` When I try to run the output I get a dynamic linking error. I can reproduce this by adding MACOSX_BUNDLE to `./Tests/SwiftOnly/CMakeLists.txt` (in the CMake source tree) in `add_executable` and trying to run the result. ``` % ./Tests/SwiftOnly/Debug/SwiftOnly.app/Contents/MacOS/SwiftOnly dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: .../Tests/SwiftOnly/Debug/SwiftOnly.app/Contents/MacOS/SwiftOnly Reason: image not found zsh: abort ./Tests/SwiftOnly/Debug/SwiftOnly.app/Contents/MacOS/SwiftOnly ``` It seems that the rpath should be set to `@loader_path/../Frameworks`. I am not a Swift maestro so not exactly sure on the details of how this works. After running `install_name_tool -add_rpath "@loader_path/../Frameworks" ./Tests/SwiftOnly/Debug/SwiftOnly.app/Contents/MacOS/SwiftOnly` it runs fine. Does anyone have any idea what to do? Is it a missing CMake Swift feature? We are currently working around it by manually adding the rpath with a cmake step. Harry Harry Mallon Senior Software Engineer [Image removed by sender.]<https://codex.online/> T +44 203 7000 989<callto:+44%20203%207000%20989> 60 Poland Street | London | England | W1F 7NT [Image removed by sender.] Three Billboards Blade Runner 2049 I, Tonya -- Powered by www.kitware.com<http://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: https://cmake.org/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: https://cmake.org/mailman/listinfo/cmake
[CMake] Swift executables with MACOSX_BUNDLE fail to find libswiftCore.dylib
Hello all, When making a pure Swift bundle Xcode automatically copies `libswiftCore.dylib` as follows. ``` ./Tests/SwiftOnly/Debug/SwiftOnly.app └── Contents ├── Frameworks │ └── libswiftCore.dylib ├── Info.plist ├── MacOS │ └── SwiftOnly ├── PkgInfo └── Resources └── libswiftRemoteMirror.dylib ``` When I try to run the output I get a dynamic linking error. I can reproduce this by adding MACOSX_BUNDLE to `./Tests/SwiftOnly/CMakeLists.txt` (in the CMake source tree) in `add_executable` and trying to run the result. ``` % ./Tests/SwiftOnly/Debug/SwiftOnly.app/Contents/MacOS/SwiftOnly dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: .../Tests/SwiftOnly/Debug/SwiftOnly.app/Contents/MacOS/SwiftOnly Reason: image not found zsh: abort ./Tests/SwiftOnly/Debug/SwiftOnly.app/Contents/MacOS/SwiftOnly ``` It seems that the rpath should be set to `@loader_path/../Frameworks`. I am not a Swift maestro so not exactly sure on the details of how this works. After running `install_name_tool -add_rpath "@loader_path/../Frameworks" ./Tests/SwiftOnly/Debug/SwiftOnly.app/Contents/MacOS/SwiftOnly` it runs fine. Does anyone have any idea what to do? Is it a missing CMake Swift feature? We are currently working around it by manually adding the rpath with a cmake step. Harry Harry Mallon Senior Software Engineer [http://codex.online/?action=asset=E3D62C3D-A12C-447D-87A5-F36E7C2AA9A4]<https://codex.online/> T +44 203 7000 989<callto:+44%20203%207000%20989> 60 Poland Street | London | England | W1F 7NT [http://codex.online/?action=asset=6F42BDF2-3C6D-4054-A5D2-277E0E535942] Three BillboardsBlade Runner 2049I, Tonya -- 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: https://cmake.org/mailman/listinfo/cmake
[CMake] add_subdirectory and common libraries
Hello all, Has anyone got any good recommendations for the following setup? “large_repo” contains code for a binary and two git submodules. One is “library” which is added with add_subdirectory(). The other is some common library “util_library” (something like gtest which is generally useful) which is added as a git submodule with add_subdirectory(). “library” also needs “util_library” which is added to its repo in the same git submodule style. It is possible to namespace the names in an add_subdirectory call? Or something like that? Or maybe I should go back to the install and find_package() methods I used to use? └── large_repo ├── library │ └── util_library └── util_library Thanks, Harry Harry Mallon CODEX | Senior Software Engineer 60 Poland Street | London | England | W1F 7NT E harry.mallon@codex.online | T +44 203 7000 989 -- 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
Re: [CMake] Using XCODE_PRODUCT_TYPE to make kexts
Hi Gregor, With a CMake file similar to the following I seem to be able to make proper kexts with the latest nightly 3.7.20170113-g26509. At least they seem to be working, I have been bitten before. "kextutil -nt X.kext" is useful for testing them. This could close the issue https://gitlab.kitware.com/cmake/cmake/issues/13487. Harry find_path(KERNEL_INCLUDE_DIR IOKit/pci/IOPCIDevice.h) add_library(driver MODULE Kext.cpp Kext.h ) target_include_directories(driver PRIVATE ${KERNEL_INCLUDE_DIR} ) set(driver_name "Driver") set(driver_id "com.driver.driver") set(driver_version "1.0.0") set_target_properties(driver PROPERTIES BUNDLE YES BUNDLE_EXTENSION kext INSTALL_RPATH "" # rpath must not be set! MACOSX_BUNDLE_BUNDLE_NAME ${driver_name} MACOSX_BUNDLE_BUNDLE_VERSION ${driver_version} MACOSX_BUNDLE_GUI_IDENTIFIER ${driver_id} MACOSX_BUNDLE_INFO_PLIST CmakeTemplate.plist.in OUTPUT_NAME ${driver_name} XCODE_ATTRIBUTE_MODULE_NAME ${driver_id} XCODE_ATTRIBUTE_MODULE_VERSION ${driver_version} XCODE_PRODUCT_TYPE "com.apple.product-type.kernel-extension.iokit" ) install(TARGETS driver DESTINATION Library/Extensions COMPONENT driver ) # Now we do a signing routine which we rolled ourselves ==== Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website<http://codex.online> | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://codex.online/?action=asset=5B21DF7C-EC27-4199-852F-D596F5F28DA9]<http://codex.online> -- 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
Re: [CMake] Using XCODE_PRODUCT_TYPE to make kexts
Hi again, Sorry look like it is not in the release build yet. Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website<http://codex.online> | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://codex.online/?action=asset=5B21DF7C-EC27-4199-852F-D596F5F28DA9]<http://codex.online> On 16 Jan 2017, at 14:37, Harry Mallon <ha...@codexdigital.com<mailto:ha...@codexdigital.com>> wrote: Hello, I am almost there making kexts with XCode generator and CMake. However they appear as "com.apple.product-type.bundle" rather than "com.apple.product-type.kernel-extension.iokit" in the Xcode project file. This means they do not get the Xcode/kext magic compile line without lots of manual setting (which I can't get right at the moment). Looking at the code https://gitlab.kitware.com/cmake/cmake/blob/master/Source/cmGlobalXCodeGenerator.cxx it seems setting XCODE_PRODUCT_TYPE on the target should work. But it doesn't work for me. Any ideas? Harry -- 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
[CMake] Using XCODE_PRODUCT_TYPE to make kexts
Hello, I am almost there making kexts with XCode generator and CMake. However they appear as "com.apple.product-type.bundle" rather than "com.apple.product-type.kernel-extension.iokit" in the Xcode project file. This means they do not get the Xcode/kext magic compile line without lots of manual setting (which I can't get right at the moment). Looking at the code https://gitlab.kitware.com/cmake/cmake/blob/master/Source/cmGlobalXCodeGenerator.cxx it seems setting XCODE_PRODUCT_TYPE on the target should work. But it doesn't work for me. Any ideas? Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website<http://codex.online> | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://codex.online/?action=asset=5B21DF7C-EC27-4199-852F-D596F5F28DA9]<http://codex.online> -- 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
[CMake] Up to date iOS instructions
Hello, Are there any up to date instructions for doing iOS builds? There are load of tutorials going back many years on Google. I am using something based on this https://github.com/cristeab/ios-cmake as a toolchain file currently but I am seeing the ${EFFECTIVE_PLATFORM_NAME} generator expression problem mentioned here last year (https://cmake.org/pipermail/cmake/2016-March/063113.html). I have heard something about CMAKE_OSX_SYSROOT = iphoneos and maybe CMAKE_IOS_INSTALL_COMBINED? Yours, Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website<http://codex.online> | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://codex.online/?action=asset=5B21DF7C-EC27-4199-852F-D596F5F28DA9]<http://codex.online> -- 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
[cmake-developers] CPackProductbuild Scripts
Hello, I am messing around with the CPackProductbuild stuff to try to port over what we had before. Currently it support undocumented options "CPACK_PREFLIGHT_SCRIPT", "CPACK_POSTFLIGHT_SCRIPT", "CPACK_PREFLIGHT__SCRIPT" and "CPACK_POSTFLIGHT__SCRIPT". It looks like these are also supported (also undocumented) in CPackPackageMaker. Are these options good names? Do they need to be these for ease of porting from Package Maker? Should they start with CPACK_PRODUCTBUILD_* as they are not generic? If the current names are fine I can prepare a pull req with documentation. Yours, Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] GitLab speed
Hello all, While I appreciate having an integrated workflow and well defined contributing rules is useful for CMake I am finding it hard to get used to GitLab. The main reason is speed. Creating merge requests, moving around the interface and even pushing to repos seems to be much slower than the equivalent thing on github. I am not sure whether this report is constructive at all so feel free to dismiss my moaning. Yours, Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [CMake] Find packages coming from homebrew
Hi Cedric, You might be interested in "brew --prefix" which gives you the location of the brew install. e.g. for me. % brew --prefix /usr/local Also brew symlinks the current version of all programs into the "brew --prefix" folder. Do "ls -lah /usr/local/bin" and you should see what I mean. I hope some of this is helpful. Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website<http://codex.online> | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://codex.online/?action=asset=5B21DF7C-EC27-4199-852F-D596F5F28DA9]<http://codex.online> -- 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
[cmake-developers] FindOpenSSL binaries
Hello, 1. We use the openssl binary for encrypting things in a cmake step. It would be nice if FindOpenSSL could find the binary "openssl" as well as the includes and libs, so we can use the same versions as we link easily. Maybe something like the below would do: ... # ``OPENSSL_EXECUTABLE `` # The openssl binary. ... find_path(OPENSSL_EXECUTABLE NAMES openssl ${_OPENSSL_ROOT_HINTS_AND_PATHS} PATH_SUFFIXES bin ) ... 2. Should "OPENSSL_INCLUDE_DIR" be "OPENSSL_INCLUDE_DIRS" or is that not a hard-and-fast rule? Thanks, Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[CMake] xcode-select and CMake -G Xcode
Hello, I saw XCode 8 was released so i duplicated my XCode install and updated it. CMake now fails if I use xcode-select -s to choose the old XCode. It seems that if the XCode path has a space in it it fails. i.e. With "xcode-select -s /Applications/Xcode\ copy.app/Contents/Developer": $ cmake -GXcode ../src/ -- The C compiler identification is AppleClang 7.3.0.7030031 -- The CXX compiler identification is AppleClang 7.3.0.7030031 CMake Error at CMakeLists.txt:71 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:71 (project): No CMAKE_CXX_COMPILER could be found. -- Configuring incomplete, errors occurred! With "xcode-select -s /Applications/Xcode2.app/Contents/Developer" it is fine and this is a reasonable workaround for me. Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 -- 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
[CMake] OSX Code Signing best practice
Hello all, What is the current best practice for code signing OSX .apps and binaries? I am using: 1. MAC_OSX_BUNDLE for my .app targets. 2. unix style executables 3. dylibs 4. A prefpane (which I haven't got working yet) using something like the below: add_library(prefpane MODULE ${sourceFiles} ) set_target_properties(codexprefpane PROPERTIES BUNDLE YES BUNDLE_EXTENSION prefPane XCODE_ATTRIBUTE_WRAPPER_EXTENSION prefPane MACOSX_BUNDLE_INFO_PLIST ${prefpane_plist_file} ) I am not using the CPackBundle generator so I cannot use the signing in that. I have tried: 1. Using set_target_properties( "XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY" "${SIGN_ID}") 2. Using an add_custom_command step. This code signs before all the Resources are copied in so the signatures are invalid Any ideas? Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 -- 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
Re: [cmake-developers] CpackRPM doesn't escape filenames
Hi Brad, A simple version, which covers the main test case is shown here. The %files list in the auto spec file shows "%dist.txt" when I think it should show "%%dist.txt". Even when I manually changed it to %% it didn't work for me though. Maybe someone who knows RPM better would be able to tell me why. Other cases could also be tested by adding more files (for those who have any of ?|*.\'" in their file names). -- CMakeLists.txt: cmake_minimum_required(VERSION 3.5) set(CPACK_GENERATOR "RPM") project(Test) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/%dist.txt" "") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/%dist.txt" DESTINATION foo ) include(CPack) Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 > On 11 Jul 2016, at 19:10, Brad King <brad.k...@kitware.com> wrote: > > On 07/11/2016 11:32 AM, Harry Mallon wrote: >> When using CPackRPM my filenames in auto generated RPM SPEC >> look like "/usr/share/foo/bar10%.xml" when the "%" symbol >> (which is in the filename should be escaped to "%%". > > Thanks. Please open an issue here: > > https://gitlab.kitware.com/cmake/cmake/issues > > Ideally please include a http://sscce.org/ showing how to > reproduce the problem. Then perhaps it can be adapted as > a test case. > > Thanks, > -Brad > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Some CPackRPM Debug print is printing without DEBUG On
Doh. Less haste more speed. Thanks. Patch 2. H Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 0001-Make-sure-CPackRPM-Debug-print-about-Auto-Filelist-o.patch Description: 0001-Make-sure-CPackRPM-Debug-print-about-Auto-Filelist-o.patch > On 11 Jul 2016, at 13:13, Domen Vrankar <domen.vran...@gmail.com> wrote: > > 2016-07-11 13:50 GMT+02:00 Harry Mallon <ha...@codexdigital.com>: >> I get this line printed a lot even without CPACK_RPM_PACKAGE_DEBUG turned on. >> >> "CPackRPM:Debug: Adding >> /usr/lib/systemd;/usr/lib/systemd/system;/usr/lib/systemd/system-preset;/usr/lib/udev;/usr/lib/udev/rules.d;/usr/etc;/etc/security;/etc/security/limits.d >> to builtin omit list." >> >> Patch attached > > Provided patchi disables both debug message as well as > CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST functionality. That if statement > should not be changed and instead a new if statement wrapping only > message should be added. > > Regards, > Domen > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Some CPackRPM Debug print is printing without DEBUG On
I get this line printed a lot even without CPACK_RPM_PACKAGE_DEBUG turned on. "CPackRPM:Debug: Adding /usr/lib/systemd;/usr/lib/systemd/system;/usr/lib/systemd/system-preset;/usr/lib/udev;/usr/lib/udev/rules.d;/usr/etc;/etc/security;/etc/security/limits.d to builtin omit list." Patch attached Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 0001-Make-sure-CPackRPM-Debug-print-about-Auto-Filelist-o.patch Description: 0001-Make-sure-CPackRPM-Debug-print-about-Auto-Filelist-o.patch -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Problem with find_path and Frameworks
Thanks Brad. I haven't run into a mac without /System/Library/Frameworks/Kernel.framework before but maybe it comes from XCode or something. Thanks for merging. Harry. Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Problem with find_path and Frameworks
I have updated my patch with new simplified logic and a test. Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 0001-Fix-a-problem-where-using-find_path-to-find-a-header.patch Description: 0001-Fix-a-problem-where-using-find_path-to-find-a-header.patch Yours, Harry-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [CMake] [OS X] example CMake file to create a Preference Pane?
You might have found something by now, but for others: This seems to be a good start (I haven't got mine working yet but it is a lot closer) https://github.com/open-eid/updater/blob/master/CMakeLists.txt H Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://www.codexdigital.com/?action=asset=E55D8A6F-AF62-4978-8FF1-435A85AFADBF]<http://www.codexdigital.com> -- 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
Re: [cmake-developers] Problem with find_path and Frameworks
I can work around it if need be. I just felt that it was against the stated behaviour of find_path since that function is meant to give the folder where you can find "IOKit/pci/IOPCIDevice.h" rather than the folder where you can find "IOPCIDevice.h". Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 > On 25 May 2016, at 20:44, Eric Wing <ewmail...@gmail.com> wrote: > > On 5/25/16, Harry Mallon <ha...@codexdigital.com> wrote: >> I have quite a specific problem with find_path where >> "find_path(IOKIT_INCLUDE_DIR "IOKit/pci/IOPCIDevice.h")" returns >> "/System/Library/Frameworks/Kernel.framework/Headers/IOKit/pci" rather than >> "/System/Library/Frameworks/Kernel.framework/Headers/". >> >> It is reproducible on OSX with the following CMakeLists.txt: >> >> cmake_minimum_required(VERSION 3.0) >> find_path(IOKIT_INCLUDE_DIR "IOKit/pci/IOPCIDevice.h") >> message("Path returned: ${IOKIT_INCLUDE_DIR}") >> >> Here is a patch which seems to fix it for me: >> > > This is a pretty atypical situation. I’m actually not sure what the > behavior should be. But we need to be careful to not break the > existing cases. I’m a little worried that there may be things out > there relying on the existing behavior. I’m also not convinced this > actually needs a patch. > > > The framework header path system was hammered out over a long period > of time. There are two common use cases that it was designed to > handle: > > case 1: #import > find_path(COCOA_INCLUDE_DIR “Cocoa/Cocoa.h”) > # Returns something like /System/Library/Frameworks/Cocoa.framework > > > case 2: #include “al.h” > find_path(OPENAL_INCLUDE_DIR “al.h”) > # Returns something like /System/Library/Frameworks/OpenAL.framework/Headers > > > The reason for this behavior is that unlike other platforms, > frameworks are not a direct mapping to file system mapping. When > dealing with official Apple frameworks, you are expected to use case > 1. But the second form is an important concession for cross-platform > libraries. The problem is that many libraries, especially 3rd party > libraries, do not end up in subdirectories with the same names on all > platforms. > > For OpenGL, most Unix’s do , but Apple does . > For OpenAL, it is crazier because it depends on which implementation > you use. Apple does , OpenAL Soft does , but > others have presumes no subdirectory at all. > And a lot of third party libraries don’t have any official > conventions, so distributions do everything differently. So for > cross-platform, you are encouraged to do “Foo.h” omitting a path and > letting the build system deal with it (since CMake can do a better job > here than a massive, hand-coded mess of #ifdefs in your files. > > > So your case seems very atypical because you are using something > inside Kernel.framework and the header you want is not in > IOKit.framework. If it was a more typical scenario like > IOKit.framework, > > I would kind of expect you to find a file in IOKit at the top level > instead to represent all your IOKit dealings, e.g. > > find_path(IOKIT_INCLUDE_DIR “IOKit/IOKitLib.h”) > > Then in your code you would do: > #import , and what you get back from CMake > (/System/Library/Frameworks/IOKit.framework) would be correct. > > But since pci doesn’t actually seem to be directly in IOKit, but > instead the Kernel.framework subdirectory mess, I’m not sure what the > appropriate thing is. The normal native Xcode header path search > mechanism doesn’t seem to support this case and I found an old mailing > list thread suggesting that this is Apple’s way of telling you to > keep-out. > > > I would actually be inclined to suggest a much more generic find for > Kernel.framework and build your paths manually from there. > > > So either something simple like: > find_path(KERNEL_INCLUDE_DIR IOKit) > # return /System/Library/Frameworks/Kernel.framework/Headers > > > Or something a little more defensive to avoid possible name > collisions, but requires manual construction: > find_path(KERNEL_INCLUDE_DIR Kernel/IOKit) > # return /System/Library/Frameworks/Kernel.framework > set(KERNEL_IOKIT_INCLUDE_DIR “${KERNEL_INCLUDE_DIR}/Headers”) > > > -Eric > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Problem with find_path and Frameworks
I have quite a specific problem with find_path where "find_path(IOKIT_INCLUDE_DIR "IOKit/pci/IOPCIDevice.h")" returns "/System/Library/Frameworks/Kernel.framework/Headers/IOKit/pci" rather than "/System/Library/Frameworks/Kernel.framework/Headers/". It is reproducible on OSX with the following CMakeLists.txt: cmake_minimum_required(VERSION 3.0) find_path(IOKIT_INCLUDE_DIR "IOKit/pci/IOPCIDevice.h") message("Path returned: ${IOKIT_INCLUDE_DIR}") Here is a patch which seems to fix it for me: Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 0001-Fix-a-problem-where-using-find_path-to-find-a-header.patch Description: 0001-Fix-a-problem-where-using-find_path-to-find-a-header.patch -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Optionally disable /Applications symlink in CPack dragndrop generator
Pull request to optionally disable the /Applications symlink. It is useful when distributing .app files but not needed when distributing other things. https://github.com/Kitware/CMake/pull/246 Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://www.codexdigital.com/?action=asset=E55D8A6F-AF62-4978-8FF1-435A85AFADBF]<http://www.codexdigital.com> -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [CMake] Recommended style for multiple CPack generator folder structures
In answer to my own question. One way to do it which seems quite neat is as follows. Using multiple installs: install(TARGETS bar COMPONENT bar DESTINATION "Applications/Foo" ) install(TARGETS bar COMPONENT bar-standalone DESTINATION "./" # This must be "./" not "/" as it has to be a relative path ) This in your CPACK_PROJECT_CONFIG_FILE: if (CPACK_GENERATOR STREQUAL DragNDrop) set(CPACK_COMPONENTS_ALL bar-standalone) endif() Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 -- 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
[CMake] Recommended style for multiple CPack generator folder structures
On OSX we install an .app to /Applications/Foo/Bar.app. So the install() is set like: add_executable(bar MACOSX_BUNDLE bar.cpp ) install(TARGETS bar COMPONENT bar DESTINATION "Applications/Foo" ) When making DMG (DragNDrop) installers I really want the DMG to contain just the .app bundle rather than the full folder structure. Is there a sensible way to do this? Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 -- 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
[cmake-developers] Very minor doc update
A quick one, CPACK_DMG_FORMAT¶<https://cmake.org/cmake/help/v3.5/module/CPackDMG.html#variable:CPACK_DMG_FORMAT> The disk image format. Common values are UDRO (UDIF read-only), UDZO (UDIF zlib-compressed) or UDBZ (UDIF bzip2-compressed). Refer to hdiutil(1) for more information on other available formats. could be CPACK_DMG_FORMAT¶<https://cmake.org/cmake/help/v3.5/module/CPackDMG.html#variable:CPACK_DMG_FORMAT> The disk image format. Common values are UDRO (UDIF read-only), UDZO (UDIF zlib-compressed) or UDBZ (UDIF bzip2-compressed). Refer to hdiutil(1) for more information on other available formats. Defaults to UDZO. Thanks, Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://www.codexdigital.com/?action=asset=E55D8A6F-AF62-4978-8FF1-435A85AFADBF]<http://www.codexdigital.com> -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[CMake] CPack and PackageMaker
Thanks for your work on this, I hope this can get into the main codebase soon. Currently we use internal productbuild and pkgbuild scripts from our pre-cmake days. Reading through your patch now I have some feedback: 1. Package ID: The pkgid for pkgbuild can often be something other than "com.CPACK_PACKAGE_VENDOR.CPACK_PACKAGE_NAME.component->Name". It might be useful to introduce a new variable "CPACK_PRODUCTBUILD__PKGID" which could override the default behaviour if desired. 2. Pkgbuild Install Location: >From man: "--install-location install-path Specify the default install location for the contents of the package. For example, if you specify a single application component, you might specify an install-path of /Applications. pkgbuild attempts to infer a sensible install path if this option is not used, but it may not choose correctly. Note that whether or not the default install location is actually used by the OS X Installer depends on the distribution file you deploy with the package." Is there any reason why you are not using the default behaviour? We have always used it previously and it would seem to be better than defining "/". 3. Pkgbuild Version: "--version" in pkgbuild command line could be set to "CPACK_PACKAGE_VERSION" to allow normal version checking. 4. Productbuild Version: "--version" in productbuild command line could be set to "CPACK_PACKAGE_VERSION" as well. 5. Finding programs: "// TODO: find pkgbuild and productbuild" could be replaced with cmSystemTools::FindProgram for the two executables and return error messages if they are unavailable (which is unlikely). Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://www.codexdigital.com/?action=asset=E55D8A6F-AF62-4978-8FF1-435A85AFADBF]<http://www.codexdigital.com> -- 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
Re: [cmake-developers] Make CPACK_RPM_PACKAGE_RELEASE match Fedora/RHOS/CentOS recommended behaviour
Hi Domen, That is infinitely simpler. Looks like a good addition to me. Thanks, Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://www.codexdigital.com/?action=asset=E55D8A6F-AF62-4978-8FF1-435A85AFADBF]<http://www.codexdigital.com> On 11 May 2016, at 10:33, Domen Vrankar <domen.vran...@gmail.com<mailto:domen.vran...@gmail.com>> wrote: 0001-CPack-RPM-release-dist-tag-support.patch Description: 0001-CPack-RPM-release-dist-tag-support.patch -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Make CPACK_RPM_PACKAGE_RELEASE match Fedora/RHOS/CentOS recommended behaviour
Hi, Here is another go. I have added a 3rd variable but I think it means that current behaviour is continued and your input (thanks Dolf and Romen) has been addressed. https://github.com/hm1992/CMake/commit/2f54442388ab767f60fcb8cde1db2236ae535080 # CPACK_RPM_DIST if(NOT CPACK_RPM_DIST) execute_process(COMMAND ${RPMBUILD_EXECUTABLE} -E %{?dist} OUTPUT_VARIABLE CPACK_RPM_DIST ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) endif() # CPACK_RPM_PACKAGE_RELEASE_NUMBER # The RPM release is the numbering of the RPM package ITSELF # this is the version of the PACKAGING and NOT the version # of the CONTENT of the package. # You may well need to generate a new RPM package release # without changing the version of the packaged software. # This is the case when the packaging is buggy (not) the software :=) # If not set, 1 is a good candidate. if(NOT CPACK_RPM_PACKAGE_RELEASE_NUMBER) set(CPACK_RPM_PACKAGE_RELEASE_NUMBER "1") endif() # CPACK_RPM_PACKAGE_RELEASE if(NOT CPACK_RPM_PACKAGE_RELEASE) # CMake default e.g. "1" set(CPACK_RPM_PACKAGE_RELEASE "${CPACK_RPM_PACKAGE_RELEASE_NUMBER}") elseif(${CPACK_RPM_PACKAGE_RELEASE} STREQUAL "RPMBUILD-DEFAULT") # Fedora/CentOS default e.g. "1.el7.centos" set(CPACK_RPM_PACKAGE_RELEASE "${CPACK_RPM_PACKAGE_RELEASE_NUMBER}${CPACK_RPM_DIST}") endif() H Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://www.codexdigital.com/?action=asset=E55D8A6F-AF62-4978-8FF1-435A85AFADBF]<http://www.codexdigital.com> On 7 May 2016, at 4:35 pm, Domen Vrankar <domen.vran...@gmail.com<mailto:domen.vran...@gmail.com>> wrote: 2016-05-06 19:09 GMT+02:00 Harry Mallon <ha...@codexdigital.com<mailto:ha...@codexdigital.com>>: According to Fedora documentation the "Release:" variable in RPM files should be set to 1%{?dist}. https://fedoraproject.org/wiki/How_to_create_an_RPM_package https://fedoraproject.org/wiki/Packaging:DistTag This means it should be set to a string which looks like "1.el7.centos" on my CentOS7 machine. CPack sets this to "1" by default, but can be changed with the CPACK_RPM_PACKAGE_RELEASE variable. I propose a change as follows: https://github.com/hm1992/CMake/commit/94c611d5710a51072e15855ed96a225def975c38 * Adds CPACK_RPM_DIST which defaults to the output of "rpmbuild -E %{dist} 2>/dev/null". * Makes CPACK_RPM_PACKAGE_RELEASE default to "1${CPACK_RPM_DIST}" I think I am right in saying this would not change behaviour on distributions that did not use the %{dist} option as "rpmbuild -E %{dist}" should return nothing. Hi, dist tag looks like a good addition however there are some issues with the proposed patch: - As Rolf already mentioned "2>/dev/null" should be replaced with ERROR_QUIET and also OUTPUT_STRIP_TRAILING_WHITESPACE - there is no need to check for the existance of rpmbuild as that is already checked at the top of cpack_rpm_generate_package function - rpmbuild -E %{dist} should use %{?dist} to check if tag is set otherwise %{dist} will be printed out instead of an empty string on platforms that don't set this tag - CPACK_RPM_DIST is only applied in situations when CPACK_RPM_PACKAGE_RELEASE is not set by the user To solve the last bullet I would propose that you extend the patch so that with CPACK_RPM_DIST: - if not set current functionality would remain (${CPACK_RPM_PACKAGE_RELEASE} only - I would not make an exception for "1${CPACK_RPM_DIST}" default value) - if set to value "RPMBUILD-DEFAULT" rpmbuild -E %{?dist} would be used to get CPACK_RPM_DIST value and then appended to CPACK_RPM_PACKAGE_RELEASE - if set to any other value that value would be used (also a check would have to be made that if first character is not a dot it has to be added automatically) Thanks, Domen -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Make CPACK_RPM_PACKAGE_RELEASE match Fedora/RHOS/CentOS recommended behaviour
According to Fedora documentation the "Release:" variable in RPM files should be set to 1%{?dist}. https://fedoraproject.org/wiki/How_to_create_an_RPM_package https://fedoraproject.org/wiki/Packaging:DistTag This means it should be set to a string which looks like "1.el7.centos" on my CentOS7 machine. CPack sets this to "1" by default, but can be changed with the CPACK_RPM_PACKAGE_RELEASE variable. I propose a change as follows: https://github.com/hm1992/CMake/commit/94c611d5710a51072e15855ed96a225def975c38 * Adds CPACK_RPM_DIST which defaults to the output of "rpmbuild -E %{dist} 2>/dev/null". * Makes CPACK_RPM_PACKAGE_RELEASE default to "1${CPACK_RPM_DIST}" I think I am right in saying this would not change behaviour on distributions that did not use the %{dist} option as "rpmbuild -E %{dist}" should return nothing. Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://www.codexdigital.com/?action=asset=E55D8A6F-AF62-4978-8FF1-435A85AFADBF]<http://www.codexdigital.com> -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Suggest if function has lte gte operators
That is completely fair. Perhaps a bit of Friday brain from me. It still could reduce complexity if you are trying to do something more complicated. In my opinion A is easier to read than B. A: if ( $1 STRGREATER_EQ $2 AND $3 STRLESS $4 AND $5 STRLESS_EQ $6 ) B: if ( NOT $1 STRLESS $2 AND $3 STRLESS $4 AND NOT $5 STRGREATER $6) H Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 > On 8 Apr 2016, at 15:42, Ben Boeckel <ben.boec...@kitware.com> wrote: > > On Fri, Apr 08, 2016 at 14:24:08 +0000, Harry Mallon wrote: >> CMake's "if" functionality is missing greater than or equal to and >> less than or equal to. This change could be tweaked and added to >> provide this functionality to avoid things like "if(VERSION_STRING >> VERSION_GREATER "4.8.0" OR VERSION_STRING VERSION_EQUAL "4.8.0")". > > This can also be done as: > >if (NOT VERSION_STRING VERSION_LESS "4.8.0") > > I'm ambivalent on the idea of new operators. Documentation for this > pattern would likely help. > > --Ben > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Suggest if function has lte gte operators
CMake's "if" functionality is missing greater than or equal to and less than or equal to. This change could be tweaked and added to provide this functionality to avoid things like "if(VERSION_STRING VERSION_GREATER "4.8.0" OR VERSION_STRING VERSION_EQUAL "4.8.0")". Commit on github: https://github.com/hm1992/CMake/commit/75b318f8809ae71685cad068cd2e8ce9f19fb28a Would this be of interest for merging? I don't really have the time to do extensive testing on it at the moment. Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://www.codexdigital.com/?action=asset=83095F5A-2233-47F5-9598-19228D7E37AE]<http://www.codexdigital.com> -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Making shared xcscheme files for Xcode from Cmake
Hello all, This became an annoyance in our Cmake build system so here is a barebones xcscheme creator. https://github.com/hm1992/CMake/commit/5345881861a4b510d3a3283825584ec90f8d2061 Current situation: * It seems to work for the executable targets we use in the office. * It only supports command line args and whether to run as root or not (but this was all we needed for now). If you have any use for it, feel free to use it. If it could be useful as a basis for a more integrated module then that would also be fine. Future ideas: I'm not using Cmake on Windows at the moment but it would be great if it could make VS configs too. Harry Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://www.codexdigital.com/?action=asset=83095F5A-2233-47F5-9598-19228D7E37AE]<http://www.codexdigital.com> -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Access output from CheckCXXSourceRuns and CheckCSourceRuns
Yep. The headers are the same version to version but provide a function to retrieve a filled version struct. H Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://www.codexdigital.com/?action=asset=E55D8A6F-AF62-4978-8FF1-435A85AFADBF]<http://www.codexdigital.com> On 19 Jan 2016 19:30, Brad King <brad.k...@kitware.com> wrote: On 01/19/2016 12:03 PM, Harry Mallon wrote: > I cannot retrieve a version number without linking and interrogating > the library. I could be missing something though. Are you saying that the only API provided by the package in question to get its version number is a runtime call? There is no version number provided by its header files as a preprocessor macro? -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Access output from CheckCXXSourceRuns and CheckCSourceRuns
Inline responses. Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com | T +44 203 7000 989 > On 19 Jan 2016, at 15:42, Brad King <brad.k...@kitware.com> wrote: > > On 01/18/2016 01:32 PM, Harry Mallon wrote: >> https://github.com/Kitware/CMake/pull/209 >> This passes through the output of the run (as well as the return value) >> so that users can access any output without using try_run. > > Thanks. The signature of the macro takes a variable for the return value > to be stored. We need something similar to control the name of the variable > used to store the output. This could either be done with an optional/named > argument or simply by documenting that the output will come in `_OUTPUT`. Sounds sensible > We also need to define what happens when the check has already been run. > The normal `` result is cached to prevent repeat runs of the check. > I don't think we can reasonably cache the entire output of the run and > provide it on later re-runs of CMake when the check does not actually run. I agree, we shouldn't be caching all of that > OTOH your use case for extracting versions may have other solutions. > We generally try to avoid try_run because it only works when the toolchain > targets the host architecture and so does not work when cross compiling > in general. Look at what Modules/CMakeDetermineCompilerId.cmake does to > extract the compiler id and version information. It also leaves files > in build trees under CMakeFiles/${CMAKE_VERSION}/CompilerIdC that you > can see. Basically it encodes the needed information in strings that > can be extracted from the binaries without running them. I have read CMakeDetermineCompilerId.cmake but I can't see how I can use that kind of an approach. Having static const char* set by the preprocessor is a good idea for the reasons that you mention but I cannot retrieve a version number without linking and interrogating the library. I could be missing something though. H -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Access output from CheckCXXSourceRuns and CheckCSourceRuns
Hello, I have just submitted a pull request (https://github.com/Kitware/CMake/pull/209). This passes through the output of the run (as well as the return value) so that users can access any output without using try_run. H Harry Mallon CODEX | Software Engineer 60 Poland Street | London | England | W1F 7NT E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 989<callto:+44%20203%207000%20989> Website | Facebook<https://www.facebook.com/codexdigital> | Twitter<http://twitter.com/codexdigital> [http://www.codexdigital.com/?action=asset=E55D8A6F-AF62-4978-8FF1-435A85AFADBF]<http://www.codexdigital.com> -- 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