[CMake] Consistent software dependencies (together with add_subdirectory()?) for shared components
Hello, CMake provides an interface for the addition of subdirectories. https://cmake.org/cmake/help/v3.9/command/add_subdirectory.html I find it interesting to clarify details which are not described there so far. * How much does this item influence the capability to construct a consistent dependency graph for the generated build system also around shared software components in several folders? * Can it mean a barrier for advanced data exchange with build configuration information between shared components? Regards, Markus -- 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] Enhanced version management for the command "project"
Hello, CMake provides an interface for the specification of version information by the command "project". https://cmake.org/cmake/help/v3.9/command/project.html Can it be extended a bit more? 1. How do you think about to preserve a software release tag there? 2. Software packages can often evolve and deviate from the specified version numbers after the moment they were copied to an useful location. Would you like to distinguish the extensions to a base version by any additional data (like a commit hash or revision identifier) from a content management system? Regards, Markus -- 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] Collaboration of superbuilds with bundled software
Hello, A variant of the software generation process is described as "superbuild". Example: https://cmake.org/Wiki/ParaView/Superbuild This article mentions the version "2.8.8" as a software dependency for the tool "CMake". It refers also to the article "Building External Projects with CMake 2.8" which mentions the version number "2.6.4". http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html How far can the support for this build approach be also achieved by older revisions? I guess that there is some software evolution involved around a command like "ExternalProject_Add". https://cmake.org/cmake/help/v3.4/module/ExternalProject.html * Does this command need to download anything at the beginning? * Will such a command also work if a needed software component is stored together with files in a repository for the main project? * Would you like to switch between a loadable variant and the bundled revision by a configuration option? Are there any more software development challenges to consider as further clarification requests might indicate? * 2015-04-05: http://stackoverflow.com/questions/29460893/using-cmake-with-externalproject-add * 2013-07-03: http://stackoverflow.com/questions/17446981/cmake-externalproject-add-and-findpackage Regards, Markus -- 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] Enhanced version management for the command "project"
Hello, CMake provides an interface for the specification of version information by the command "project". http://www.cmake.org/cmake/help/v3.3/command/project.html I find that there is a growing need to extend it. 1. How do you think about to preserve a software release tag there? 2. Software packages can often evolve and deviate from the specified version numbers after the moment they were copied to an useful location. Would you like to distinguish the extensions to a base version by any additional data (like a commit hash or revision identifier) from a content management system? Regards, Markus -- 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] Long command lines
http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_avoid_the_error_.22Arg_list_too_long.22_when_running_make.3F so both the means suggested on that page dont apply to us. the problem is very specifically for some compiler versions, and i was looking for a native cmake solution that /does not/ depend on a specific environment. we're providing a larger framework, which in turn consumes many upstream packages (some of which we are writing CMakeLists for, but do not interfer with/change the code itself). as the overall build is controlled by a superproject (using external projects), the external project partially consume other external frameworks. now, if they are placed under an architecture directory (mpi/release|debug/static|shared etc), the include paths to the libraries tend to get longer and e.g. fail for the intel compsuite 12, where the maximum argument buffer is 4k. Can corresponding tools process the needed parameters also by passing them in dedicated input files? Would special file formats be usable for your software? i know custom commands, and unfortunately, no they wont help in our situation. Why not? Regards, Markus -- 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] Long command lines
unfortunately i dont quite understand what you mean with your tool. How many efforts would you like to invest so that limitations around software like a fortran preprocessor can be circumvented? http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_avoid_the_error_.22Arg_list_too_long.22_when_running_make.3F it's cmake, and ideally that's all i'm gonna use to solve my problem :-) and no, i dont have any experiences around the a) use or b) re-use of response files. In which companion files can you handle long command-line parameters for your software environment? Do you see chances to achieve progress with custom commands? http://www.cmake.org/cmake/help/v3.3/command/add_custom_command.html Regards, Markus -- 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] Long command lines
i've recently run into a problem (both windows/mingw and unix/intel) where the cmake-generated build files create too long command lines that break the overall build. more precisely, the build system uses architecture paths etc and hence there are long include directories for many packages; e.g. the fortran preprocessor from intel (in the version we have, cant be upgraded) only allows 4K command lines :-( Can your tool process command-line parameters also from other external input files? Have you got any experiences around the reuse of response files? Regards, Markus -- 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] Management of source file lists
Hello, CMake provides an interface for sub-projects by the command add_subdirectory. http://www.cmake.org/cmake/help/v3.2/command/add_subdirectory.html The input and output directories will match by default and will be automatically created by the build system. Each directory will usually handle only the source files from its own area. I see software development challenges there if the corresponding source file lists will also be needed for other build options like documentation generation from source code. Now I am looking again for possibilities to forward information from such subdirectories to companion CMake projects. I can construct also a source file list in a single CMake script. Do I need to care for creation of output directories myself then if I combine some components in this way? Regards, Markus -- 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] When is escaping of space characters in parameters really needed?
Hello, I would like to construct a custom command for the tool Latexmk. http://www.cmake.org/cmake/help/v3.2/command/add_custom_command.html The corresponding Perl script can handle a parameter like pdflatex. If I omit the parameter VERBATIM, the current CMake software will add backslashes before space characters. Example: … -pdf -pdflatex='/usr/bin/pdflatex\ -halt-on-error\ --shell-escape\ %O\ %S' … Can such an adjustment of the really desired string value be avoided anyhow? Should the value work also without the shown escaping? Regards, Markus -- 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] Generation of source file packages?
Basically package source generator (in the sense of RPM, DEB and alike) are unsupported. I hoped that the CPack software can also help with the corresponding processing for such data formats. http://www.cmake.org/Wiki/CMake:CPackPackageGenerators Do I need to achieve the desired source file archive variants with template files instead? http://www.cmake.org/cmake/help/v3.0/command/configure_file.html Regards, Markus -- 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] Distinguishing between source and binary packages with CPack?
https://github.com/elfring/OTCL/blob/eca1ed17f70176435c8575eb55a67cca33926905/package_settings.cmake#L1 That may be sufficient for creating a .deb. For integration into Debian, you should read http://pkg-ocaml-maint.alioth.debian.org/ocaml_packaging_policy.html/ Thanks for your link. Can it be that the CPack software concentrates on the creation of binary packages for the formats DEB, NSIS and RPM so far? It seems that options (like CPACK_SOURCE_TBZ2) can be set for archive formats. Regards, Markus -- 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] Distinguishing between source and binary packages with CPack?
http://www.cmake.org/cmake/help/v3.0/manual/cpack.1.html Can it be automatically determined which of the available archive and package generators support a distinction between source and binary files? Regards, Markus -- 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] Distinguishing between source and binary packages with CPack?
For CPack a source generator is a binary generator which is told to package a directory which happens to contains the source. Interesting ... Do I need to introduce additional options with the prefix CPACK_SOURCE_ for the package generators in my build configuration? Basically package source generator (in the sense of RPM, DEB and alike) are unsupported. I hope that this situation can be improved somehow. Regards, Markus -- 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] Automatic regeneration of software packages by CPack?
You could, as a workaround for the problem, define a add_custom_target that removes the corresponding rpm/deb packages and just calls 'cmake --build --target package' to regenerate them. Thanks for your suggestion. It's not an ideal solution, but it worked just fine for me. Does this feedback mean that you stumbled also on missing build dependencies around generation of DEB and RPM packages with CPack? Regards, Markus -- 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] Automatic regeneration of software packages by CPack?
I actually don't know if this is an omission or a deliberate design choice. How often do use DEB and RPM package generation with CPack for your software? Regards, Markus -- 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] Distinguishing between source and binary packages with CPack?
Hello, Software package formats like DEB and RPM can help to distinguish the provided contents between source and binary files. https://wiki.debian.org/SourcePackage http://www.rpm.org/max-rpm/s1-rpm-miscellania-srpms.html How can I achieve a corresponding distinction with CPack? http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack#Ideas_for_Future_Development Regards, Markus -- 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] Distinguishing between source and binary packages with CPack?
There is no need for a .src.rpm when you don't embed the build rules into it. However, that only makes sense for distributions that have a package maintainer for the software, creates a source package with all build options and distribution adaptions. Have you got any more ideas for the fine-tuning around the packaging of a class library for the OCaml programming language? https://github.com/elfring/OTCL/blob/eca1ed17f70176435c8575eb55a67cca33926905/package_settings.cmake#L1 Regards, Markus -- 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] Automatic regeneration of software packages by CPack?
Hello, I configured a specific software to use the CPack modules to generate corresponding DEB and RPM packages together with CMake 3 a while ago. I notice now that package specifications and control files contain outdated version data after I called the command make package. How can I achieve that another build dependency is automatically considered there? Regards, Markus -- 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] Declaring relationships between components for software packages
Hello, Variables like CPACK_DEBIAN_PACKAGE_DEPENDS and CPACK_RPM_PACKAGE_REQUIRES can be set. Do you know any other package formats where similar settings are supported by corresponding generators? http://www.cmake.org/Wiki/CMake:CPackPackageGenerators Regards, Markus -- 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] How to make the construction and reuse of CMake lists safer?
Hello, The build tool CMake supports also the data processing for lists to some degree. http://www.cmake.org/cmake/help/v3.0/manual/cmake-language.7.html#lists I notice that CMake scripts are also provided by some software libraries so that corresponding settings can be automatically determined by the command find_package. http://www.cmake.org/cmake/help/v3.0/command/find_package.html I have also noticed that a lot of libraries provide only a single file for source file inclusion and linking. It seems that appropriate quoting of variables is often forgotten for this use case, isn't it? How many library build scripts construct variables with suffixes like _INCLUDE_DIRS and _LIBRARIES which contain two list elements at least? Can any special build function help to make the required data processing safer here? How can it be achieved that contents are properly escaped? Regards, Markus -- 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] Support for building of OCaml software?
Would further checks be useful for tools like as (GNU assembler), ar and ranlib from the software package binutils? [...] Do you have an example where it is necessary ? How do you think about to consider a few more dependencies around the tool flexlink from the software FlexDLL for Windows environments? https://github.com/ocaml/ocaml/blob/dd17af8b4342a8255173ebda7102e50de1bd2ec9/configure#L369 Regards, Markus -- 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] Support for building of OCaml software?
If you want native executables, you can specify it in the CMakeLists for each target or set the option CMAKE_OCaml_NATIVE to TRUE. Thanks for your clarification. If you mean .mli files, hopefully they are managed. I would prefer to map the file name for the OCaml interface compiler also to a CMake cache variable. librarian (linker?) You can use the CMake GUI to change the variables CMAKE_OCaml_LINKER_FLAGS*. I would prefer to map the file name for the OCaml archive generator also to another CMake cache variable. How do you think about to distinguish this program from other linking tools? Would further checks be useful for tools like as (GNU assembler), ar and ranlib from the software package binutils? [...] Do you have an example where it is necessary ? The software component flexlink (from ocamlopt) depends on these tools. http://alain.frisch.fr/flexdll.html#internals How do you think about the addition of commands like add_OCaml_executable and add_OCaml_library? Do the additions from your CMake module work together with the command install(TARGETS ...)? Regards, Markus -- 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] Support for building of OCaml software?
https://github.com/ocaml-cmake/ocaml-cmake How do you think about to extend configuration checks for the OCaml compiler which generates native code? Would further checks be useful for tools like as (GNU assembler), ar and ranlib from the software package binutils? Regards, Markus -- 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] How to establish hierarchical dependencies for CMake variables?
Hello, The module CMakeDependentOption is provided for a while. Is it possible to establish dependencies between other CMake variables (which are not options) in a similar way? Can a string be automatically forwarded from one variable into parts at other places during the build configuration? Regards, Markus -- 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] How to build several packages for a library with CPack?
Hello, A wiki article contains some information for the generation of installation packages. http://cmake.org/Wiki/index.php?title=CMake:Packaging_With_CPack#Using_CMake_variables_to_configure_CPack I would like to generate software packages for the following components. 1. Class library 2. Demonstration module Both parts should be provided in a bytecode and native-code format. I would appreciate your hints and advices. Regards, Markus -- 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] Support for building of OCaml software?
How do you think about to extend configuration checks for OCaml compiler variants? What do you mean by OCaml compiler variants ? - bytecode - Will any implementation for native code generation apply also aggressive software optimisations? - interfaces - librarian (linker?) Would you also like to check for the availability of any package manager? Do you mean OPAM, GODI... ? Yes. - Is there a need to make package generation easier? I guess that also some further considerations would help around the command install, wouldn't it? http://cmake.org/cmake/help/cmake_tutorial.html#s3 Regards, Markus -- 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] Dependency resolution for add_custom_command calls?
Hello, I try to generate some files mainly by calls of the command add_custom_command. One of them should start with the action to copy a source file into the build directory. But I wonder why this step is not written into a generated make file. I would appreciate your advices. Regards, Markus -- 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] Support for building of OCaml software?
https://github.com/ocaml-cmake/ocaml-cmake I find your contribution very interesting. How do you think about to extend configuration checks for OCaml compiler variants? Would you also like to check for the availability of any package manager? Regards, Markus -- 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] Support for building of OCaml software?
Hello, I would like to build a package for a software which was developed in the programming language OCaml. How is the status for the support of corresponding development tools? Regards, Markus -- 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] Clarification for handling of semicolons in parameters
The application CMake GUI 2.8.12.2 reports some internal errors as I would expect it if I dare to use the following setting. I expected that my example command configure_file will fail somehow. But the shown error messages do not fit to my expectations so far. I suggest to take a closer look at the situation if I would like to try out a subdirectory with a name like t e s t;ABC; xyz. CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:90 (file): file Internal CMake error when trying to open file: /home/elfring/Projekte/Bau/quoting/t e s t for writing. Call Stack (most recent call first): /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:100 (CMAKE_DETERMINE_COMPILER_ID_WRITE) /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake/Modules/CMakeDetermineCCompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:2 (project) Can a parameter be handled as a single one even if it contains a semicolon (which has got a special meaning for the CMake programming language)? Does this use case need any improvements for the involved parameter handling? Regards, Markus -- 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] Clarification for quoting of parameters for configure_file()
Hello, A wiki article mentions some details about how parameters are handled for CMake commands. http://cmake.org/Wiki/CMake/Language_Syntax#CMake_splits_arguments_unless_you_use_quotation_marks_or_escapes. I would like to try out the following command with unquoted parameters in a small build script. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/t1.txt.in ${CMAKE_CURRENT_BINARY_DIR}/t1.txt @ONLY) The application CMake GUI 2.8.12.2 reports some internal errors as I would expect it if I dare to use the following setting. CMAKE_CURRENT_SOURCE_DIR: ... /Probe/quoting/contains s p a c e s;COPYONLY ESCAPE_QUOTES CMAKE_CURRENT_BINARY_DIR: ... /build/quoting/contains s p a c e s;COPYONLY ESCAPE_QUOTES But I wonder about the result that the configuration command works if the shown file names do not contain semicolons. http://cmake.org/cmake/help/cmake_tutorial.html#s1 Would you like to explain such an observation? Regards, Markus -- 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] Difficulties with component search by FindBoost
Hello, I try to use a macro call like find_package(Boost 1.49 REQUIRED COMPONENTS spirit). But I get surprised by the following messages despite of a complete installation from the current source files of this software library. elfring@Sonne:~/Projekte/Bau/boot_parameters/boost cmake . -DBoost_DEBUG=ON -- [ /usr/share/cmake/Modules/FindBoost.cmake:476 ] _boost_TEST_VERSIONS = 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49 -- [ /usr/share/cmake/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHREADED = TRUE -- [ /usr/share/cmake/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LIBS = -- [ /usr/share/cmake/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RUNTIME = -- [ /usr/share/cmake/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VERSIONS = -- [ /usr/share/cmake/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PATHS = -- [ /usr/share/cmake/Modules/FindBoost.cmake:538 ] Declared as CMake or Environmental Variables: -- [ /usr/share/cmake/Modules/FindBoost.cmake:540 ] BOOST_ROOT = -- [ /usr/share/cmake/Modules/FindBoost.cmake:542 ] BOOST_INCLUDEDIR = -- [ /usr/share/cmake/Modules/FindBoost.cmake:544 ] BOOST_LIBRARYDIR = -- [ /usr/share/cmake/Modules/FindBoost.cmake:546 ] _boost_TEST_VERSIONS = 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49 -- [ /usr/share/cmake/Modules/FindBoost.cmake:639 ] location of version.hpp: /usr/local/include/boost/version.hpp -- [ /usr/share/cmake/Modules/FindBoost.cmake:663 ] version.hpp reveals boost 1.54.0 -- [ /usr/share/cmake/Modules/FindBoost.cmake:739 ] guessed _boost_COMPILER = -gcc48 -- [ /usr/share/cmake/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADED = -mt -- [ /usr/share/cmake/Modules/FindBoost.cmake:792 ] _boost_RELEASE_ABI_TAG = - -- [ /usr/share/cmake/Modules/FindBoost.cmake:794 ] _boost_DEBUG_ABI_TAG = -d -- [ /usr/share/cmake/Modules/FindBoost.cmake:842 ] _boost_LIBRARY_SEARCH_DIRS = /usr/local/include/lib;/usr/local/include/../lib;/usr/local/include/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib -- [ /usr/share/cmake/Modules/FindBoost.cmake:930 ] Searching for SPIRIT_LIBRARY_RELEASE: boost_spirit-gcc48-mt-1_54;boost_spirit-gcc48-mt;boost_spirit-mt-1_54;boost_spirit-mt;boost_spirit -- [ /usr/share/cmake/Modules/FindBoost.cmake:966 ] Searching for SPIRIT_LIBRARY_DEBUG: boost_spirit-gcc48-mt-d-1_54;boost_spirit-gcc48-mt-d;boost_spirit-mt-d-1_54;boost_spirit-mt-d;boost_spirit-mt;boost_spirit -- [ /usr/share/cmake/Modules/FindBoost.cmake:1017 ] Boost_FOUND = 1 CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1106 (message): Unable to find the requested Boost libraries. Boost version: 1.54.0 Boost include path: /usr/local/include The following Boost libraries could not be found: boost_spirit No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost. Call Stack (most recent call first): CMakeLists.txt:7 (find_package) I would appreciate your advices. Regards, Markus -- 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] Difficulties with component search by FindBoost
Boost.Spirit is headers-only library, so there is no binary library supplied. Thanks for your response. It might be not obvious from the manual [1], but COMPONENTS is dedicated to request lookup for the Boost libraries which are built as binary components. Can this documentation be improved? [1] http://cmake.org/cmake/help/v2.8.11/cmake.html#module:FindBoost Should this interface know when an error message is unnecessary in my use case? Regards, Markus -- 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] Difficulties with component search by FindBoost
Perhaps, all headers-only libraries could be handled by the FindBoost module I would appreciate if corresponding CMake scripts will consider a better handling for such software. and then reported by CMake: Spirit is headers-only, shall not be specified with COMPONENTS I would prefer a different feedback. Can the specification of non-binary components be also tolerated there? Regards, Markus -- 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] Clarification around target_link_libraries
1. The target name can be resolved inside the build system. But how should I determine generated file names when I want to refer to them from external sources like installation directories? Sorry, I don't really understand your question. What generated file names, and what external sources ? Now you can look also at concrete CMake scripts (if you want) where I am interested in further improvements for portability issues. https://github.com/elfring/libsocket/blob/1422047848b052f467935207516e2e60e1181673/CMakeLists.txt#L77 Would you like to share any more ideas? Regards, Markus -- 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] Checking the influence of variable names on passing compilation parameters
Hello, I would like to build some C++ software with the tool CMake 2.8.11.2-108.1 on my openSUSE systen. I have macro calls like the following in a CMake script of a subdirectory. ... message(STATUS {T} XFLAG: |${XFLAG}|) foreach(X client ... unix_server_stream) set(T ${X}_cpp) add_executable(${T} ${X}.cpp) set_target_properties(${T} PROPERTIES COMPILE_FLAGS ${XFLAG} OUTPUT_NAME ${X}) target_link_libraries(${T} ${LIB}) endforeach(X) ... The CMake GUI shows the expected log: C++11 support activated. {T} XFLAG: |-std=c++11| Configuring done Generating done But I get surprised by the message like error: 'std::unique_ptr' has not been declared after I called the program make. The verbose build mode shows that the needed parameter was not passed by the corresponding command. How are the chances to find out where and why the desired compilation parameter gets lost? If I rename the used variable to FLAGS, the software generation succeeds. I would appreciate if my approach will also work with longer variable names which can be found more easily and better understood. Regards, Markus -- 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] Clarification around target_link_libraries
Sorry, I don't really understand your question. What generated file names, and what external sources ? I mean with an external source here a directory which is not directly managed and controlled by the build system. I see installation directories as a well-known example for the use case when you occasionally compare the run time behaviour of an installed library to a freshly built one. The build system encapsulates file name conventions (and file formats) for the software generation. I would like to reuse such knowledge so that I can also refer to libraries from other sources in a generic way. Or, since you are it seems mixing C and C++, you have a problem with symbol naming. Thanks for your hint. I'm sorry that I overlooked an other preprocessor symbol which is relevant here. My evolving CMake scripts show better results now. Regards, Markus -- 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] Clarification around target_link_libraries
Now I try to give a build configurator the choice with which library type some executable files should be linked. It seems that I need to construct corresponding file names instead of target names. No, you don't have to. Thanks for your feedback. Do you want to build static and dynamic lib at the same time ? Yes. Then do something like this ? My CMake scripts used an approach that was similar to your description. Now I wonder which of my previous typos let me think that the desired target name could not be applied there. add_executable(hello ${hellosSrcs}) target_link_libraries(hello ${myLibs} ) Documentation: ... If a library name matches that of another target in the project a dependency will automatically be added in the build system to make sure the library being linked is up-to-date before the target links. ... I have got still two open issues (on my side?). 1. The target name can be resolved inside the build system. But how should I determine generated file names when I want to refer to them from external sources like installation directories? 2. I stumble on the following situation with the tools CMake 2.8.11.2 and GCC 4.7.2 20130108 on my openSUSE system. ... make -f examples++/CMakeFiles/client_cpp.dir/build.make examples++/CMakeFiles/client_cpp.dir/build make[2]: Entering directory `/home/elfring/Projekte/libsocket/Bau' Linking CXX executable client cd /home/elfring/Projekte/libsocket/Bau/examples++ /usr/bin/cmake -E cmake_link_script CMakeFiles/client_cpp.dir/link.txt --verbose=1 /usr/bin/c++ -O2 -g -DNDEBUGCMakeFiles/client_cpp.dir/client.cpp.o -o client -rdynamic ../libsocket_cpp.a ../libisocket.a ../libusocket.a ../libsocket_cpp.a(inetclientstream.cpp.o): In function `libsocket::inet_stream::connect(char const*, char const*, int, int)': /home/elfring/Projekte/libsocket/lokal/C++/inetclientstream.cpp:101: undefined reference to `create_inet_stream_socket(char const*, char const*, char, int)' collect2: error: ld returned 1 exit status make[2]: *** [examples++/client] Error 1 make[2]: Leaving directory `/home/elfring/Projekte/libsocket/Bau' ... I find that strange because the library file which contains the missed function is usable for the C program examples as the software generation and a corresponding small test run acknowledges. Regards, Markus -- 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] Clarification around target_link_libraries
Hello, CMake supports also building of static and shared libraries together. http://cmake.org/cmake/help/v2.8.11/cmake.html#command:add_library I get the impression from the tutorial that a needed library can be passed as a target name for the macro target_link_libraries. http://cmake.org/cmake/help/cmake_tutorial.html#s2 But I get a different experience. http://cmake.org/cmake/help/v2.8.11/cmake.html#command:target_link_libraries Now I try to give a build configurator the choice with which library type some executable files should be linked. It seems that I need to construct corresponding file names instead of target names. I adjust also a property like OUTPUT_NAME already. http://cmake.org/Wiki/CMake_FAQ#How_do_I_make_my_shared_and_static_libraries_have_the_same_root_name.2C_but_different_suffixes.3F Is it possible to determine the final path and complete file name for the generated library in my build environment? Can I avoid to query properties like PREFIX and SUFFIX by the macro get_target_property separately? How should I deal with special cases that might be better supported by a tool like Libtool? http://www.gnu.org/software/libtool/manual/html_node/Issues.html Regards, Markus -- 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] Improvements for macro CMAKE_DEPENDENT_OPTION?
Hello, Does the macro CMAKE_DEPENDENT_OPTION contain any open issues in its implementation that should be changed? http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeDependentOption.cmake;hb=2cde67a78123a4e59390f7aa2030ea8ff9e206d2 Regards, Markus ___ 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] Improvements for macro CMAKE_DEPENDENT_OPTION?
Hello, I tried to use the module CMakeDependentOption with the tool CMake 2.8.4 on my openSUSE 11.4 system as it is mentioned in the documentation. http://cmake.org/cmake/help/cmake-2-8-docs.html#command:option http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeDependentOption.cmake;hb=2cde67a78123a4e59390f7aa2030ea8ff9e206d2 I noticed that the tool tip on a restored dependent variable was OFF while I expected the return of the longer description that was initially set. Can it be that the variable documentation is lost from the variable attributes somehow? Does the macro CMAKE_DEPENDENT_OPTION has also got difficulties with the handling of variables from build scripts in subdirectories? Regards, Markus ___ 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] Complete quoting for parameters of some command examples
Hello, I have read the CMake documentation. http://cmake.org/Wiki/CMake/Language_Syntax#CMake_splits_arguments_unless_you_use_quotation_marks_or_escapes. Now I find that more parameters should be enclosed by quotation marks. Examples: - Frequently asked questions and corresponding answers ${CMAKE_CURRENT_SOURCE_DIR}/someinput.txt ${FOO_BINARY_DIR}/output1.cpp http://cmake.org/Wiki/CMake_FAQ#How_do_I_generate_an_executable.2C_then_use_the_executable_to_generate_a_file.3F - Article How To Write Platform Checks ${CMAKE_CURRENT_BINARY_DIR}/config.h http://cmake.org/Wiki/CMake:How_To_Write_Platform_Checks - Article How To Build Qt4 Software ${CMAKE_CURRENT_SOURCE_DIR}/a_header.h http://cmake.org/Wiki/CMake:How_To_Build_Qt4_Software#Configuring_CMake_to_Help_Translate Would you like to be better prepared for the handling of path/file names that contain special characters like spaces? Are there more script examples which need corresponding adjustments? Regards, Markus ___ 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] FIND sub-command to the STRING command
mhh, yeah, thats a good idea. Ok, I'll use this for doing a STRING( FIND ...) :) It was just an idea to share this patch with you, but you're right. Its easier doing this with regular expressions. Can it be that your implementation was faster than a complete regex application for your use case? Are there any remarkable differences in the corresponding execution speed and performance characteristics? Regards, Markus ___ 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] Compiler definitions for shared and static builds
I try to generate a cmake project and want to build shared and dynamic libraries in one step. Do you know answers from a wiki? http://cmake.org/Wiki/CMake_FAQ#Can_I_build_both_shared_and_static_libraries_with_one_ADD_LIBRARY_command.3F Regards, Markus ___ 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] Improvements for cross-referencing in the documentation?
That's it currently. Is it possible that a field or attribute can specify a format identifier (in the near future)? Regards, Markus ___ 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] Improvements for cross-referencing in the documentation?
E.g. cmake --help-fullfilename.docbook gives you a docbook file, which can then be processed further. The interesting thing is how to get the links into these files initially. Do you need any intermediate format(s) for the desired data exchange? Regards, Markus ___ 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] Improvements for cross-referencing in the documentation?
Am 26.01.2011 17:44, schrieb Alexander Neundorf: On Wednesday 26 January 2011, SF Markus Elfring wrote: E.g. cmake --help-fullfilename.docbook gives you a docbook file, which can then be processed further. The interesting thing is how to get the links into these files initially. Do you need any intermediate format(s) for the desired data exchange? Sorry, which desired data exchange ? A source format will be converted to a different file format and the conversion result will be distributed to the users, won't it? I thought this discussion is about adding more markup tags to the cmake documentation ? I'm sorry. - Have I overlooked in the CMake module documentation that tags are already supported? Regards, Markus ___ 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] Improvements for cross-referencing in the documentation?
Currently, for formatting the format as described in the readme.txt in the CMake modules directory is used (i.e. not that much formatting). Do higher level programming interfaces exist that can work with message/documentation templates in various file formats? Regards, Markus ___ 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] Improvements for cross-referencing in the documentation?
Much to my surprise, there was only a single CMAKE_MATCH on our whole documentation page. It would make sense to document the variables CMAKE_MATCH_0 and friends explicitly. And cross-referencing left, right, north and south would also be good. Does the current documentation format support detailed cross-referencing (with hyperlinks)? Regards, Markus ___ 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] Improvements for cross-referencing in the documentation?
No, it does not. Any cross-references are mentioned in text only form and depend on the end user finding the cross-reference topic. Would you like to change this situation? Regards, Markus ___ 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] How to retrieve the property list dynamically?
No, there is presently no facility for retrieving a list of properties. Is such a functionality also missing for variable names and their attributes? Are more software developers interested to query settings only from a subset of items? Regards, Markus ___ 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] How to retrieve the property list dynamically?
There are links to the well known by CMake properties that exist on various entities: global, directories, targets, tests, files, cache variables. I have not overlooked the description for them. I guess that these properties were extended during CMake history. I do not want to convert this part of the documentation into a separate data base for the support of enhanced queries. I would appreciate if the CMake programming interface can provide sophisticated introspection capabilities directly. However, the property mechanism allows project-specific extension of the set of properties on many of these entities. So these lists are incomplete. How can such extensions be dynamically listed? Is there a concrete problem you are trying to solve by asking these questions? Yes, of course. - My feature request is mostly for debugging purposes. If there are problems or unexpected results for a target, I would like to know exactly which variables and properties were active in the affected situation. Regards, Markus ___ 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] Improvements for cross-referencing in the documentation?
We already have this bug filed to improve CTest and CPack documentation: http://public.kitware.com/Bug/view.php?id=10067 I guess that the selection of a proper documentation format is a general problem for all applications. Which are your format favourites for CMake components at the moment? Regards, Markus ___ 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] How to retrieve the property list dynamically?
Hello, Various properties can be queried by the command get_property. http://cmake.org/cmake/help/cmake-2-8-docs.html#section_Properties I am looking for a command in the corresponding programming interface which can return a list of property names which will be optionally filtered by a regular expression. Is such a functionality already available? Regards, Markus ___ 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] Support for subexpressions in regular expressions?
Thanks for your help to make CMake better, How many CMake commands can work with subexpressions in regular expressions? Are any extensions needed in this application area? Regards, Markus ___ 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] How to assign data from subexpressions of regular expressions to CMake variables?
Thanks for your help to make CMake better, Is the command variant string(REGEX REPLACE ...) completely documented? Can multiple variables be specified that will receive the data from the evaluation of subexpressions in the passed regular expression? Regards, Markus ___ 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] How to query compiler definitions?
get_directory_property(info COMPILE_DEFINITIONS) How do you think about an extension for this programming interface? Would you like to support that target parameters like preprocessor symbols are queried from the build environment even if they were not set by the CMake command add_definitions explicitly? Regards, Markus ___ 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] How to query compiler definitions?
Probably that would be pretty difficult to achieve and definitely would break backwards-compatibility beyond resurrection. I have got a different opinion. I imagine that a property with a new name can provide the desired service to retrieve target parameters in a portable way from the build environment. Otherwise: Would the addition of a CMake command make more sense for this purpose? You shouldn't check for a preprocessor symbol in CMake. It's just the way I would prefer to adapt the build process to the requirements of the source files at the moment. It seems that the evaluation of compilation parameters (variable CMAKE_CXX_FLAGS...) with regular expressions is an approach that will currently work to some degree. The used pattern determines how many compilers will be supported. Instead, probably do a find_package(TinyXML) I would appreciate if a corresponding module (search script) will become generally available for CMake. and then depending on the result offer the user an option variable I guess that the term user needs to be distinguished for its various meanings. There are some switches involved that might only interest a subset of them. - software developers - system integrators - tool users Regards, Markus ___ 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] How to query compiler definitions?
Hello, I know that some source code will only be needed in my example project if the preprocessor symbol NDEBUG is not defined. This is usual for conditional compilation. The corresponding bit of debug code calls functions which are implemented in a few other source files. Now I am looking for ways whether these files can be added on demand to the build process. I try to query the settings by a programming interface from CMake 2.8.3 on my openSUSE 11.3 system. get_directory_property(info COMPILE_DEFINITIONS) message(STATUS info: ${info}) The corresponding display indicates that this variable is empty. I guess that this fact should be interpreted also in the way that the specified property is not defined in my situation. Now I wonder why this approach does not work as expected. (A few definitions are passed to my compiler of course.) I would appreciate your advices. Regards, Markus ___ 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] How to query compiler definitions?
Why don't you include the check for NDEBUG in in your debug-sources? This is the case already. The time you'll waste compiling these files will be negligible, and it would work with mult-config IDE's. I find this view debatable. I would appreciate if I can express in the build specification that a few source file are optional for the compilation because of this well-known preprocessor symbol. Regards, Markus ___ 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] How to query compiler definitions?
For multi-config IDE's you *don't know* whether NDEBUG is defined or not at CMake-time. I imagine that the build system could keep control on all passed compilation parameters if calls for generation commands would be intercepted (by CMake). Does it get any feedback for changes of this preprocessor symbol? And AFAIK there's no way to specify that a source file is conditional on the build configuration. I can try an approximation. - Do I need to apply the variable CMAKE_BUILD_TYPE instead if I can not reuse the symbol's value? add_executable(super super.c) I would like to construct the source file list that is passed to this command dynamically. Can unneeded stuff be avoided? Regards, Markus ___ 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] How to query compiler definitions?
You don't seem to understand the difference between CMake-time and Make- (or build-) time. I understand that there can be differences between the time of configuration and the applied generation. I guess that we have got different expectations about the introspection capabilities of the CMake build system. Build-time is when the actual build system runs. Everything is static here (except for custom commands). I do not want it this way for my use case. In particular, you can't change the list of source files any more. I imagine that the build system can still accommodate to some changes from other sources like preprocessor symbols. The problem is, you want to assemble that list at build-time, which is not possible, because then CMake wouldn't know about them. Can instructions from CMake scripts also be executed at generation time? I don't quite understand why it is so important to you that these files aren't passed to the compiler. If you exclude all of their contents with #ifndef NDEBUG, then each file should take less than a second to compile, so you'd need a lot of those debug-only files for it to matter. I hope that a more detailed description will clarify my use case. Example: A source file toy.cxx contains already the preprocessor switch that you mentioned. The marked debug code works with objects from a C++ class library for XML processing which has got its bunch of source files bundled in this project. Now I would like to omit this dependency if the software will be built for release mode. I would also like to be sure and want to check before the call of a compiler if this special symbol is really set. Regards, Markus ___ 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] How to query compiler definitions?
set_source_files_properties(debug_funcs.c PROPERTIES EXCLUDE_FROM_CONFIGURATIONS Release;MinSizeRel) I do not want to exclude this file based on the value of the variable CMAKE_BUILD_TYPE. ;-) I don't think it would make to do this based on preprocessor definitions. It seems that our ideas converge. :-) So, toy.cxx is not actually the problem, Correct. but you don't want to link against the XML library. Partly. yes. I am affected by a general issue from C++ class libraries. The corresponding free source files were copied to a subdirectory of the project I am interested in because a public shared library (*.so/*.dll) seems to be missing for it. (The project has got its own bundle of external software.) Library features are used in a limited way so far. This has got the consequence that its compilation should be optional for specific application parts. Do you need the library anyways (e.g. for other targets) [...] ? The software test part depends on the C++ class library unconditionally. However, if libxml is required for debugging only and you don't want to require it unconditionally, you have a problem and I can't see an easy way around it. The utility http://grinninglizard.com/tinyxml/index.html; is needed in my case. Regards, Markus ___ 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] How to query compiler definitions?
Why not? That's mostly equivalent to doing it based on -DNDEBUG (which is automatically defined for Release and MinSizeRel). I would like to be precise here. Do any configurations exist in the software development world where the build type Release does not include a definition for this preprocessor symbol? So, you always build tinyxml? Its compilation should depend on the application part that uses objects and corresponding member functions from this C++ class library. add_library(tinyxml STATIC By the way: How do you think about the attachment for the feature request Use CMake for build system? https://sourceforge.net/tracker/?func=detailaid=3151377group_id=13559atid=363559 I imagine that you might be affected with your project FreeFOAM in a similar way if I would dare to bundle its source files into an other project. I am curious if we will find more useful ideas for the involved issues. Regards, Markus ___ 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] How to assign version numbers from a source header to CMake variables?
Here is the code: I have found and implemented a solution that can extract data from a header file with the help from evaluation of regular expressions. file(STRINGS ${CPPCHECK_SOURCE_DIR}/lib/library_version.h CPPCHECK_BUILD_SPECIFICATION REGEX ^[ \t]*#define[ \t]+CPPCHECK_LIBRARY_VERSION_[A-Z]+[ \t]+[0-9]+.*$) if(CPPCHECK_BUILD_SPECIFICATION) message(STATUS ${CPPCHECK_BUILD_SPECIFICATION}) foreach(item IN ITEMS MAJOR MINOR PATCH) string(REGEX REPLACE .*#define[ \t]+CPPCHECK_LIBRARY_VERSION_${item}[ \t]+([0-9]+).* \\1 XYZ ${CPPCHECK_BUILD_SPECIFICATION}) set(CPPCHECK_BUILD_VERSION_${item} ${XYZ} CACHE STRING Version number for the build of the Cppcheck software) endforeach() else() message(FATAL_ERROR Data were not found for the required build specification.) endif() How do you think about any optimisation opportunities like it is mentioned in the feature request Directly reading data from a file into variables? http://public.kitware.com/Bug/view.php?id=11714 Regards, Markus ___ 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] How to assign version numbers from a source header to CMake variables?
The bug tracker is meant to help us track what bugs are going to be fixed in the upcoming releases of CMake. I have got no problems with this view. I have just dared to submit a feature request directly. It is not good as a general discussion mechanism because only a handful of CMake developers actually peruse the new issues in there. I find it nice that Brad King and you respond so quickly to my suggestions here. If there is a specific problem with CMake's actual functionality, then it belongs in the bug tracker as an issue. I would like to point out some open issues. Their importance and relevance is debatable for your work of course. Regards, Markus ___ 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] How to assign version numbers from a source header to CMake variables?
Hello, I would like the add the CMake approach for software generation to a project. My project example supports also other build tools. This has got consequences on the way how informations like version numbers are shared between these approaches. The CMake tutorial describes components for the desired solution (in the section Adding a Version Number and Configured Header File). http://cmake.org/cmake/help/cmake_tutorial.html I imagine to add a specific header file that will contain the shared data in the format of the source programming language. This will be a few C/C++ preprocessor definitions. Now I would like to know how to get these informations into CMake variables for further reuse. I would appreciate your advices. Regards, Markus ___ 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] How to assign version numbers from a source header to CMake variables?
Are you using source control? Yes. - But there are challenges to query content management systems in a portable way. I use a combination of version in the main CMakeLists.txt and the svn rev. Variables from these get into a generated project header file that is also generated in the main CMakeLists.txt I imagine a data flow like the following file example. shared_data.h ⇒ project_specifications.cmake ⇒ config.h.in Does my idea fit to your software generation approaches? Regards, Markus ___ 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] How to assign version numbers from a source header to CMake variables?
I use a simple text file with the build number, which is tracked under VCS. During the build I parse it, generate my version header, increase the number, save it to the file and check it in. Which (CMake) commands do you use for this approach? Regards, Markus ___ 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] How to assign version numbers from a source header to CMake variables?
Here is the code: Thanks. - Very nice. :-) Which software licence does belong to your approach? Would anybody like to transform your example into an official CMake module? Regards, Markus ___ 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] How to assign version numbers from a source header to CMake variables?
Here is the code: I have got another idea. Did anybody try to use the C/C++ preprocessor (cpp and eventually including the compiler) to output a file in a format which is suitable for processing of this data as a project specification for CMake? Regards, Markus ___ 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] Clarification for quoting of parameters for add_executable()
What would you like it to print? It depends on the syntax interpretation if the passed quoted parameter will be processed as a CMake list. David Cole pointed it out to me that this is not the case if some data are enclosed by quotation marks. http://public.kitware.com/Bug/view.php?id=11677#c24588 If I follow this view here, then I expect the following log display. =Alpha.cxx;/home/elfring/Projekte/CMake/Test/11677/source/Zulu.cxx= Configuring done CMake Error at CMakeLists.txt:5 (add_executable): Cannot find source file Alpha.cxx;/home/elfring/Projekte/CMake/Test/11677/source/Zulu.cxx. Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx The wording of the error message shows an unchanged input parameter now. Regards, Markus ___ 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] Clarification for quoting of parameters for add_executable()
Hello, My experience with CMake programming is evolving. I try to update some scripts which were published with the feature request Add simple CMake build files. https://sourceforge.net/apps/trac/cppcheck/ticket/1092#comment:5 A concern that I try to tackle as a next step for this software project is the famous issue parameter quoting as it is described by an article. http://cmake.org/Wiki/CMake/Language_Syntax#CMake_splits_arguments_unless_you_use_quotation_marks_or_escapes. I came along to the build instructions for a program which contained the usual function call add_executable. I added quotation marks for the second parameter because I thought that it was appropriate with the advices from the known Wiki article in mind. I was suprised by unexpected consequences a moment later. I described the corresponding side effects in the bug report/feature request 'Clarification of message CMake Error in cli/CMakeLists.txt'. http://public.kitware.com/Bug/view.php?id=11677 I assume that David Cole categorises my story as a basic programming error. But I am not yet convinced about this. There are still a few details that bother me here if you consider the following small script template for example. cmake_minimum_required(VERSION 2.6) project(MY_P) set(MY_SOURCES A.cxx ... Z.cxx) message(STATUS file list: ${MY_SOURCES}) add_executable(MY_P-test ${MY_SOURCES}) I would expect that a quoted CMake list will be passed from the specified variable to this command. How do you think about this when you stumble on a message like the following when you know that the missing source files are available in your directory structure? ... Configuring done CMake Error at CMakeLists.txt:5 (add_executable): Cannot find source file Y.cxx. Tried extensions ... ... I hope that the involved technical details can be better resolved in a wider audience. Regards, Markus ___ 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] Resolution of dependencies for Subversion
If you're asking if the module should find svn.exe if all you need is the subversion libraries, the answer is it doesn't have to. Once COMPONENTS have been specified the module can require the user specify one to find executables as well. FindImageMagick is a good example of this. It maintains backwards compatibility if COMPONENTS is not specified but otherwise requires each component that is to be searched for to be explicitly named regardless of it it is a program or a library. Thanks for your explanation. Can it be avoided to copy and paste source code from other configuration scripts into the discussed update candidate? Does a base class exist which provides the common functionality for path searching and variable setting? How many instructions have the available files got in common so that more configuration code can be moved into base functions? Regards, Markus ___ 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] Support for higher-level software design methodologies?
There are no classes in CMake script, only functions and macros. Would it be useful if object-oriented software development might become supported by this configuration programming language? Most find modules are fairly simple but many of them have their quirks. I don't think there's a tremendous opportunity available to generalize what they do if you're asking, but it certainly is possible. The solution could also be in the form of new higher-level CMake commands. I hope that more common functionality can be extracted into central base functions and classes. This would improve the reuse of standard features and will potentially reduce efforts from repeating solutions in own source code. Regards, Markus ___ 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] Resolution of dependencies for Subversion
You could look to FindImageMagick for inspiration. It started as a way to find the ImageMagick binary utilities like convert and mogrify but support was added to detect the ImageMagick libraries via specifying additional COMPONENTS. Thanks for your suggestion. I am also interested in another variation of this use case. Which name should a configuration script get that determines some parameters for the build process and does not look for any client software? How do you deal with the situation if further knowledge about available utilities is not needed for the generation of project specific binaries? Regards, Markus ___ 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] Resolution of dependencies for Subversion
Again, to me it looks like FindSubversion is for *using* Subversion, not for building it. As such, setting up include paths and link libraries is not appropriate in that module. Does a naming convention exist for configuration scripts? How should names be distinguished between scripts which look only for the availability of specific client software like the command svn and files which determine all parameters for the build process to enable customised software development? Regards, Markus ___ 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] Resolution of dependencies for Subversion
You mean that you have FindSubversion.cmake as part of your CMake installation? Yes. - The configuration script is a part of the package cmake 2.6.4-29.2 from the openSUSE build service. I don't see any variables defined with those names in the module you linked above. What is the question here? Does a configuration script exist which will define all required variables and corresponding data structures for the build process? Now I'm really confused. Are you trying to use CMake to build a Subversion addon of some sort? I do not want to develop an add-on. But I would like to create a little program for my own purposes that is based on the application programming interface like it is described in the document Using the APIs - Chapter 8. Developer Information. http://svnbook.red-bean.com/en/1.1/ch08s02.html Would you like to recommend any ways to resolve the additional software dependencies for the Apache Portable Runtime library? FIND_PACKAGE(APR REQUIRED) FIND_PACKAGE(APRUtil 1.3 REQUIRED) How are the chances that another improved script will be added to the available modules? http://fisheye.freeswitch.org/browse/FreeSWITCH/cmake_modules/FindAPRUtil.cmake If so, I don't think that's what FindSubversion is for. It looks like FindSubversion is for running the svn executable during builds in a CMake-friendly way. Its header contains the comment Extract information from a subversion working copy. Should the functionality be extended so that variables will also be defined with the suffix _INCLUDES and _LIBS for compiling and linking like they are provided by other scripts? Regards, Markus ___ 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] Resolution of dependencies for Subversion
Again, to me it looks like FindSubversion is for *using* Subversion, not for building it. As such, setting up include paths and link libraries is not appropriate in that module. How should a module be called which provides all required settings for the build process? I'm not aware of a CMake Find module that helps with building Subversion, but I've never looked for one. I am just looking around to find the corresponding software components. I wonder if it would not be available already. Regards, Markus ___ 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] Resolution of dependencies for Subversion
Hello! A configuration script on my Linux system contains the following information. # $Id: FindSubversion.cmake,v 1.2.2.3 2008-05-23 20:09:34 hoffman Exp $ http://public.kitware.com/cgi-bin/viewcvs.cgi/Modules/FindSubversion.cmake?revision=1.4root=CMakeview=markup I have got the impression that there will not be any variables defined with the suffix _INCLUDES and _LIBS. I would expect such names so that they can be used for the commands INCLUDE_DIRECTORIES and LINK_DIRECTORIES. http://cmake.org/cmake/help/cmake2.6docs.html#command:include_directories Subversion has got additional software dependencies like it is described in the document Using the APIs - Chapter 8. Developer Information. I have also got some problems to get the commands FIND_PACKAGE(APR REQUIRED) and FIND_PACKAGE(APRUtil 1.3 REQUIRED) to work so that the Apache Portable Runtime library can be used as expected. Do any scripts need further improvements and fine-tuning? Regards, Markus ___ 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