Re: [CMake] CMake IDE integration survey (was RE: Visual Studio + Ninja?)
> Lead PM for the VC++ team at Microsoft here. I just wanted to echo > Nagy-Egri’s message. > > > > We are very interested in learning more about your current > edit-build-debug experience for C++ apps or libs using CMake. Whether > you’re developing on Windows or not, using VS or not today, we do want > to hear from you on how the IDE integration for CMake projects can be > improved. it is currently not possible to generate driver projects from cmake. for one project i have to use an arcane workflow of generating vsprops files from cmake and import them into a native visual studio solution to build the driver. it would be great if these msvc-specific targets with the driver specific options could be generated from cmake (PlatformToolset: WindowsKernelModeDriver8.1, ConfigurationType: Driver, DriverType: KMDF). cheers, tim -- 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] Drop support for older Xcode versions?
>> Given Apple's encouragement of developers to always update... > > They certainly do, as Eric described. However, just like everyone > else, Apple often ships regressions in Xcode and it's sometimes vital > to be able to use older versions. Similarly, if you want to deploy > an app to an older OS, it's very useful to be able to build-run-debug > on that OS, and since the newest Xcodes only run on the newest OSes, > one needs an older Xcode to test/debug on older OSes. if a project relies on an old xcode version, does it need to use the most up-to-date cmake? also, there are always make/ninja generators ... -- 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] Header-only library targets
I've recently switched from CMake 2.8.12 to 3.2, full of enthusiasm that header-only libraries would now be better supported through the INTERFACE option/target. However, the support for header-only libraries isn't really great, in particular if you're using an IDE like Visual Studio. The main problem is that if you define an INTERFACE target, there's no way to specify headers, and they won't show up in IDEs. There's workarounds with a custom target, but that's not really great for example to set dependencies, populate the include directory of the library or to INSTALL the target. i'm sometimes using the workaround of generating a dummy cpp file and use a static library instead of an interface library ... ugly hack, but allows to populate msvc/xcode/qtcreator projects ... -- 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] Custom commands with Ninja on Windows
I'm having some issues with Ninja on Windows with long custom commands (or actually a long succession of short commands appended to the same target). The problem is that they get concatenated in one single command usingand it is pretty easy to go over the 8k command line size limit on Windows. So I've been thinking that on Windows, instead of concatenating everything, we should be a script that is run using a response file that just runs all the command with error checking. Eventually, we could reuse cmLocalVisualStudioGenerator::ConstructScript() for that matter. Any thought about this? Any hint for implementing this myself in the Ninja generator? Do you think of another way to fix this issue? came across this issue as well: http://www.itk.org/Bug/view.php?id=15612 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH 2/9] Xcode: Sort Xcode objects by Id
Xcode keeps the objects ordered by the object id. Because cmake stores them into an unordered container at creation time they must be sorted before writing the pbxproj file. out of curiosity: what exactly is the id? the uuid identifier or the target name? when ordering targets in the project, it would make sense to order them by target name, as that's what users are used to (iirc the cmake-generated msvc projects are order their targets by target name) -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH 2/9] Xcode: Sort Xcode objects by Id
Effectively it is a UUID for our purposes. The ordering Gregor proposes is to match what Xcode writes when it generates the .pbxproj file, and we can't choose that. i see ... is it (easily) possible to lexicographically sort he user-visible appearance? this is something that can be changed in native xcode projects (by dragging) If Xcode can save and load projects with user-specified ordering then CMake may be able to generate things accordingly. Try creating a project with the IDE, saving it, copying it, and then updating the order in the IDE and saving again. Compare the saved project files. Where is the order stored? seems to be the children property: --- tset/test.xcodeproj/project.pbxproj 2015-04-14 16:33:49.0 +0200 +++ test/test.xcodeproj/project.pbxproj 2015-04-14 16:34:08.0 +0200 @@ -61,8 +61,8 @@ 22AA72931ADD5C9900988B41 = { isa = PBXGroup; children = ( - 22AA729E1ADD5C9900988B41 /* test */, 22AA72B51ADD5C9900988B41 /* testTests */, + 22AA729E1ADD5C9900988B41 /* test */, 22AA729D1ADD5C9900988B41 /* Products */, ); sourceTree = group; -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH 2/9] Xcode: Sort Xcode objects by Id
out of curiosity: what exactly is the id? the uuid identifier or the target name? when ordering targets in the project, it would make sense to order them by target name, as that's what users are used to (iirc the cmake-generated msvc projects are order their targets by target name) We don't know exactly what it is because the Xcode format is not documented publicly. I suspect Xcode uses some form of serialization tool to store its internal data structures to the .pbxproj file, and these are the ids it generates. Effectively it is a UUID for our purposes. The ordering Gregor proposes is to match what Xcode writes when it generates the .pbxproj file, and we can't choose that. i see ... is it (easily) possible to lexicographically sort he user-visible appearance? this is something that can be changed in native xcode projects (by dragging) -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] ninja generator: don't initialize language for files marked, as header-only
not sure if there is a better way to resolve this issue: declaring .RC files as header-only break ninja builds on non-windows platforms. note: this is necessary when the the language is set explicitly. ---8--- cmake currently tries to initialize the language rules for all source files. when HEADER_FILE_ONLY is used to mark files which should be added to the generated project, but should not be compiled, this will nevertheless try to initialize the language, which might fail on that specific platform. this is a practical issue when declaring .RC files as header-only on non-windows platforms. -- 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] [vc12/idl] output directory problem
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 -- 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] [vc12/idl] output directory problem
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 From a9f83bd54c8d7e073c4d8faee7e5b8dd68738fdc Mon Sep 17 00:00:00 2001 From: Tim Blechmann t...@klingt.org 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) /AdditionalIncludeDirectories\n, 0); - this-WriteString(OutputDirectory$(IntDir)/OutputDirectory\n, 3); + this-WriteString(OutputDirectory$(ProjectDir)/$(IntDir)/OutputDirectory\n, 3); this-WriteString(HeaderFileName%(Filename).h/HeaderFileName\n, 3); this-WriteString( TypeLibraryName%(Filename).tlb/TypeLibraryName\n, 3); -- 2.3.0 -- 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] documentation patch
hi all, this trivial patch adds INTERFACE_LIBRARY to the documentation of the TYPE target property. would be great, if it could be applied. thnx, tim From f9ff9226bd0985aa239564e93eb42ed4d57b208d Mon Sep 17 00:00:00 2001 From: Tim Blechmann t...@klingt.org Date: Wed, 17 Dec 2014 21:59:51 +0100 Subject: [PATCH] Help: add INTERFACE_LIBRARY to TYPE property documentation --- Help/prop_tgt/TYPE.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Help/prop_tgt/TYPE.rst b/Help/prop_tgt/TYPE.rst index 1951d46..5ac63cc 100644 --- a/Help/prop_tgt/TYPE.rst +++ b/Help/prop_tgt/TYPE.rst @@ -5,4 +5,5 @@ The type of the target. This read-only property can be used to test the type of the given target. It will be one of STATIC_LIBRARY, MODULE_LIBRARY, -SHARED_LIBRARY, EXECUTABLE or one of the internal target types. +SHARED_LIBRARY, INTERFACE_LIBRARY, EXECUTABLE or one of the internal +target types. -- 2.2.0 -- 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] Copying shared libraries in a post-build step
This sounds more like an install phase... to bring the whole package together in one appropriate place. if( WIN32 ) INSTALL( TARGET target RUNTIME DESTINATION bin LIBRARY DESTINATION bin ARCHIVE DESTINATION lib ) else( WIN32 ) INSTALL( TARGET target RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) endif( WIN32 ) on unixy platforms, shared libraries can be resolved using rpaths. on windows this is not the case: if you link a dll into an executable the executable will not run, unless the dll can be resolved at startup time. the is typically done by placing he dll next to the exe. the install step is a possible workaround, but in my experience this implies that you have to run the install script in order to debug the binary, which is pretty inconvenient. On Tue, Dec 9, 2014 at 3:38 PM, Walter Gray chrysal...@gmail.com mailto:chrysal...@gmail.com wrote: Hey all, I'm working on a module that will allow me to automatically copy all the required .dll files as defined by well-formed import library targets to the appropriate location (same folder for windows, Frameworks folder for OSX bundle, ect). I've got the code that scans an executable's INTERFACE_LINK_LIBRARIES property recursively to find all such shared library, however I'm running into a small problem. I really like using file globbing in higher level source directories to add all appropriate sub-directories, but this means that sometimes a dependency will not be fully defined yet. This is normally fine since these things are usually resolved at *generation* time, but since I'm doing a manual traversal of the list of link libraries at config time that's not really acceptable. I realize I could just not do the globbing and just make sure the directories were setup in the correct order, but I really don't like making the add_subdirectory calls order dependent. One solution I've come up with is to add the targets I want to do this to to a global list, then iterate over that list as the last step in my top-level cmake lists file, but that has the issue that I can no longer use add_custom_command on those targets at that point. I'm wondering 3 things: 1)What is the reasoning behind not allowing add_custom_command on targets not defined in the current directory? Especially now that SOURCE can be modified, the restriction seems very arbitrary. 2)How stupid would it be to reserve the command using something like add_custom_command(TARGET ${target} POST_BUILD COMMAND $TARGET_PROPERTY:COPY_SHARED_LIBS_COMMAND) then use set_property(TARGET ${target} APPEND PROPERTY COPY_SHARED_LIBS_COMMAND to add more copy steps to the command? 3) Am I completely missing something and there's already a totally well supported way of making sure that an executable's shared library dependencies end up in the correct directory? I couldn't find a really satisfactory answer on stack overflow or the archives. Thanks! -- 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: 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
Re: [CMake] Copying shared libraries in a post-build step
This sounds more like an install phase... to bring the whole package together in one appropriate place. if( WIN32 ) INSTALL( TARGET target RUNTIME DESTINATION bin LIBRARY DESTINATION bin ARCHIVE DESTINATION lib ) else( WIN32 ) INSTALL( TARGET target RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) endif( WIN32 ) on unixy platforms, shared libraries can be resolved using rpaths. on windows this is not the case: if you link a dll into an executable the executable will not run, unless the dll can be resolved at startup time. the is typically done by placing he dll next to the exe. the install step is a possible workaround, but in my experience this implies that you have to run the install script in order to debug the binary, which is pretty inconvenient. No more inconvenient than building any other target... from the command line cmake --build . --target install / instead of blank; a: typically you don't want to build the complete project, but only the binary you want to debug (install requires all). depending on the size of your project, this can be a big issue. b: in msvc, you cannot debug by right-click on the target - debug - start new instance. -- 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] install(DIRECTORY) genex support
hi all, i wonder, is there any reason for not supporting generator expressions for install(DIRECTORY)? i need this functionality to be able to install dSYM folders which are generated by xcode. if not, could someone review/merge this patch [1]? it is probably too late for 3.1, right? thanks a lot, tim [1] https://github.com/Kitware/CMake/pull/124 -- 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] install(DIRECTORY) genex support
hi brad, [1] https://github.com/Kitware/CMake/pull/124 Good start. Please extend documentation and tests for this feature similar to how it was done for install(FILES) in the above-linked commit. Then please read CONTRIBUTING.rst and send the patch to this list for further review. thanks for the link regarding files/programs ... will update the patch in the next few days ... cheers, tim -- 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] [msvc] building windows drivers with cmake
hi, i'm wondering, is it possible to generate msvc solutions for windows kernel mode drivers? afaict, the generated projects would have to use a specific platform toolset: PlatformToolsetWindowsKernelModeDriver8.1/PlatformToolset but also some other specific entries, like: ConfigurationTypeDriver/ConfigurationType DriverTypeKMDF/DriverType maybe it be possible/easy/reasonable to add custom properties to cmake-generated msvc project files? or would there be any other way to achieve this in a better way? thnx, tim -- 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] generating info.plist files in POST_BUILD step unreliable
hi all, a combination of question and feature request: i'm using a highly customized shell script to generate Info.plists on osx. this build script has to make use of the usage requirements of the corresponding target and it is called via a POST_BUILD custom command. however this conflicts with cmake's info.plist generation (cmLocalGenerator::GenerateAppleInfoPList()): the post-build step will only be called after a build, but cmake's info.plist generation will overwrite this file at configure-time. 1. run cmake: generate info.plist from MacOSXBundleInfo.plist.in 2. build: overwrite generated info.plist from post-build step 3. re-run cmake: overwrite correctly generated info.plist file from MacOSXBundleInfo.plist.in 4. build: since the target's sources did not change, the target is not rebuilt and the post-build step is not executed. the info.plist file is therefore incorrect. the 'cmake way' of generating info.plist files (setting MACOSX_BUNDLE_INFO_PLIST) will not work for me, as the shell script requires the usage requirements of the target. -- so i think that my issue could be solved in two ways: * if there would be a way to suppress the automatic generation of info.plist files in cmLocalGenerator::GenerateAppleInfoPList(), e.g. via a new property (MACOSX_BUNDLE_PREVENT_INFO_PLIST_GENERATION) * if there would be a way to force the evaluation of post-build steps after re-running cmake. any advice how to proceed from here? or maybe there is a workaround that i am missing? thanks a lot, tim -- 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] [patch] fix Info.plist parser
hi all, attached patch adds support for parsing Info.plist files which are generated with mac os9-style line endings (\r). would be great if this fix can be applied (and if it would make it into 3.0.2). thanks, tim From 0b1420c8c22885f3a4a086510a2041bc80be7732 Mon Sep 17 00:00:00 2001 From: Tim Blechmann t...@klingt.org Date: Thu, 7 Aug 2014 19:30:27 +0200 Subject: [PATCH] cmake: allow Info.plist files which use os9-style \r line endings Signed-off-by: Tim Blechmann t...@klingt.org --- Modules/BundleUtilities.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index b896de2..60d01b5 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -237,6 +237,7 @@ function(get_bundle_main_executable bundle result_var) file(READ ${bundle}/Contents/Info.plist info_plist) string(REGEX REPLACE ; ; info_plist ${info_plist}) string(REGEX REPLACE \n ${eol_char}; info_plist ${info_plist}) +string(REGEX REPLACE \r ${eol_char}; info_plist ${info_plist}) # Scan the lines for keyCFBundleExecutable/key - the line after that # is the name of the main executable. -- 2.0.4 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [patch] fix Info.plist parser
would be great if this fix can be applied I applied the patch with a slight revision to resolve conflicts with master: BundleUtilities: Allow Info.plist files which use CR line endings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=810f5cce Once it works there I will consider backporting it to 3.0. great! thanks a lot! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [patch] install cfbundles as directory
attached! Applied, thanks: OS X: Install CFBundles as complete directories http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=908433bd thanks a lot! i wonder: will this patch make it into 3.0.1? tim -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [patch] install cfbundles as directory
cfbundles are currently not installed as directory, but the binary from Contents/MacOS is directly installed to the destination. attached patch fixes the issue. thanks, tim From b021da36ec9c72cc6410a95ce81a177a87f6f232 Mon Sep 17 00:00:00 2001 From: Tim Blechmann t...@klingt.org Date: Wed, 9 Jul 2014 15:33:25 +0200 Subject: [PATCH] InstallTarget: install CFBundles with complete directory --- Source/cmInstallTargetGenerator.cxx | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 7a39f45..93c0d63 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -213,6 +213,20 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream os, filesFrom.push_back(from1); filesTo.push_back(to1); } +else if(this-Target-IsCFBundleOnApple()) + { + // Install the whole app bundle directory. + type = cmInstallType_DIRECTORY; + literal_args += USE_SOURCE_PERMISSIONS; + + std::string targetNameBase = targetName.substr(0, targetName.find_first_of(/)); + + std::string from1 = fromDirConfig + targetNameBase; + std::string to1 = toDir + targetNameBase; + + filesFrom.push_back(from1); + filesTo.push_back(to1); + } else { bool haveNamelink = false; -- 2.0.1 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [patch] install cfbundles as directory
cfbundles are currently not installed as directory, but the binary from Contents/MacOS is directly installed to the destination. attached patch fixes the issue. Thanks. I do not understand this line: + std::string targetNameBase = targetName.substr(0, targetName.find_first_of(/)); Why do we need to look for the first slash? targetName is: ${BundleName}${BundleExtension}/Contents/MacOS/${BundleName} we basically want to find ${BundleName}. i did not find any way to determine this information from the Target. Also, look earlier in that function for the blocks starting in: // Handle OSX Bundles. if(this-Target-IsAppBundleOnApple()) and else if(this-Target-IsFrameworkOnApple()) Those cases do special handling for the post-installation tweaks. Is something similar needed here? i wonder: which tweaks are they? i've seen the comments, but failed to understand, what kind of post-install tweaks they add, as it is mainly about changing source and destinations. in my use-case it seems to work, but of course i might be missing something ... cheers, tim -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [patch] install cfbundles as directory
Those cases do special handling for the post-installation tweaks. i wonder: which tweaks are they? It's things like running strip on the executable file. The line filesTo.push_back(to1); needs to add the path to the executable file, not the directory. The filesTo vector is used only for tweaks and not for generating the main install rules. IIUC we should use std::string to1 = toDir + targetName; for CFBundles to get the location of the installed binary file. ah, i see ... double-checked and this works for me! shall i update the patch? cheers, tim -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [patch] install cfbundles as directory
shall i update the patch? Yes, so that we know the updated version works for what you need. Please also include a change to use Ben's suggestion of targetName.find('/') instead of find_first_of. attached! thanks a lot, tim From 18147876fd834a24dcdeca70078c972f84e92866 Mon Sep 17 00:00:00 2001 From: Tim Blechmann t...@klingt.org Date: Wed, 9 Jul 2014 20:01:11 +0200 Subject: [PATCH] InstallTarget: install CFBundles with complete directory --- Source/cmInstallTargetGenerator.cxx | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 7a39f45..38d369e 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -213,6 +213,20 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream os, filesFrom.push_back(from1); filesTo.push_back(to1); } +else if(this-Target-IsCFBundleOnApple()) + { + // Install the whole app bundle directory. + type = cmInstallType_DIRECTORY; + literal_args += USE_SOURCE_PERMISSIONS; + + std::string targetNameBase = targetName.substr(0, targetName.find('/')); + + std::string from1 = fromDirConfig + targetNameBase; + std::string to1 = toDir + targetName; + + filesFrom.push_back(from1); + filesTo.push_back(to1); + } else { bool haveNamelink = false; -- 2.0.1 -- 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] installing osx bundles
hi all, i'm having some troubles, trying to install osx bundles: app bundles: installing an app bundle target (created with MACOSX_BUNDLE and property BUNDLE=1) will install (a) the bundle and (b) the executable (which is usually found in Contents/MacOS). in a way, i'd only expect the bundle to be installed, not the executable. library bundles: library bundles (created with MODULE and property BUNDLE=1) are not installed at all. how can i install them? i'm installing all targets via: install(TARGETS MyApp MyModule DESTINATION . ) thnx, tim -- 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] [patch] handle RC files as resources
hi all, i've came across, that .rc files are treated as windows resources, but not upper-case .RC files. attached patch tries to correct this. it is a functional change, though it brings the implementation in line with Modules/CMakeCXXCompiler.cmake.in and the like. would be great if someone could review and/or commit it. thanks a lot, tim From 0e41cb7df9dcb2587d928504c042a8ed0b51bc39 Mon Sep 17 00:00:00 2001 From: Tim Blechmann t...@klingt.org Date: Fri, 6 Jun 2014 09:59:33 +0200 Subject: [PATCH] SystemTools: handle RC as resource file format extension .RC files are not recorgnized as resource files by GetFileFormat, though the CMakeLangCompiler.cmake.in files list this file extension: Modules/CMakeCXXCompiler.cmake.in: set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) this patch resolve this inconsistency Signed-off-by: Tim Blechmann t...@klingt.org --- Source/cmSystemTools.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index ff05975..4b91aaa 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1222,7 +1222,8 @@ cmSystemTools::FileFormat cmSystemTools::GetFileFormat(const char* cext) ext == in || ext == .in || ext == txx || ext == .txx ) { return cmSystemTools::HEADER_FILE_FORMAT; } - if ( ext == rc || ext == .rc ) + if ( ext == rc || ext == .rc || + ext == RC || ext == .RC) { return cmSystemTools::RESOURCE_FILE_FORMAT; } if ( ext == def || ext == .def ) { return cmSystemTools::DEFINITION_FILE_FORMAT; } -- 2.0.0 -- 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/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] [patch] handle RC files as resources
i've came across, that .rc files are treated as windows resources, but not upper-case .RC files. attached patch tries to correct this. it is a functional change, though it brings the implementation in line with Modules/CMakeCXXCompiler.cmake.in and the like. would be great if someone could review and/or commit it. The cmSystemTools::GetFileFormat is supposed to have been replaced by cmSourceFile::GetLanguage and cmGeneratorTarget source classification logic that uses the tables like that in CMakeCXXCompiler. The only cmSystemTools::GetFileFormat call site I see left is in cmQtAutoGenerators::SetupSourceFiles, and that does not care about RESOURCE_FILE_FORMAT. In what context does your patch affect anything? hmmm, then this probably got shadowed in my project when setting the source file language directly :/ does this look better? (cannot test atm, as i'm on a different machine) thx, tim From e42b5ee3979c0b2e9b72d737c858830a865174ca Mon Sep 17 00:00:00 2001 From: Tim Blechmann t...@klingt.org Date: Fri, 6 Jun 2014 15:47:29 +0200 Subject: [PATCH] CMakeRCCompiler: handle RC as resource file format extension .RC files are not recorgnized as resource files by GetFileFormat, though the CMakeLangCompiler.cmake.in files list this file extension: Modules/CMakeCXXCompiler.cmake.in: set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) this patch resolve this inconsistency Signed-off-by: Tim Blechmann t...@klingt.org --- Modules/CMakeRCCompiler.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/CMakeRCCompiler.cmake.in b/Modules/CMakeRCCompiler.cmake.in index 0fc3142..8257cd6 100644 --- a/Modules/CMakeRCCompiler.cmake.in +++ b/Modules/CMakeRCCompiler.cmake.in @@ -1,6 +1,6 @@ set(CMAKE_RC_COMPILER @CMAKE_RC_COMPILER@) set(CMAKE_RC_COMPILER_ARG1 @CMAKE_RC_COMPILER_ARG1@) set(CMAKE_RC_COMPILER_LOADED 1) -set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc) +set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC) set(CMAKE_RC_OUTPUT_EXTENSION @CMAKE_RC_OUTPUT_EXTENSION@) set(CMAKE_RC_COMPILER_ENV_VAR RC) -- 2.0.0 -- 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/cgi-bin/mailman/listinfo/cmake-developers
Re: [CMake] Info.plist with per-configuration information
hi david, I just created a test project t2 with Xcode itself, and in the projects source file t2-Info.plist, I added a Get info string key with a value of This is the ${CONFIGURATION} build. Then, after I build the Debug config, and inspect the generated bundle, the Info.plist inside of it contains the string This is the Debug build. Perhaps you could use a single all-config custom MACOSX_BUNDLE_INFO_PLIST and use similar strings inside it? Or do you need more than just the configuration value as a string to be different in the resulting file? hmm, i've ended up using configure_file to generate the initial Info.plist, setting both MACOSX_BUNDLE_INFO_PLIST and XCODE_ATTRIBUTE_INFOPLIST_FILE attributes and executing PlistBuddy in a custom command with a generator expression ... not too elegant, but it works with both ninja and xcode ... cheers, tim -- 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://www.cmake.org/mailman/listinfo/cmake
[CMake] Info.plist with per-configuration information
hi all, i'm trying to build an Info.plist file with some information based on the build configuration (DEBUG or RELEASE). is this possible for multi-configuration generators like xcode? it does not seem to be possible to use different MACOSX_BUNDLE_INFO_PLIST files for different configurations, nor am i able to use generator expressions ... so before i start to write a custom script, i wanted to ask, is there any way that i am missing? tia, tim -- 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://www.cmake.org/mailman/listinfo/cmake
Re: [cmake-developers] [ANNOUNCE] CMake 3.0-rc4 now ready for testing!
hi all, I am proud to announce the CMake 3.0 fourth release candidate. [snip] Changes made since CMake 3.0.0-rc3: i wonder, why did 90e22f8f713c not make it into rc4? it is a bug fix for the osx bundle generator, while the patch itself is trivial, the bug is a showstopper for me ... so it would be great if it can make it into rc4. thanks a lot, tim [1] https://github.com/Kitware/CMake/commit/90e22f8f713c -- 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/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] generator expressions with variable
$1:-I $JOIN:a;b;c , -I though it does not matter, if the target is passed via variable or directly. any idea? Please provide a http://www.sscce.org/ see attached file! origin/master gives me: tim@moka-mac:~/dev/x/y$ ~/dev/cmake/bin/cmake -GNinja .. ninja -- The C compiler identification is AppleClang 5.1.0.5030040 -- The CXX compiler identification is AppleClang 5.1.0.5030040 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Ninja -- Check for working CXX compiler using: Ninja -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done -- Generating done -- Build files have been written to: /Users/tim/dev/x/y ninja: error: build.ninja:53: bad $-escape (literal $ must be written as $$) PRE_LINK = cd /Users/tim/dev/x/y echo $1:-I$JOIN:$ -I cd /Us... ^ near here same applies to 2.8.12.2. the genex is: $$BOOL:$TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES:-I$JOIN:$TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES, -I changing the genex to: $$BOOL:$TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES:-I$JOIN: $TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES , -I it expands to: $1:-I$JOIN: /Users/tim/dev/x/a;/Users/tim/dev/x/b;/Users/tim/dev/x/c , -I hth, tim cmake_minimum_required(VERSION 2.8) add_library(foo foo.cpp) target_include_directories(foo PUBLIC a b c) add_custom_command( TARGET foo PRE_BUILD COMMAND echo $ $BOOL:$TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES :-I$JOIN: $TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES , -I ) -- 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/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] generator expressions with variable
see attached file! The generator expression stops parsing at whitespace. I believe you're hitting a problem related to what is discussed in this thread: http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/7063 It will require patching CMake, but there is no one working on a patch yet. http://public.kitware.com/Bug/view.php?id=14353 hmm, the bug is marked as BACKLOG ... tbo, the current situation is not exactly robust: if it is known to be broken, maybe there could be at least an error message, describing the issue? thnx, tim -- 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/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] generator expressions with variable
hi all, i'm trying to obtain the include paths from a target via a generator expression, which is adapted from the help file: help: $$BOOL:$TARGET_PROPERTY:INCLUDE_DIRECTORIES:-I$JOIN:$TARGET_PROPERTY:INCLUDE_DIRECTORIES, -I i adapted it to obtain the value from a target, which is passed as a function argument: $$BOOL:$TARGET_PROPERTY:${TARGET},INCLUDE_DIRECTORIES:-I$JOIN:$TARGET_PROPERTY:${TARGET},INCLUDE_DIRECTORIES, -I however evaluating the expression results in this command string: $1:-I$JOIN:$ -I is this a bug or a feature? thanks a lot, tim -- 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/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] generator expressions with variable
$$BOOL:$TARGET_PROPERTY:${TARGET},INCLUDE_DIRECTORIES:-I$JOIN:$TARGET_PROPERTY:${TARGET},INCLUDE_DIRECTORIES, -I Does it work without the variable in there. (By the time the generator expression evaluator gets the string, it should be expanded.) however evaluating the expression results in this command string: $1:-I$JOIN:$ -I Should that '$' be ','? Where did your literal ',' go from the above genex? hmm, i've updated cmake to the current master branch (the other one was a few days old). now the expression evaluates to (if the properties are a;b;c): $1:-I $JOIN:a;b;c , -I though it does not matter, if the target is passed via variable or directly. any idea? thnx, tim -- 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/cgi-bin/mailman/listinfo/cmake-developers
[CMake] 2.8/3.0: CMAKE_FORCE_C_COMPILER semantics
hi all, i'm trying to use the iOS.cmake toolchain file from [1]. it works fine with cmake-2.8.12.2, but fails with cmake-3.0 (today's master), which gives me: --8--- CMake Error at CMakeLists.txt:16 (project): The CMAKE_C_COMPILER: gcc is not a full path and was not found in the PATH. CMake Error at CMakeLists.txt:16 (project): The CMAKE_CXX_COMPILER: g++ is not a full path and was not found in the PATH. --8--- the toolchain file uses the CMAKE_FORCE_C_COMPILER macro to set the compiler: --8--- include (CMakeForceCompiler) CMAKE_FORCE_C_COMPILER (gcc gcc) CMAKE_FORCE_CXX_COMPILER (g++ g++) --8--- * is this a problem with cmake or with the toolchain file? * any suggestion for a workaround? thanks a lot, tim [1] https://code.google.com/p/ios-cmake/source/browse/toolchain/iOS.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://www.cmake.org/mailman/listinfo/cmake
[cmake-developers] [patch] fix Info.plist support for CFBundles
Info.plist files were generated in the wrong place when generating CFBundles. attached patch fixes this behavior. From 7750f35bee583d280519e87ce8efd6faaf121fca Mon Sep 17 00:00:00 2001 From: Tim Blechmann t...@klingt.org Date: Tue, 25 Mar 2014 16:16:51 +0100 Subject: [PATCH] osx bundle generator: correctly generate Info.plist Info.plist was placed into CMAKE_BINARY_DIR, not CMAKE_CURRENT_BINARY_DIR because the target path was not generated correctly --- Source/cmOSXBundleGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index 6f16913..786e6e2 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -178,7 +178,7 @@ void cmOSXBundleGenerator::CreateCFBundle(const std::string targetName, // Configure the Info.plist file. Note that it needs the executable name // to be set. - std::string plist = + std::string plist = root + / + this-GT-Target-GetCFBundleDirectory(this-ConfigName, true); plist += /Info.plist; this-LocalGenerator-GenerateAppleInfoPList(this-GT-Target, -- 1.9.1 -- 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/cgi-bin/mailman/listinfo/cmake-developers
[CMake] transitive dependencies link flags
hi, i'm using usage requirements to pass on dependencies in the build system. -- set(MY_DEBUG_LIB libDebug.lib) set(MY_RELEASE_LIB libRelease.lib) target_link_libraries(mylib debug ${MY_DEBUG_LIB} optimized ${MY_RELEASE_LIB}) add_executable(myapp somesrc.cpp) target_link_libraries( myapp mylib ) -- under windows (ninja msvc generators), both the libraries in ${MY_DEBUG_LIB} and the ones in ${MY_RELEASE_LIB} are linked into the myapp target. is this a bug or a feature? or is there any better way to ensure that only the libraries for the current build type are linked? thanks a lot, tim -- 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://www.cmake.org/mailman/listinfo/cmake
[cmake-developers] [patch] treat .m files as c, not c++
hi all, compiling .m files with CXX_FLAGS like -std=c++11 causes troubles. make/ninja treat .m files as c++, which is inconsistent in three different ways: a) cmSystemTools::GetFileFormat: if ( ext == c || ext == .c || ext == m || ext == .m ) { return cmSystemTools::C_FILE_FORMAT; } if ( ext == C || ext == .C || ext == M || ext == .M || ext == c++ || ext == .c++ || ext == cc || ext == .cc || ext == cpp || ext == .cpp || ext == cxx || ext == .cxx || ext == mm || ext == .mm ) b) xcode and the cmake/xcode generator c) the language detection based on the file extension as implemented by gcc: man gcc: file.m Objective-C source code. Note that you must link with the libobjc library to make an Objective-C program work. obj-c is a superset of c, while obj-c++ is a superset of obj-c this patch corrects this behavior. best regards, tim From dc956e47ec280979d62666c42632d01267560927 Mon Sep 17 00:00:00 2001 From: Tim Blechmann t...@klingt.org Date: Wed, 19 Mar 2014 17:31:01 +0100 Subject: [PATCH] Modules: treat .m files as c instead of c++ this gets it in line with cmSystemTools::GetFileFormat. especially CXX_FLAGS should not be passed to obj-c sources Signed-off-by: Tim Blechmann t...@klingt.org --- Modules/CMakeCCompiler.cmake.in | 2 +- Modules/CMakeCXXCompiler.cmake.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in index 804cce2..694f8b8 100644 --- a/Modules/CMakeCCompiler.cmake.in +++ b/Modules/CMakeCCompiler.cmake.in @@ -26,7 +26,7 @@ if(CMAKE_COMPILER_IS_MINGW) set(MINGW 1) endif() set(CMAKE_C_COMPILER_ID_RUN 1) -set(CMAKE_C_SOURCE_FILE_EXTENSIONS c) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) set(CMAKE_C_LINKER_PREFERENCE 10) diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in index 35aa6c4..c75611a 100644 --- a/Modules/CMakeCXXCompiler.cmake.in +++ b/Modules/CMakeCXXCompiler.cmake.in @@ -27,7 +27,7 @@ if(CMAKE_COMPILER_IS_MINGW) endif() set(CMAKE_CXX_COMPILER_ID_RUN 1) set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) -set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) set(CMAKE_CXX_LINKER_PREFERENCE 30) set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) -- 1.9.0 -- 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/cgi-bin/mailman/listinfo/cmake-developers
[CMake] targets as bundle resources
hi all, from my understanding it is possible to add sources to an osx bundle, which are then automatically copied e.g. to the Resource folder or the like. however i'm in the situation that i have to move some build targets (executables and dylibs) into the bundle. what is the best way to achieve this? thanks, tim -- 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] avoid substitution of semicolon
Have you tried quotes in your message() so it doesn't remove the semi-colons? message(${x}) ah, that explains my confusion of the missing semi-colon thanks, tim -- t...@klingt.org http://tim.klingt.org Relying on the government to protect your privacy is like asking a peeping tom to install your window blinds. John Perry Barlow ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] ctest build names
hi all, i am using mingw to cross-compile to windows. however the build names, which appear in the cdash dashboard are somehow inconsistent. for native builds, the naming is PLATFORM-CXXCOMPILER. the however the cross-compiled version is named Win32-make, although the name of the c++ compiler is `i586-mingw32msvc-g++', not `make'. is this a cmake/ctest bug or a bug in my toolchain file? thanks, tim -- t...@klingt.org http://tim.klingt.org All we composers really have to work with is time and sound - and sometimes I'm not even sure about sound. Morton Feldman ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] using ctest with cpu emulator
hi all, i am trying to run ctest with the qemu cpu emulator: so if i am compiling a test case myTest, it is usually simply called with `./myTest'. is it possible to wrap this into a program, so that it calls `qemu-ARCHITECTURE -cpu CPUTYPE ./myTest'? thanks, tim -- t...@klingt.org http://tim.klingt.org Silence is only frightening to people who are compulsively verbalizing. William S. Burroughs ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] fixup_bundle
hi all, i am currently trying to adapt a cmake build system to build an osx app. the specific code is: INSTALL(CODE include(BundleUtilities) fixup_bundle(\${CMAKE_CURRENT_BINARY_DIR}/${myappbundlename}.app\ \\ \${CMAKE_CURRENT_BINARY_DIR}\) COMPONENT Runtime) however it doesn't seem to work correctly, the verification of the app fails: error: verify_app failed since i don't have access to an osx machine and i have little knowledge about the osx toolchain in general, what is the exact semantics of fixup_bundle? especially, what is the purpose of the libs and dirs arguments and where should they point to? thanks, tim -- t...@klingt.org http://tim.klingt.org The price an artist pays for doing what he wants is that he has to do it. William S. Burroughs ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] shared library linking question
hi andreas, common/libcommon.so target1/target1 target2/target2 both target1 and target2 are linked with libcommon, both work fine in the build directory, the libraries are resolved correctly. after installing them, they are formatted like: $PREFIX/lib/libcommon.so $PREFIX/bin/target1 $PREFIX/bin/target2 now libcommon.so cannot be resolved, probably because the targets are linked with ../common/libcommon.so, so the loader cannot find the shared library. what is the best way to resolve this issue? How did you write your cmake file? Usually you'd be using the libcommon target name in target_link_libraries for target1 and target2. in common/ i build libcommon add_library(libcommon SHARED ...) in the target directories, i build the target: add_executable(targetX ...) target_link_libraries(targetX libcommon) the targets are built with -rdynamic -L../common ../common/libcommon.so Wl,- rpath,../common:/path/to/common from my limited understanding of the linking process, it should link with -lcommon instead of using ../common/libcommon.so, since the rpath is already set to ../common. but how can i tell cmake to do this? Additionally in newer CMake versions cmake will set the RPATH of the target1/target2 binaries to point to the directory and changes this RPATH when installing everything. Hence the loader should find your library. i am not completely fluent, how the linking process works. the rpath seems to be set correctly, though. just the library is passed with a path relative to the targets ... thanks, tim -- t...@klingt.org http://tim.klingt.org I don't write music for sissy ears. Charles Ives ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] byte-compiling emacs lisp sources
hi all, i've got some troubles to byte-compile emacs lisp files with cmake. basically, i need to do the following - copy source file to the build directory - compile the elc file with: emacs -batch -f batch-byte-compile /path/to/source.el - add an install rule to install the generated elc file to share/emacs/site-lisp currently, i am using this snippet: configure_file(${el} ${CMAKE_CURRENT_BINARY_DIR}/${el}) add_custom_command(TARGET ${el}c COMMAND emacs -batch -f batch-byte-compile ${CMAKE_CURRENT_BINARY_DIR}/${el} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${el}) install(TARGETS ${el}c DESTINATION share/emacs/site-lisp) however, neither the byte-code target is generated, nor the does the install statement want to install the target (since it is not an executable, library or module) what am i doing wrong? or is there a module for building emacs byte-code files? thanks in advance, tim -- t...@klingt.org http://tim.klingt.org Which is more musical, a truck passing by a factory or a truck passing by a music school? John Cage ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] shared library linking question
from my limited understanding of the linking process, it should link with -lcommon instead of using ../common/libcommon.so, since the rpath is already set to ../common. but how can i tell cmake to do this? As far as I can see this is ok. At least its the same in the cmake projects I'm using. The point is that cmake will change this rpath when you run make install (provided you have used install( TARGETS)). It'll then set the RPATH to the absolute path of the install location of libcommon.so. The linking with ../common/libcommon.so is ok, cmake prefers to pass in path+filename to ld instead of using and relying on the right order of -L + -l. thanks ... after changing the library build from SHARED to STATIC and to SHARED again, it seems to work ... no idea, why it didn't work before ... :/ anyway, thanks a lot for your help, although it seems that it was an error on my side ... tim -- t...@klingt.org http://tim.klingt.org The first question I ask myself when something doesn't seem to be beautiful is why do I think it's not beautiful. And very shortly you discover that there is no reason. John Cage. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] byte-compiling emacs lisp sources
hello michael, thanks a lot ... i needed to adapt it a bit for my applications, but it works like charm now ... thanks, tim -- t...@klingt.org http://tim.klingt.org Happiness is a byproduct of function, purpose, and conflict; those who seek happiness for itself seek victory without war. William S. Burroughs ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] shared library linking question
hi all, i am trying to write a cmake build system for an existing project and have some troubles with linking of shared libraries. basically, my directory layout of the targets is the following: common/libcommon.so target1/target1 target2/target2 both target1 and target2 are linked with libcommon, both work fine in the build directory, the libraries are resolved correctly. after installing them, they are formatted like: $PREFIX/lib/libcommon.so $PREFIX/bin/target1 $PREFIX/bin/target2 now libcommon.so cannot be resolved, probably because the targets are linked with ../common/libcommon.so, so the loader cannot find the shared library. what is the best way to resolve this issue? thanks in advance, tim -- t...@klingt.org http://tim.klingt.org The most wonderful opportunity which life offers is to be human. Henry Miller ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake