[CMake] CPack`ing a bunch of command line tools on OS/X
Hello, I try to pack a bunch of command line tools (and some additional data files) into an OS/X installer. When the installer is running, it should install / copy the command line tools and adjust the PATH variable (or what ever mean that comes close, to make the tools available). I use a super build structure and after build and is done, I end up with a very simple structure: install | |\-bin | |\-bjpaprog | |\-bjpaserver | |\-bootloader_client | \-—create_package | \--firmware |\-bootloader.tfp |\-firmware.tfp \-—softdevice.tfp I use TGZ and productbuild as CPack generators. The generated zip file contains all the files above. The generated pkg files, just starts the installer, but does nothing. The CMakeLists.txt for the packing looks basically like this: cmake_minimum_required(VERSION 3.14) set(CPACK_PACKAGE_VENDOR "Torrox GmbH & Co KG") install(DIRECTORY ${INSTALL_DIR}/bin DESTINATION .) install(DIRECTORY ${INSTALL_DIR}/firmware DESTINATION .) set(CPACK_GENERATOR TGZ productbuild) include(CPack) I have no clue, to as where to start. Any ideas, pointers, comments? best regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Embedded build using ExternalProject
Hi Eric, > Am 27.06.2019 um 13:06 schrieb Eric Doenges : > > I can't help you with your other issues, but I believe the solution to this > problem is to specify "BUILD_ALWAYS TRUE" in your ExternalProject_Add. From > the documentation for ExternalProject_Add: > Enabling this option forces the build step to always be run. This can be the > easiest way to robustly ensure that the external project’s own build > dependencies are evaluated rather than relying on the default success > timestamp-based method. This option is not normally needed unless developers > are expected to modify something the external project’s build depends on in a > way that is not detectable via the step target dependencies (e.g. SOURCE_DIR > is used without a download method and developers might modify the sources in > SOURCE_DIR). I’ve applied this option and will see if it helps. thanks, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Embedded build using ExternalProject
> Am 26.06.2019 um 20:07 schrieb Hendrik Sattler : > >> ExternalProject_Add(firmware_binaries >> SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/source >> INSTALL_DIR ${installDir} >> CMAKE_ARGS >> -DCMAKE_INSTALL_PREFIX:PATH= >> -DBOOTLOADER_AES_KEY=${BOOTLOADER_AES_KEY} >> -DBOOTLOADER_VERSION=${BOOTLOADER_VERSION} >> -DBUILD_DEBUG=1 >> -DBUILD_NRF52=1 >> BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR} >> --target firmware_binaries >> ) > > The build command is using the wrong directory. Yes, thank you. signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Embedded build using ExternalProject
Hi Albrecht, > Am 26.06.2019 um 19:10 schrieb Albrecht Schlosser : > > On 6/26/19 3:53 PM Torsten Robitzki wrote: > >> I don’t want to build any EOL test firmware, test-tools etc. just the stuff >> that will be shipped, thus the explicit target. I can build the >> firmware_binaries, from the source directly, without problems. But when I >> try to build with the top-level cmake file, that contains the >> ExternalProject_Add(), I get the usual configure output and then: >> -- Configuring done >> -- Generating done >> -- Build files have been written to: >> /Users/todi/blueswd_firmware/build/firmware_binaries-prefix/src/firmware_binaries-build > > Is this a on a Windows system? No, my build host is a Mac. I figured out, what the problem with this recusion is: BUILD_COMMAND ${CMAKE_COMMAND} —build ${CMAKE_CURRENT_BINARY_DIR} --target firmware_binaries The build command really recuses into ${CMAKE_CURRENT_BINARY_DIR}, which have to be: BUILD_COMMAND ${CMAKE_COMMAND} —build --target firmware_packages :-) signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Embedded build using ExternalProject
Hello, I have a project, where binaries are build for an embedded platform and for a PC platform. To build software update packages for the embedded platforms (files that can be used to make in the field firmware updates), tools that have to run during the build have to be build from source first. For example firmware.tfp have to be build by running create_package with firmware.bin. firmware.bin have to build with settings for the embedded platform and create_package have to be build with setting of the build host. I’ve asked this question already a year or so ago and got the response, that using super builds will help me. Now I try to convert the project to a super build structure. Fortunately, there was very little content inside my main CMakeLists.txt, mainly `add_subdirectory( source )`. Mainly, I want to build different sets of artifacts from the same source tree, but with different Now I’m stuck with a number of issues. First, I want to build all firmware binaries for the NRF52 embedded platform: ExternalProject_Add(firmware_binaries SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/source INSTALL_DIR ${installDir} CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= -DBOOTLOADER_AES_KEY=${BOOTLOADER_AES_KEY} -DBOOTLOADER_VERSION=${BOOTLOADER_VERSION} -DBUILD_DEBUG=1 -DBUILD_NRF52=1 BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR} --target firmware_binaries ) I don’t want to build any EOL test firmware, test-tools etc. just the stuff that will be shipped, thus the explicit target. I can build the firmware_binaries, from the source directly, without problems. But when I try to build with the top-level cmake file, that contains the ExternalProject_Add(), I get the usual configure output and then: -- Configuring done -- Generating done -- Build files have been written to: /Users/todi/blueswd_firmware/build/firmware_binaries-prefix/src/firmware_binaries-build [ 75%] Performing build step for 'firmware_binaries' [ 12%] Performing build step for 'firmware_binaries' [ 12%] Performing build step for 'firmware_binaries' [ 12%] Performing build step for ‚firmware_binaries‘ … This line repeats until make reports: make[776]: /usr/local/Cellar/cmake/3.14.3/bin/cmake: Resource temporarily unavailable make[776]: *** wait: No child processes. Stop. make[776]: *** Waiting for unfinished jobs make[776]: *** wait: No child processes. Stop. Any idea, what might be wrong here? Some kind of recursion? An other issue: I want to forward targets to the super build, so that I can build them there. For example I have ~30 unit test programs and when I’m working in a certain area, I usually want to build exactly one of this programs. Is it possible to export them as targets of the super build? A third issue that I have is, that changes to the CMakeLists.txt files in the Project are not reflected by the super build. If I make a change to one of the CMake files under ${CMAKE_CURRENT_LIST_DIR}/source, I usually have to delete the whole build folder and start from scratch with the build. Is there an other way to force the super build to recognize the changes? (Note: ${CMAKE_CURRENT_LIST_DIR}/source is not added as subdirectory to the top level (super build) CMakeLists.txt). best regards, Torsten P.S.: $ cmake --version cmake version 3.14.3 signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [cmake-developers] Properly Documenting a CMake Module
> Am 14.02.2019 um 14:53 schrieb Timothy Wrona : > > How does Sphinx know to go parse that ".cmake" file? Does Sphinx recognize > the „cmake-module" keyword in a special way and know what to do with it? it’s from a Sphinx module that you can find the in the CMake sources Utilities/Sphinx/cmake.py. Or you can install this file using pip: > pip install sphinxcontrib-moderncmakedomain When configuring Sphinx, you have to name the extensions to use in Sphinx's configuration file (conf.py) and add the name of the extension (sphinxcontrib.moderncmakedomain) to the extensions array. best regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
Re: [cmake-developers] Properly Documenting a CMake Module
> Am 13.02.2019 um 13:42 schrieb Brad King via cmake-developers > : > > The online docs, like those at https://cmake.org/cmake/help/v3.14 > do publish a `/objects.inv` to support intersphinx: > > http://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html > > This was done on request of some users so I haven't looked into how > that works, but one should be able to use sphinx to generate one's > own documentation and still cross-reference CMake’s online docs. I can confirm that this works as expected. Used it by myself. signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
Re: [CMake] Checking Variables in a tool-chain file
Hi, > Am 01.02.2019 um 17:17 schrieb frodak17 : > > Be aware that CMAKE_TRY_COMPILE_PLATFORM_VARIABLES only works with the > try_compile() command source file signature. Unfortunately it doesn't work > with try_compile() whole projects signature. The section on Other Behavior > Settings mostly only applies to the source file signature. can you give me some details on the consequences? I’ve inserted following test into my tool-chain file (https://github.com/TorstenRobitzki/bluetoe/pull/39/commits/6067e808486c8421e6f3bf3a5dd9c14ab8aa6474): set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES ARM_GCC_TOOL_PATH) if (NOT DEFINED ARM_GCC_TOOL_PATH) message(FATAL_ERROR "To configure the arm-none-eabi-gcc correctly, please set ARM_GCC_TOOL_PATH to the path that contains the bin directory of your GCC installation.") elseif(NOT EXISTS ${tools}/bin) message(FATAL_ERROR "To configure the arm-none-eabi-gcc correctly, please set ARM_GCC_TOOL_PATH to the path that contains the bin directory of your GCC installation.") endif() Will this fail eventually? kind regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Syntax to document cmake files, functions and macros
> Am 31.01.2019 um 19:55 schrieb Marc Herbert : > > So is there a relatively simple way to run the same tooling on any regular, > non-module .cmake files > too and produce project-specific documentation? We are working on a larger CMake project and we use Sphinx. We use sphinxcontrib.moderncmakedomain as extension, which adds CMake syntax highlighting and sphinx.ext.intersphinx to allow us, to refer to the original CMake documentation. regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Checking Variables in a tool-chain file
> Am 31.01.2019 um 21:10 schrieb Craig Scott : > > This is precisely the scenario that the CMAKE_TRY_COMPILE_PLATFORM_VARIABLES > variable is meant for. It allows a toolchain file to specify additional > variables that should be passed along to try_compile(). Works like a charm. Thanks a lot! Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Checking Variables in a tool-chain file
Hi Sergei, > Am 31.01.2019 um 08:42 schrieb Sergei Nikulov : > > Just guessing maybe better use $ENV{ARM_GCC_TOOL_PATH} ? > https://cmake.org/cmake/help/latest/variable/ENV.html?highlight=env Well, but this would mean, I had to configure CMake not only with Cache variables: cmake -DARM_GCC_TOOL_PATH=/usr/local/gcc-arm-none-eabi-7-2018-q2-update -DBINDING=nrf52 -DCMAKE_TOOLCHAIN_FILE=../cmake/gcc-arm-none-eabi.cmake -DNRF5_SDK_ROOT=~/CMSIS/nRF5_SDK_14-2/ .. But also with environment variables: ARM_GCC_TOOL_PATH=/usr/local/gcc-arm-none-eabi-7-2018-q2-update cmake -DBINDING=nrf52 -DCMAKE_TOOLCHAIN_FILE=../cmake/gcc-arm-none-eabi.cmake -DNRF5_SDK_ROOT=~/CMSIS/nRF5_SDK_14-2/ .. Thanks for the pointer, I will think about it. kind regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Checking Variables in a tool-chain file
Hi, I have a tool-chain file, which requires a variable to be set to the path to the compiler on the local machine: set(CMAKE_C_COMPILER ${ARM_GCC_TOOL_PATH}/bin/arm-none-eabi-gcc) set(CMAKE_CXX_COMPILER ${ARM_GCC_TOOL_PATH}/bin/arm-none-eabi-g++) Now I want to give the user an error message, in case that this variable is not set. The „usual“ check for the existence of the variable doesn’t work, because the tool-chain file is included in different context, without access to the cache. Any idea? regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [cmake-developers] real functions (was: $LIST_LENGTH{} syntax)
> Am 22.01.2019 um 16:37 schrieb Brad King : > > On 1/22/19 10:28 AM, tors...@robitzki.de wrote: >> With `$CACHE{VAR}` and `$ENV{VAR}` we already have the syntax for calling a >> „function“. > > No, there is no obvious way to pass arguments, handle nested quoting, etc. Jep, you are right. I’ve overlooked that nested aspect. > The language was not designed for that. That is a big can of worms I'd rather > not open just to solve the list length problem which is already only 2 lines. Ok, I understand this. signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
Re: [cmake-developers] real functions (was: $LIST_LENGTH{} syntax)
> Am 22.01.2019 um 13:33 schrieb Brad King : > > On 1/22/19 7:09 AM, tors...@robitzki.de wrote: > >> How about adding the ability to add such function? Like: >> >> procedure(LIST_LENGTH list) >> list(LENGTH list length) >> return(${length}) >> endprocedure() > > We don't have a syntax for invoking functions with return values. > That’s a whole other discussion. With `$CACHE{VAR}` and `$ENV{VAR}` we already have the syntax for calling a „function“. What is missing, is a command to define a function and a command to specify the return value of a function. Once we have this, it would be possible to define $LIST_LENGTH in the CMake language itself. And real functions with return values could make writing in CMake language much more easier. signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
Re: [cmake-developers] Support for list length expression in if()-command?
Hi Brad, > Am 14.01.2019 um 12:44 schrieb Brad King : > > I've almost never needed to test the length of a list in CMake > code. It's not very common in my experience. What is your > customer trying to do? Sorry for the late response! I’ve asked him. Mainly, he has three use cases: - Checking for empty lists (I’ve showed him that this can be done by a string compare). - Checking for lists having more than 1 entry - Checking for equal size of two lists. For example, if you want to pass pairs or tuples to a function. (example: f(firsts seconds)) regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
[CMake] add_executable() with BYPRODUCT
Hello, we have some applications for something similar to BYPRODUCTS in add_custom_command() when it comes to add_exectuable(). For example, we want to do some resource calculation based on map files. And in a perfect world, the map file would be a BYPRODUCT of the executable and we could make the resource calculation dependent on the map file. Thus a missing map file would result in a relinking of the executable. Is it possible to define a BYPRODUCT of an executable, somehow? Kind regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Integrating Build Date/Time into Binary
Hello, we are porting a larger set of projects (~70) to CMake. The current build has a feature to integrate the current timestamp of the build into the final binary / target. If a target is relinked, a header (id.h) is created with the current timestamp, a user provided C file (id.c), including that header is recompiled and linked into the target as well. While thinking about how to provide a similar solutions, we came up with some ideas: 1) add_custom_command() The projects have to move id.c into a separate library. For the main target, all depending targets (excluding the library containing id.c) are determined. A add_custom_command() creates id.h and depends on the list of determined, depending targets. The drawback that I see here, is that other, additional dependencies (like introduced with add_custom_command()) are not taken into account and that we have to recreate the algorithm to determine all direct and indirect depending targets. 2) add_custom_command(TARGET PRE_LINK…) The generation of both, id.h and id.c are excluded from the main target and are build by the add_custom_command(). The resulting object file is added as GENERATED, EXTERNAL_OBJECT source file to the main target. The drawback here is, that the custom command have to compile the id.c file, using the right compiler, the right flags, include paths etc. To me it doesn’t sound to be a very special requirement to have some kind of hash (timestamp in this case) over the compiled files in the resulting binary. How do others solve this or similar problems? Any comments to our ideas? TIA, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[cmake-developers] Support for list length expression in if()-command?
Hi, I have a customer that requires quite often to check, whether a list contains at least a given number of elements. As we do not have functions with return values, this requires him to inquire the length of a list before taking special actions. To simplify that task (and without larger changes in CMake [like introducing *real* functions]), he came up with the idea to extend the if()-command with a LENGTH operator: set(list) … if (LENGTH list GREATER 1) … endif() Would such an extension be accepted as pull request, if we would provide it? regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
[CMake] Escaping end of line anker in regex
Hi, I’ve stumbled over following issue: if (NOT ^ MATCHES ^\^ ) message(FATAL_ERROR "Anker not found!") endif() if (NOT $ signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [cmake-developers] Idea for Multi-Toolchain Support
> Am 24.12.2018 um 17:07 schrieb Kyle Edwards : > > On Sat, 2018-12-22 at 16:57 +0100, Torsten Robitzki wrote: >> What I’m still missing is support to define dependencies between >> different targets (build by different toolchains), so that I can >> describe that I require a tool that is build with the HostToolChain, >> to generate a file that is required by the part of the build, that is >> using the CrossToolChain. And, of cause, if the source of that tool >> changes, that tool have to be rebuild and the generated file from the >> CrossToolChain part of the build have to be rebuild. > > What about add_dependencies()? Is that sufficient, or is there > something more that you need? If it would be possible to use add_dependencies() to describe dependencies between two targets build with two different toolchains, then this would be sufficient: add_dependencies(signed_firmware TOOLCHAINS CrossToolChainA CrossToolChainB firmware_signing_tool TOOLCHAIN HostToolChain) best regards, Torsten -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
Re: [cmake-developers] Idea for Multi-Toolchain Support
Hi, > Am 17.12.2018 um 21:18 schrieb Kyle Edwards via cmake-developers > : > > Then, executables and libraries could have a toolchain specified: > > add_executable(BuildUtility TOOLCHAIN DEFAULT ...) > add_library(MyLibrary TOOLCHAIN CrossToolchain …) or even toolchains: add_library(feature1 TOOLCHAINS CrossToolChain HostToolChain) add_executable(Firmware TOOLCHAIN CrossToolChain) target_link_libraries(Firmware feature1) add_executable(Test_Feature1 TOOLCHAIN HostToolChain) target_link_libraries(Test_Feature1 feature1) A nice feature would be to let toolchain propagate along the dependency graph defined by `target_link_libraries`. So in the example above, the TOOLCHAINS option to `add_library` would be optional, because the target Firmware requires feature1 to be build with CrossToolChain and Test_Feature1 to be build with HostToolChain. Which requires the build to have different binary directories for every toolchain. (Which for me is an indication that having multidimensional build types would be the more natural way to go) What I’m still missing is support to define dependencies between different targets (build by different toolchains), so that I can describe that I require a tool that is build with the HostToolChain, to generate a file that is required by the part of the build, that is using the CrossToolChain. And, of cause, if the source of that tool changes, that tool have to be rebuild and the generated file from the CrossToolChain part of the build have to be rebuild. best regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
[cmake-developers] Test for list size
Hi, we have often the need to test for a minimum list size list(LENGTH list list_size) if (list_size GREATER 1) … This happens so much, that we though it might be helpful to extend the if-syntax to allow this to be written in a more compact way. For example: if (LENGTH list GREATER 1) … Or maybe by introducing functions that can return values (length being a „function“ here): if (length[list] GREATER 1) … What do you think? Are we the only ones that could make good use out of this extension? best regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
[CMake] extending clean for Ninja
Hi, we have some source file generators, that take a known list of input files and generate an „relatively“ unknown list of output files. The exact list of output files depend on the content of the input files. The „usual“ way to solve this seams to have an add_custom_target() call, and listing all output files as BYPRODUCTS, because then Ninja would know the output files as being targets and would delete them when asked to clean the project. Assumed all output files would be in the same directory and that it would be safe to delete the entire directory, I though, I could add the directory name as BYPRODUCTS. Unfortunately this hack doesn’t work, because the OS function that Ninja uses to remove files does not delete not empty directories. If I could use the very same generator to produce the list of output files, I could then add this list as BYPRODUCTS option to `add_custom_target()`. One problem still would remain: if I change one of the input files, so that the list of output files change, cmake would have to re-run. Does someone of you have an idea, how to force cmake to re-run, if a certain list of files changed? Is there an easier way to archive what I want (to delete the output files when Ninja -t clean is called)? Best regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] What is --build-two-config good for
Hi Robert, > Am 06.12.2018 um 15:26 schrieb Robert Maynard : > > It is possible to have CMake projects where an initial configuration of the > project is insufficient for it to be in a valid state. This is generally > caused by a project which evaluates variables before they exist and saved > into the cache. By running CMake a second time for these projects the > evaluation works ‚as intended' at the build is the correct state. thanks for the explanation! regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [cmake-developers] [CMake] dependencies of cross compiliations
> Am 27.11.2018 um 19:55 schrieb Eric Noulard : > > However from my point of view and my cross-compiling experience when you > cross-compile you have: > > 1) the host compiler which is used to compile "host tools" > 2) the target compiler (may be several of them) to "cross-compile" > > My assumption are: > a) when you cross-compile your build is a "whole" and you shouldn't have to > setup some superbuild >structure for building host tools ht_exe and another for target1 tool > t1t_exe and another one for target2 tool t2t_exe. > > b) what you want is to build: > ht_exe for the host > possibly use ht_exe during the build to generate some [source] file > t1t_exe for the [cross]target1 > t2t_exe for the [cross]target2 > > c) you seldomly compile the same source for the host AND the target, but it > may happen. In case, you are doing unit tests, it’s normal to have the same code running in a test on the host platform and in the final binary on the target. I think, having more than 1 target platform becomes more and more normal as it becomes more usual to have multiple microcontrollers in a project. Previously, I have encoded this in the build type. So instead of just having Debug and Release, I had HOST_Debug, HOST_Release NRF51_Debug, NRF51_Release, STM8_Debug, STM8_Release and so on. It doesn’t annoy me very much, that I have to run CMake 3 times to get all the binaries for a release build. The problem that I have, are dependencies between this builds. If I write a tool that (for example) generates source files for one of the target platforms, the build for the host platform must run before the build for that target platform. And when I make changes to that tool, I want the build to regenerate the generated source files. Keeping track of this dependencies to solve this kind of ordering issues and to allow minimum rebuilds, is the main purpose of any build system. To solve this with CMake, I think we need a way to define the dependencies between build types (in the example above, from the generator from the host build to the generated source file in one of the target builds) and CMake needs to know the build directory for all build types (not only the current). > The wish-season is coming up, so that's sort of what I would like to > have. Now it's your turn. No bikeshedding please, only deliveries ;) How about ``add_dependencies()`` allowing me to define dependencies between different build types? :-) best regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
Re: [CMake] dependencies of cross compiliations
> Am 27.11.2018 um 19:55 schrieb Eric Noulard : > > However from my point of view and my cross-compiling experience when you > cross-compile you have: > > 1) the host compiler which is used to compile "host tools" > 2) the target compiler (may be several of them) to "cross-compile" > > My assumption are: > a) when you cross-compile your build is a "whole" and you shouldn't have to > setup some superbuild >structure for building host tools ht_exe and another for target1 tool > t1t_exe and another one for target2 tool t2t_exe. > > b) what you want is to build: > ht_exe for the host > possibly use ht_exe during the build to generate some [source] file > t1t_exe for the [cross]target1 > t2t_exe for the [cross]target2 > > c) you seldomly compile the same source for the host AND the target, but it > may happen. In case, you are doing unit tests, it’s normal to have the same code running in a test on the host platform and in the final binary on the target. I think, having more than 1 target platform becomes more and more normal as it becomes more usual to have multiple microcontrollers in a project. Previously, I have encoded this in the build type. So instead of just having Debug and Release, I had HOST_Debug, HOST_Release NRF51_Debug, NRF51_Release, STM8_Debug, STM8_Release and so on. It doesn’t annoy me very much, that I have to run CMake 3 times to get all the binaries for a release build. The problem that I have, are dependencies between this builds. If I write a tool that (for example) generates source files for one of the target platforms, the build for the host platform must run before the build for that target platform. And when I make changes to that tool, I want the build to regenerate the generated source files. Keeping track of this dependencies to solve this kind of ordering issues and to allow minimum rebuilds, is the main purpose of any build system. To solve this with CMake, I think we need a way to define the dependencies between build types (in the example above, from the generator from the host build to the generated source file in one of the target builds) and CMake needs to know the build directory for all build types (not only the current). > The wish-season is coming up, so that's sort of what I would like to > have. Now it's your turn. No bikeshedding please, only deliveries ;) How about ``add_dependencies()`` allowing me to define dependencies between different build types? :-) best regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] How is ARGN passed to a macro
Hi Andreas, > Am 21.11.2018 um 20:18 schrieb Andreas Naumann : > > I think the behavior is explained in [1] and [2]. In particular the second > section of [2] states that the parameter " [...] such as ARGN are not > variables in the usual CMake sense. They are string replacements [...]". And > the example at the end of [2] seems to match your test perfectly. yes, but what puzzles me, is that I can’t print ${ARGN} in the macro (but in the function) but I can loop over it. That seems to be somehow strange to me. Anyhow, thanks a lot and as long as this behavior is defined and (most likely) stays this way, I can work with it :-) regards, Torsten signature.asc Description: Message signed with OpenPGP -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] How is ARGN passed to a macro
Hi, I’ve stumbled over following behavior and now I’m searching for the rules, that explains that behavior: test.cmake: macro(check_argn) message("in macro check_argn ARGN: ${ARGN}") if(ARGN) foreach(item IN LISTS ARGN) message("ARG: ${item}") endforeach(item) message("ARGN: ${ARGN}") endif() endmacro() function(f1 a) message("in function ARGN: ${ARGN}") check_argn() endfunction() f1(1) f1(1 2) This will yield the following output: $ cmake -P ./test.cmake in function ARGN: in macro check_argn ARGN: in function ARGN: 2 in macro check_argn ARGN: ARG: 2 ARGN: I would expect ARGN to behave exactly the same in the macro, as in the function, but apparently there is a difference. Can someone of you explain that to me? TIA and kind regards, Torsten -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] dependencies of cross compiliations
> Am 09.11.2018 um 15:55 schrieb Miller Henry : > > There are two options. Each with pros and cons. > > The first what you are doing now, except you use external project > https://cmake.org/cmake/help/v3.12/module/ExternalProject.html to build the > host tools instead of add_custom_command. It otherwise has all the cons you > mention, but are they significant (this is a question that is different for > each project)? Going back to the manual build for host before the target > isn’t bad, though it is harder to teach. I think for the example use case, this will work best. Especially, if there are source files (for example constants) are shared among both platforms. Thanks, Torsten -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] dependencies of cross compiliations
Hi, I hope this question was not asked before. I work in the embedded field and there it is usually to have at least two different build platforms. The Host platform, where unit tests are build (and where CMake is running) and an embedded Target platform, where targets are build with a cross compiler. Sometimes such a system comes with self-written tools that are build and run on the Host platform to build a target for the embedded Target platform (adding meta data to a binary to be used by a bootloader for example). Usually I have two different build folders, one for the Host platform and one for the Target platform, using different calls to cmake to choose from a set of tools and targets. But when using this approach, it is necessary that the Host platform build ran before the Target platform build, so that tools that are required for the Target platform are build during the Host target build. One solution I’ve came up with, is to build the required tools during the Target platform build, using an add_custom_target() to invoke the Target compiler directly. This works fine, as long as the tools are basically build just out of a couple of files. What would be the „CMake-Way“ to add the tools (that have to be build on the Target platform) as dependency to targets that have to be build for the Target (cross compile) platform? Kind regards and thanks in advance, Torsten -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] How to install Python3 package?
Hallöchen! I have a very simple Python 3 package that I want to install in the Python path with CMake. For example on Ubuntu, I'd like to install it in /usr/lib/python3/dist-packages. Anyway, assuming the Python module is in mypackage/mymodule.py, the lines from mypackage import mymodule must work fine after the installation. I could execute python3 -c import site; print(site.getsitepackages()[0]) and store the result in a CMake variable, but is this the way to go? I have also found http://bloerg.net/2012/11/10/cmake-and-distutils.html but it is awkward IMO. Tschö, Torsten. -- Torsten BrongerJabber ID: torsten.bron...@jabber.rwth-aachen.de -- 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] CMake 2.8.1 / Win: Neither if nor else?`
Hi -- At the risk of asking a stupid question: I seem to have a situation where CMake (2.8.1 on Windows XP) completely ignore an IF .. ELSE .. ENDIF construct and basically does neither the IF nor the ELSE branch. My CMakeLists.txt is as follows: CMAKE_MINIMUM_REQUIRED(VERSION 2.6) FIND_PACKAGE(ZLIB) IF(ZLIB_FOUND) MESSAGE( WARNING HAVE system zlib ) ELSEIF(ZLIB_FOUND) MESSAGE( WARNING NO system zlib ) ENDIF(ZLIB_FOUND) Now I would think that I should see wither the HAVE or the NO message in the config stage output, on Windows more likely the NO message of course. Instead, what I get is this: Check for working C compiler using: Visual Studio 10 Check for working C compiler using: Visual Studio 10 -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working CXX compiler using: Visual Studio 10 Check for working CXX compiler using: Visual Studio 10 -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Could NOT find ZLIB (missing: ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS) Configuring done Can someone explain to me what I am missing? Thanks! Torsten -- Torsten Rohlfing, PhD SRI International, Neuroscience Program Senior Research Scientist 333 Ravenswood Ave, Menlo Park, CA 94025 Phone: ++1 (650) 859-3379 Fax: ++1 (650) 859-2743 tors...@synapse.sri.comhttp://www.stanford.edu/~rohlfing/ Though this be madness, yet there is a method in't ___ 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] Problem with ASM and COMPILE_DEFINITIONS
Hello Marcel, you've stumpled on a bug in CMake http://www.cmake.org/Bug/view.php?id=8107, which has been fixed in CMake 2.6.4. Best regards, Torsten Marcel Loose schrieb: Hi all, I have a problem compiling assembly files. I followed the directions on the Wiki http://www.cmake.org/Wiki/CMake/Assembler to create the required CMake files. I get compilation errors, because CMake passes -Ddef definitions to the assembler, but the assembler doesn't accept preprocessor definitions. These definitions were set a number of directory levels higher, using add_definitions(). How can I avoid that these definitions are put on the command line to the assembler? Here is a simple example CMakeLists.txt file that exhibits the same behavior. $ cat ../CMakeLists.txt project(MyProject) cmake_minimum_required(VERSION 2.6) add_definitions(-DMYDEF -DMYOTHERDEF) enable_language(ASM-ATT) add_executable(myexec myexec.S) $ cmake .. -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Found assembler: /usr/bin/as -- Loaded CMakeASM-ATTInformation - ASM-ATT support is still experimental, please report issues -- Configuring done -- Generating done -- Build files have been written to: /tmp/loose/LOFAR/build $ make VERBOSE=1 /usr/bin/cmake -H/tmp/loose/LOFAR -B/tmp/loose/LOFAR/build --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /tmp/loose/LOFAR/build/CMakeFiles /tmp/loose/LOFAR/build/CMakeFiles/progress.make make -f CMakeFiles/Makefile2 all make[1]: Entering directory `/tmp/loose/LOFAR/build' make -f CMakeFiles/myexec.dir/build.make CMakeFiles/myexec.dir/depend make[2]: Entering directory `/tmp/loose/LOFAR/build' cd /tmp/loose/LOFAR/build /usr/bin/cmake -E cmake_depends Unix Makefiles /tmp/loose/LOFAR /tmp/loose/LOFAR /tmp/loose/LOFAR/build /tmp/loose/LOFAR/build /tmp/loose/LOFAR/build/CMakeFiles/myexec.dir/DependInfo.cmake --color= Dependee /tmp/loose/LOFAR/build/CMakeFiles/myexec.dir/DependInfo.cmake is newer than depender /tmp/loose/LOFAR/build/CMakeFiles/myexec.dir/depend.internal. Scanning dependencies of target myexec make[2]: Leaving directory `/tmp/loose/LOFAR/build' make -f CMakeFiles/myexec.dir/build.make CMakeFiles/myexec.dir/build make[2]: Entering directory `/tmp/loose/LOFAR/build' /usr/bin/cmake -E cmake_progress_report /tmp/loose/LOFAR/build/CMakeFiles 1 [100%] Building ASM-ATT object CMakeFiles/myexec.dir/myexec.S.o /usr/bin/as -DMYDEF -DMYOTHERDEF -o CMakeFiles/myexec.dir/myexec.S.o /tmp/loose/LOFAR/myexec.S /usr/bin/as: unrecognized option '-YDEF' make[2]: *** [CMakeFiles/myexec.dir/myexec.S.o] Error 1 make[2]: Leaving directory `/tmp/loose/LOFAR/build' make[1]: *** [CMakeFiles/myexec.dir/all] Error 2 make[1]: Leaving directory `/tmp/loose/LOFAR/build' make: *** [all] Error 2 Best regards, Marcel Loose. ___ 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 ___ 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] CPack NSIS no branding image
Torsten Grote said the following on 06/08/2008 03:47 PM: Other suggestions are welcome. I would also like to know, if you can reproduce this error. Is nobody using CPack to create NSIS installers? Greets, Torsten ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPack NSIS no branding image
David Cole said the following on 06/02/2008 05:46 PM: Try: SET(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}test.bmp) There is a bug in the NSIS installer that refuses to extract the file name properly when there are only / forward slashes in the file name... Thank you very much for your response. Unfortunately, I tried that already and it didn't help. Also if I change the filename to something nonexistent, I get a different error (no files found). Other suggestions are welcome. I would also like to know, if you can reproduce this error. HTH, David Greets, Torsten ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] CPack NSIS no branding image
Hi all, it seems impossible to build a NSIS installer using CMake. I tried v2.6.0 and the latest CVS version. After a make package I get a CPack Error. The log file NSISOutput.log gives me: [snip] !insertmacro: MUI_LANGUAGE Error: no branding image found in chosen UI! Error in macro MUI_HEADERIMAGE_INIT on macroline 27 Error in macro MUI_GUIINIT on macroline 3 Error in macro MUI_FUNCTION_GUIINIT on macroline 4 Error in macro MUI_INSERT on macroline 11 Error in macro MUI_LANGUAGE on macroline 7 Error in script /home/xyz/tmp/cmake/build/_CPack_Packages/win32/NSIS/project.nsi on line 438 -- aborting creation process [/snip] I am on a 64bit GNU/Linux, crosscompiling my project for Windows with mingw32. I managed to reproduce the error with a minimal(! enough to trigger the error) test project. The CMakeLists.txt file follows. ADD_EXECUTABLE(hello wintest.c) INCLUDE(InstallRequiredSystemLibraries) SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY My funky project) SET(CPACK_PACKAGE_VENDOR Me, myself, and I) SET(CPACK_PACKAGE_VERSION_MAJOR 1) SET(CPACK_PACKAGE_VERSION_MINOR 3) SET(CPACK_PACKAGE_VERSION_PATCH 2) SET(CPACK_PACKAGE_INSTALL_DIRECTORY CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}) IF(WIN32 AND NOT UNIX) SET(CPACK_GENERATOR NSIS) SET(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/test.bmp) ENDIF(WIN32 AND NOT UNIX) INCLUDE(CPack) The image test.bmp exists and is a Windows bmp file. I checked the wiki and the sparse documentation, but was unable to find any clue. If you have any ideas, please let me now! Thanks and Regards, Torsten ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] VS makefiles
Steven Van Ingelgem wrote: Hi, I was wondering why there are no VS makefiles? (run like nmake -f project.mak). You want the NMake Makefiles generator. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] RE: Adding Custom Build Types
Search the mailing list archives. This was discussed some weeks ago. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Malhotra, Anupam Sent: 15 January 2008 06:37 To: cmake@cmake.org Subject: [CMake] Adding Custom Build Types Hi I have a requirement in which I need to have custom build types in my project. CMake provides the below mentioned build types by default: Debug Release RelWithDebInfo MinSizeRel Now In my project I don't want these build types. I want custom build types like MD, MT, MDd, MTd, ML etc (for Visual Studio 6 and Visual Studio 8 2005 both). These build types are required to set the appropriate runtime library. Is there any provision in CMake through which this can be achieved? This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] MSVC turn off RelWithDebInfo and MinSizeRel
Actually, I always use the command line. So I haven't tried it from the GUI. From: Jesse Corrington [mailto:[EMAIL PROTECTED] Sent: 21 December 2007 20:06 To: Torsten Martinsen Cc: David Cole; cmake@cmake.org Subject: Re: [CMake] MSVC turn off RelWithDebInfo and MinSizeRel The force set seemed to work when running the cmake GUI on windows, but didn't seem to work when running the command line cmake.exe, which is the way I need to do the generation. Jesse On Dec 20, 2007 11:35 PM, Torsten Martinsen [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] wrote: David Cole mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED] wrote: I will see if I can find / figure out what I did to make this work -- I know I've done it before to eliminate all but one config type... How about this in the CMakeLists.txt file instead? (Force it into the cache rather than using a simple set.) SET(CMAKE_CONFIGURATION_TYPES Debug;Release CACHE STRING limited configs FORCE) FWIW, this seems to work for me. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.orgmailto:CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] MSVC turn off RelWithDebInfo and MinSizeRel
Unfortunately, this does not work. I just tried adding SET(CMAKE_CONFIGURATION_TYPES Debug;RelWithDebInfo) at the top of my CMakeLists.txt, then deleted my build tree and ran cmake. The generated project files still contain Debug, Release, MinSizeRel and RelWithDebInfo. -Torsten From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Cole Sent: 20 December 2007 01:32 To: Jesse Corrington Cc: cmake@cmake.org Subject: Re: [CMake] MSVC turn off RelWithDebInfo and MinSizeRel SET(CMAKE_CONFIGURATION_TYPES Debug;Release) in your CMakeLists.txt. (Or just edit that value in CMakeSetup to change it in the cache.) If you do it with a simple set in the CMakeLists.txt then you will not see that reflected in the CMakeSetup GUI, but it will be in effect at generation time and you should end up with sln/vcproj files with just the two types. HTH, David On 12/19/07, Jesse Corrington [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] wrote: Is there anyway to have CMake not generate these two configurations, and just generate the standard release and debug configurations instead? Thanks. This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Compilation speed with CMake/NMake combination, making it faster?
* We're using an NMake build tree, is NMake particularly slow? Do any of the other makes work more efficiently? Be aware that nmake builds are much slower than using devenv, as nmake starts a cl.exe process for every single file, whereas devenv calls cl.exe with several source files. This costs, due to the high process overhead on Windows. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] cmake 2.4.8 RC 4
Bill Hoffman mailto:[EMAIL PROTECTED] wrote: Torsten Martinsen wrote: Could we please get the patch for bug 3218 into this release? I am not sure. The last time I applied that patch or a similar one lots of tests failed and there was trouble so I had to undo it. I don't think it is stable enough for 2.4.8 which is meant to be a minor bug fix on 2.4.7. I can say that that fix should be in 2.6. Can you tell me what kind of tests failed? I have a team using the patched version, and we have found no problems so far. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] cross compiling
The CVS version does, yes. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josef Karthauser Sent: 30 November 2007 09:54 To: Jesse Corrington; Salvatore Iovene Cc: cmake@cmake.org; [EMAIL PROTECTED] Subject: RE: [CMake] cross compiling Did I miss something? Does cmake support cross compiling now? This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Choosing between debug and release variants of third-party libraries
Bill Hoffman mailto:[EMAIL PROTECTED] wrote: The module FindQt4.cmake handles debug and release qtmain already. See Modules/FindQt4.cmake and Modules/UseQt4.cmake for more information. Indeed, that module *defines* QT_QTCORE_LIBRARY_RELEASE, QT_QTCORE_LIBRARY_DEBUG, etc. But that does not solve the problem of how to *use* those variables in TARGET_LINK_LIBRARIES() without getting the 'It is impossible to order the linker search path in such a way that libraries specified as full paths will be picked by the linker' error. Am I doing something wrong, or is this a bug? -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Choosing between debug and release variants of third-party libraries
Philip Lowman mailto:[EMAIL PROTECTED] wrote: So you can't do something like this? FIND_LIBRARY(qtmain_release qtmain PATHS C:/lang/qt/3.3.4r/lib NO_DEFAULT_PATH) FIND_LIBRARY(qtmain_debug qtmain PATHS C:/lang/qt/3.3.4/lib NO_DEFAULT_PATH) # declare your targets. TARGET_LINK_LIBRARIES(foo release ${qtmain_release}) TARGET_LINK_LIBRARIES(food debug ${qtmain_debug}) If something like that doesn't work I would file a bug for sure. No, I cannot, because CMake still tells me It is impossible to order the linker search path in such a way that libraries specified as full paths will be picked by the linker. Directories and libraries involved are: Directory: c:/lang/Qt/3.3.4/lib contains: Library: C:/lang/qt/3.3.4r/lib/qtmain.lib Directory: c:/lang/qt/3.3.4/lib contains: Library: C:/lang/qt/3.3.4r/lib/qtmain.lib Directory: c:/lang/qt/3.3.4r/lib contains: Library: C:/lang/qt/3.3.4/lib/qtmain.lib -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Choosing between debug and release variants of third-party libraries
Philip Lowman mailto:[EMAIL PROTECTED] wrote: Torsten Martinsen wrote: I'm sure this is a FAQ, but I cannot find the answer anywhere. Using VS 2003, given that I have a third-party library with debug and release variants: /path/to/lib/release/lib.lib /path/to/lib/debug/lib.lib how do I get CMake to link with the correct variant? Using an absolute path in TARGET_LINK_LIBRARIES() does not work, and I cannot use CMAKE_BUILD_TYPE at configure time. # TARGET_LINK_LIBRARIES: Link a target to given libraries. TARGET_LINK_LIBRARIES(target library1 debug | optimized library2 ...) That's what I tried, but the third-party libraries are located outside my build tree, so I need to use absolute paths, which as I said does not work: It is impossible to order the linker search path in such a way that libraries specified as full paths will be picked by the linker. Directories and libraries involved are: Directory: c:/lang/Qt/3.3.4/lib contains: Library: c:\lang\qt\3.3.4r/lib/qtmain.lib Directory: c:/lang/qt/3.3.4r/lib contains: Library: C:\lang\Qt\3.3.4/lib/qtmain.lib -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] disabling the cache
Jesper Eskilson wrote: The first problem is that the Visual Studio generator fails to properly rerun CMake when CMakeLists.txt. It reruns CMake, but the modified projects files are not reloaded before continuing with the build. Unfortunately, there is no way of forcing Visual Studio to reload the project, and the automatic detection of whether the project file has changed only works sometimes. I find that an effective workaround is to invoke Alt-F T and then Alt-F J Enter :-) -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Adding a project to a solution.
Josef Karthauser wrote: Each project statement should map to a .sln file that contains any necessary .vcproj files. I've got that. However, the .sln file doesn't appear to reference the .vcproj files for objects specified in the target_link_libraries. I would expect these to get added too. That, unfortunately, doesn't happen with vanilla CMake 2.4.7. I have applied the patch from bug 3218: http://cmake.org/Bug/view.php?id=3218, and that makes it work for me. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Native Pathsupport under Windows
[EMAIL PROTECTED] wrote: I need to use under windows the buildin commands of the shell. But when I run these commands they doesn't work correctly, because the windows commands doen't like the slashes (/). It seems to me that they want to get backslashes (\). 1. Is there a possiblity to get backslashes instead of slashes as paths? FILE(TO_NATIVE_PATH ...) -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Adding .pdb files to CPack (Visual Studio 7 generator)
Torsten Martinsen wrote: Hendrik Sattler wrote: Did you try using the LOCATION property of the TARGET stripping the extension and using that? Not until now, but: The LOCATION property expands to e.g. C:/user/gh/ais/impl/build/cmake/vc7/ca/$(OutDir)/ca.exe, so that is also no good. For future reference, I ended up with this solution: # First, build the full name of the EXE. INSTALL(CODE SET(PDB_FULL_PATH ${CMAKE_CURRENT_BINARY_DIR}/\${${project}_BUILD_NAME_\${CMAKE_INSTALL_CO NFIG_NAME}})) # Then, replace .exe with .pdb. INSTALL(CODE STRING(REPLACE .exe .pdb PDB_FULL_PATH \${PDB_FULL_PATH})) # Finally, get it installed. INSTALL(CODE FILE(INSTALL DESTINATION \\${CMAKE_INSTALL_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}\ TYPE EXECUTABLE FILES \${PDB_FULL_PATH})) The trick is to postpone evaluation of the CPack variables until CPack runs. Not pretty, but it works. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Running unit test executable
Torsten Martinsen wrote: I am trying to get CMake to run my CppUnit tests automatically after building from within Visual Studio .NET 2003. Update: I tried with the latest snapshot (cmake version 2.5-20071009) as well as with the NMake configuration, but it still looks as if CMake ignores my ADD_CUSTOM_COMMAND(). -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Running unit test executable
I am trying to get CMake to run my CppUnit tests automatically after building from within Visual Studio .NET 2003. Looking at http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_generate_an_executable.2C_t hen_use_the_executable_to_generate_a_file.3F, I thought this would do the trick (the example is simplified and would not actually compile, but never mind that): PROJECT(tcsv) SET(CPP_SOURCE tcsvreader.cpp tcsvwriter.cpp tcsvreadermeta.cpp ) ADD_EXECUTABLE(tcsv ${CPP_SOURCE}) GET_TARGET_PROPERTY(TEST_EXE tcsv LOCATION) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/phony.txt COMMAND ${TEST_EXE} DEPENDS tcsv) Given this CMakeLists.txt, I would expect the generated .vcproj file to have a Post-Build Event that runs tcvs.exe. No such event is generated, however. Any pointers? -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Compiling without linking
Baptiste Derongs wrote: The point is that I want a MakeFile that creates only the .o file, doesnt try to get binary. Next that same Makefile (and other ones) need the .o file to make other binaries. Instead of focussing on how to do this small step, you should probably explain what it is you are trying to do, i.e. why you think that you need to explicitly split up the steps of compiling and linking. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Compiling without linking
Baptiste Derongs wrote: Actually I have a file that contains a lot of functions, call this file global.c. Next I have multiple files, call them f1.c, f2.c, ... And each f*.c has to be compiled with global.c. Make a static library containing global.c, then link each application to it. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Building both make files and visual studio files.
Josef Karthauser wrote: Hello again, I'm wondering what the best way to going about producing make files and visual studio files at the same time is. I want to use nmake to build my tree, but want visual studio project files so that the developers can continue to with within the visual studio environment, which would call the make as an external build tool. I would recommend to set up CMake to generate .vcproj files, and use those both for the IDE and for command-line builds (using vcbuild.exe or devenv.exe). -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Confikgurations and Platforms in Visual Studio 8
Josef Karthauser wrote: I'm looking at cmake as a potential solution to some build problems I'm having. Am I right in thinking that cmake only allows for four hard-coded configuration labels, DEBUG/RELEASE/etc? Where should I look to add to these, as we've got more configurations than this. http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_extend_the_build_modes_wit h_a_custom_made_one_.3F Also, does cmake have an idea of platforms, or does it assume Win32? CMake does not assume anything about Win32 or any other platform. -Torsten ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Adding .pdb files to CPack (Visual Studio 7 generator)
In a macro, I succesfully use INSTALL( TARGETS ${project} RUNTIME DESTINATION bin) to add my .exe file to the list of files included by CPack. I also want the .pdb file, so I tried INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${project}.pdb RUNTIME DESTINATION bin) This, unfortunately, gives the error FILE INSTALL cannot find file C:/user/gh/ais/impl/build/cmake/vc7/ca/$(OutDir)/ca.pdb to install. Note that ${CMAKE_CFG_INTDIR} expands to $(OutDir) instead of e.g. Debug as I had hoped. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] CPack
Hendrik Sattler wrote: Zitat von [EMAIL PROTECTED]: I want to use the CPACK generator, but the tutorial http://www.cmake.org/Wiki/CMake:Packaging_With_CPack is not quite good. Perhaps somebody knows a better site. When I run make with make package, then I get following error: CPack Error: Cannot find a sutable ZIP program - an I is missing in suitable ;) CPack Error: Cannot initialize the generator CMake-2.4.7 wants either WinZip or Info-Zip[1]. Since the latter is free, I use that. What is not immediately obvious is that 2.4.7 *requires* zip.exe to reside in c:/cygwin/bin. (Bad luck if you do not have a C: drive). -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Visual Studio reload projects
Manuel Klimek wrote: On 8/30/07, Torsten Martinsen [EMAIL PROTECTED] wrote: I, too, use Emacs. However, do not be oblivious to the fact that an nmake build can take around five times longer than an IDE build. why do you use nmake and not msbuild if you do a command line build? msbuild uses the same mechanism the IDE uses, but without the IDE (it's a command line tool). It's basically an xml based make-replacement, and you can easily open your projects in the IDE if you need to, for example for debugging... Pardon me if I am wrong, but AFAICT MSBuild uses its own project file format, and not .vcproj files. This would make it pretty hard to use with CMake... Are you perhaps thinking of vcbuild? -Torsten ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Visual Studio reload projects
gga wrote: KSpam wrote: I agree that this is a Visual Studio issue; however, I am wondering if anyone knows a workaround. I am not a Windows developer, but I figured that someone on this list would have found a reasonable solution. Sure. Don't use Visual Studio. Stick to nmake and a good editor like emacs. You'll be a happier person in the long run. I, too, use Emacs. However, do not be oblivious to the fact that an nmake build can take around five times longer than an IDE build. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: RE: [CMake] Location of ui and moc generated files (qt)
Maik Keller mailto:[EMAIL PROTECTED] wrote: Thanks Torsten. I just tested it, and it seems to work with CMAKE_CURRENT_SOURCE_DIR. Would it be possible to provide me with your implementation of the AIS_MOC macro as well? Here it is: # Run Qt MOC on a C++ header file. # Arguments: #1-N Names of headerfiles MACRO(AIS_MOC) FOREACH (it ${ARGN}) # Make .h filename absolute GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE) # Build x_moc.cpp filename GET_FILENAME_COMPONENT(outfile ${it} NAME_WE) SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/${outfile}_moc.cpp) # Run MOC ADD_CUSTOM_COMMAND(OUTPUT ${outfile} COMMAND ${QT_MOC_EXECUTABLE} ARGS ${infile} -o ${outfile} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${infile} COMMENT MOCing ${it}) LIST(APPEND CPP_SOURCE ${outfile}) LIST(APPEND AIS_MOC_SOURCES ${outfile}) ENDFOREACH(it) ENDMACRO(AIS_MOC) This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Visual Studio solutions
I wrote: when I use the Visual Studio 7 .NET 2003 generator, CMake generates one .vcproj file for each library/application, and one .sln file that contains all the .vcproj files, with appropriate dependencies. So far so good. What I would like in addition is a .sln file for each application, so that a developer working on that application does not have to load the full solution file. Is this possible? Well, it turned out that the reason was simply that I did not have a PROJECT statement in each application's CMakeLists.txt (as Brandon pointed out). With the PROJECT statement, the desired number of .sln files is generated - however, the generated dependencies are not correct. Manuel Klimek let me know that he had implemented a patch to fix this (http://www.cmake.org/Bug/view.php?id=3218). I have updated the patch for 2.4.7, and I am now deploying the patched version to my group. I hope this patch will be included in the next version. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Post Build Custom Copy Command
Prashanth Udupa wrote: Since copy does not accept file names of the form D:/SomeFolder/SomOtherFolder/ and only of the form D:\SomeFolder\SomOtherFolder\, the copy command is failing. How can I make this post build command work? Use COMMAND ${CMAKE_COMMAND} -E copy ${MYLIBRARY_SOURCE_DIR}/lib/release/mylib.dll ${MYLIBRARY_SOURCE_DIR}/bin/release -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Get Windows Registry Key!!!! Doesn't work!!!
Berardino la Torre wrote: I'm trying to read an installation path from the windows registry: SET(FBXSDK_ROOT_PATH [HKEY_LOCAL_MACHINE\\SOFTWARE\\FBX\\File SDK 2006.11.1;Install_Dir] CACHE PATH FBX) Where did you see documented that this is supposed to work? -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Visual Studio solutions
Hi, when I use the Visual Studio 7 .NET 2003 generator, CMake generates one .vcproj file for each library/application, and one .sln file that contains all the .vcproj files, with appropriate dependencies. So far so good. What I would like in addition is a .sln file for each application, so that a developer working on that application does not have to load the full solution file. Is this possible? -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Visual Studio solutions
Sylvain Benner mailto:[EMAIL PROTECTED] wrote: Torsten Martinsen a écrit : Hi, when I use the Visual Studio 7 .NET 2003 generator, CMake generates one .vcproj file for each library/application, and one .sln file that contains all the .vcproj files, with appropriate dependencies. So far so good. What I would like in addition is a .sln file for each application, so that a developer working on that application does not have to load the full solution file. Is this possible? Hello, As far as i know, CMake generates a global solution AND a solution per project (added with ADD_SUBDIRECTORY). Not for me, it doesn't. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] Visual Studio folders
On 7/24/07, Brandon Van Every wrote: How can I emulate Add folder MSVS functionality with CMake? I want to be able to add a folder without adding another executable or anything like that. Are you looking for something that shows up in the MSVS Solution Explorer? Perhaps you want the SOURCE_GROUP command. On a related note, is it possible to use variables as an argument to the SOURCE_GROUP command? I.e. something like SOURCE_GROUP(Generated Header Files FILES ${UIC_HEADERS} ) -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] VC7.1 project files and /TP
Hi, I have a library that contains both C++ and C files. For various reasons, the C files must be compiled as C++. In my CMakeLists.txt file I have IF(OPT_DEST_VISUALSTUDIO) ADD_DEFINITIONS(-TP) ENDIF(OPT_DEST_VISUALSTUDIO) This works fine for NMake Makefiles output, but for Visual Studio 7 .NET 2003 the C files are always compiled with /TP (and in the project file, Compile As is set to Compile as C Code (/TC). Looking at cmLocalVisualStudio7Generator.cxx, it looks as if this is indeed hardcoded: if(strcmp(linkLanguage, C) == 0) { flags += /TC ; } if(strcmp(linkLanguage, CXX) == 0) { flags += /TP ; } I have also tried SET_SOURCE_FILES_PROPERTIES( ${C_SOURCE} PROPERTIES COMPILE_FLAGS -TP) with the same (lack of) result. Any ideas? -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] VC7.1 project files and /TP
Bill Hoffman mailto:[EMAIL PROTECTED] wrote: SET_SOURCE_FILES_PROPERTIES( ${C_SOURCE} PROPERTIES LANGUAGE CXX) It should work in 2.4.7, but the docs for 2.4.7 have not been updated to include this, but the code has it. Thanks, that seems to work perfectly. -Torsten This e-mail and any files sent with it contain information that may be privileged or confidential and is the property of the GateHouse Group. This information is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use the message or any part thereof. If you have received this e-mail in error, please notify the sender immediately, and delete all copies of this message. In accordance with GateHouse Security Policy, e-mails sent or received may be monitored. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake