Re: [CMake] Can I use a *Targets-someName.cmake file to get access to _IMPORT_PREFIX ?
TL;DR: - For a project thing I get thingTargets.cmake when I install EXPORT it - thingTargets.cmake sets _IMPORT_PREFIX - thingTargets.cmake loads files thingTargets-*.cmake Can I create and install thingTargets-someName.cmake which uses _IMPORT_PREFIX to "hook" into above mechanism? Or is this likely to break / change in the future? Longer version: I really like that you can use the exported targets of cmake even when still in a staging directory and not installed. Example: # in thing project mkdir thing-build; cd thing-build cmake .. -DCMAKE_INSTALL_PREFIX="" make # creates /path/to/staging/lib/cmake/thing/lib{Config,Targets}.cmake and friends make install DESTDIR=/path/to/staging # in user project mkdir user-build cmake .. -Dthing_DIR=/path/to/staging/lib/cmake/thing make # correctly uses libraries and headers from /path/to/staging/ Looking at /path/to/staging/lib/cmake/thing/libTargets.cmake I can see that it calculates an _IMPORT_PREFIX variable (in this case to /path/to/staging/ while not yet installed). Also it loads files named libTargets-*.cmake (of which there's only one for me, namely libTargets-noconfig.cmake). Can I install a file libTargets-someName.cmake? In this file I'd have access to the _IMPORT_PREFIX variable to e.g. set paths: target_link_options(thing::lib INTERFACE -T ${_IMPORT_PREFIX}/share/link.ld) Larger example at https://github.com/musteresel/cmake-multiple-example-research Best, Daniel -- 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] Problems with cross compile for android
Hello, i have some problems with cross compile for android. i need to build libssh for android. If i run CMake like: cmake .. -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_STANDALONE_TOOLCHAIN=/home/da/Android/standalone-toolchain-4.9 -DCMAKE_SYSTEM_VERSION=21 i get the following error: -mtune=xscale -funwind-tables -no-canonical-prefixes -g -fPIE -pie -Wl,--gc-sections -Wl,-z,nocopyreloc CMakeFiles/cmTC_88c04.dir/testCCompiler.c.o -o cmTC_88c04 /home/da/Android/standalone-toolchain-4.9/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory /home/da/Android/standalone-toolchain-4.9/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_android.o: No such file or directory external/jemalloc/src/jemalloc.c:1422: error: undefined reference to 'pthread_atfork' external/jemalloc/src/jemalloc.c:1422: error: undefined reference to 'pthread_atfork' external/jemalloc/src/jemalloc.c:1422: error: undefined reference to 'pthread_atfork' external/jemalloc/src/jemalloc.c:1422: error: undefined reference to 'pthread_atfork' external/jemalloc/src/jemalloc.c:1358: error: undefined reference to 'atexit' clang80: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [CMakeFiles/cmTC_88c04.dir/build.make:87: cmTC_88c04] Error 1 make[1]: Leaving directory '/home/da/Downloads/libssh-0.7.4/build/CMakeFiles/CMakeTmp' make: *** [Makefile:121: cmTC_88c04/fast] Error 2 if i run cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Android -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake -DANDROID_STL_TYPE=gnustl_static -DCMAKE_SYSTEM_VERSION=21 -DANDROID_TOOLCHAIN=clang -DANDROID_PLATFORM=android-21 -DANDROID_ABI=arm64-v8a i get the following message: -- Performing Test HAVE_COMPILER__FUNCTION__ - Failed -- Check if the system is big endian -- Searching 16 bit integer -- Looking for sys/types.h -- Looking for sys/types.h - not found -- Looking for stdint.h -- Looking for stdint.h - not found -- Looking for stddef.h -- Looking for stddef.h - not found -- Check size of unsigned short -- Check size of unsigned short - failed -- Check size of unsigned int -- Check size of unsigned int - failed -- Check size of unsigned long -- Check size of unsigned long - failed CMake Error at /usr/share/cmake-3.13/Modules/TestBigEndian.cmake:49 (message): no suitable type found Call Stack (most recent call first): ConfigureChecks.cmake:271 (test_big_endian) CMakeLists.txt:80 (include) looks like that he doesnt find any header file. Whats the best way to cross compile under linux for android? Thanks for any suggestions. Regards Daniel -- 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] Android Cross Compilation with Xamarin
Hi All! Wwe would like to set up a Android cross compilation project for Visual Studio using the Xamarin Framework. Could you please give us a few hints on what would be the best approach to achieve this? Another question is, why the NVidia Tegra Plugin is mandatory for Visual Studio and no self-provided NDK/Toolchain is supported when it comes to Visual Studio and Android development? Thank you very much! Kind Regards Daniel Wynne -- This e-mail was sent from a contact form on CMake (https://cmake.org) -- 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] Why do we need NVIDIA Nsight Tegrato create Visual Studio Android Projects?
A simple yes or no would be sufficient. Am 3/12/19 um 2:18 PM schrieb Daniel Wynne: We would like to use Xamarin for our x-platform app-development with VS. Is any support for Xamarin planned in the near future? Am 11.03.2019 um 15:30 schrieb Daniel Wynne: Hi All! Short question: why do we need NVIDIA Nsight Tegra to setup a Visual Studio Android project? Despite of it being a helpful tool, the necessity for it to create the project file is unclear to me. Could you please enlighten me? Kind Regards Daniel -- MOBOTIX AG • BeyondHumanVision • www.mobotix.com Daniel Wynne Tel. +49 (0) 6302 9816-4124 Fax +49 (0) 6302 9816-190 Kaiserstrasse • 67722 Langmeil • Germany Vorstandsvorsitzender: Thomas Lausten Vorstandsmitglieder: Klaus Kiener, Hartmut Sprave Aufsichtsratsvorsitzender: Yuji Ichimura Registergericht: HRB Kaiserslautern 3724 -- 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] Why do we need NVIDIA Nsight Tegrato create Visual Studio Android Projects?
We would like to use Xamarin for our x-platform app-development with VS. Is any support for that planned in the near future? Am 11.03.2019 um 15:30 schrieb Daniel Wynne: Hi All! Short question: why do we need NVIDIA Nsight Tegra to setup a Visual Studio Android project? Despite of it being a helpful tool, the necessity for it to create the project file is unclear to me. Could you please enlighten me? Kind Regards Daniel -- 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] Why do we need NVIDIA Nsight Tegrato create Visual Studio Android Projects?
Hi All! Short question: why do we need NVIDIA Nsight Tegra to setup a Visual Studio Android project? Despite of it being a helpful tool, the necessity for it to create the project file is unclear to me. Could you please enlighten me? Kind Regards Daniel -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] How to link in different prebuilt objects based on configuration
I did eventually find a solution where I set up an imported target with IMPORTED_LOCATION and IMPORTED_LOCATION_DEBUG properties pointing to the object files, and then linked in that target with target_link_libraries(). I admit I wasn't completely sure if adding .obj/.o files to the link lines in this way would be well supported, though it did seem to work OK in practice in the generators I tested to cover what our customers and build systems use (Visual Studio, NMake Makefiles [JOM], Unix Makefiles for the Linux build, and Ninja on Linux). -- Daniel From: Robert Maynard [robert.mayn...@kitware.com] Sent: Tuesday, December 18, 2018 11:08 AM To: Daniel Schepler Cc: CMake MailingList Subject: Re: [CMake] How to link in different prebuilt objects based on configuration As far as I know this is a limitation of the MSVC project files, and CMake errors out on that generator rather than try and build an invalid project. Have you tried do something where you have the Config and Release objects as separate targets that always exist, but selectively conditionally to them based on the Config setting? On Thu, Dec 13, 2018 at 2:16 PM Daniel Schepler wrote: > > We have a build here where a large portion of our product is in source code > available to customers, but then there is a core which we only distribute as > prebuilt "private objects". However, then when we test the customer-type > build on Windows, we get an error like: > > --- > CMake Error in CMakeLists.txt: > Target "exata" has source files which vary by configuration. This is not > supported by the "Visual Studio 15 2017 Win64" generator. > > Config "Debug": > > E:/EXata_7_0/qualnet_dev_13_Dec18/kernel/obj/exata-main-windows-x64-vc14d.obj > > Config "Release": > > E:/EXata_7_0/qualnet_dev_13_Dec18/kernel/obj/exata-main-windows-x64-vc14.obj > --- > > (This object file is marked with source file property EXTERNAL_OBJECT=1.) > > Is this a limitation in Visual Studio projects, or a limitation in CMake? In > either case, what workaround could allow this build to support generating > Visual Studio projects? > -- > Daniel Schepler > -- > > 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 -- 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 link in different prebuilt objects based on configuration
We have a build here where a large portion of our product is in source code available to customers, but then there is a core which we only distribute as prebuilt "private objects". However, then when we test the customer-type build on Windows, we get an error like: --- CMake Error in CMakeLists.txt: Target "exata" has source files which vary by configuration. This is not supported by the "Visual Studio 15 2017 Win64" generator. Config "Debug": E:/EXata_7_0/qualnet_dev_13_Dec18/kernel/obj/exata-main-windows-x64-vc14d.obj Config "Release": E:/EXata_7_0/qualnet_dev_13_Dec18/kernel/obj/exata-main-windows-x64-vc14.obj --- (This object file is marked with source file property EXTERNAL_OBJECT=1.) Is this a limitation in Visual Studio projects, or a limitation in CMake? In either case, what workaround could allow this build to support generating Visual Studio projects? -- Daniel Schepler -- 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] Object libraries and relative paths in Ninja
Hi, For a simple test I've got the following directory structure: |- build |- project | |- CMakeLists.txt | |- Main.cpp |- CMakeLists.txt |- Test.cpp project/CMakeLists.txt has the following content: cmake_minimum_required(VERSION 3.12) project(Reproducer LANGUAGES CXX) add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/.." "${CMAKE_CURRENT_BINARY_DIR}/..") add_executable(Reproducer) target_sources(Reproducer PRIVATE Main.cpp) target_link_libraries(Reproducer PRIVATE ReproducerLibrary) And CMakeLists.txt has the following content: add_library(ReproducerLibrary OBJECT) target_sources(ReproducerLibrary PRIVATE Test.cpp) When I now run the commands: cd build cmake.exe -G Ninja ..\..\project cmake.exe --build . Then I get the error: ninja: error: '/ReproducerLibrary.dir/Test.cpp.obj', needed by 'Reproducer.exe', missing and no known rule to make it I noticed, that the build.ninja the build rule for Test.cpp.obj has a relative path, whereas the link dependency to Test.cpp.obj is an absolute path. Is this a known issue? Regards, Daniel -- 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] Specify extra files for display in IDE
Hi, I tried to add interface sources to interface libraries with both, the CMake 3.11.18040201-MSVC_2 integration of Visual Studio (with Ninja), which I’m using most of the time, and the “Visual Studio 15 2017 Win64” generator of CMake 3.12.1: - The Visual Studio integration shows the target in the “CMake Targets View”, but it contains only one file: CMakeLists.txt. There is no difference if I set header only interface sources or no sources. If this differs from the intended behavior of the CMake generators then I will follow this up with the Visual Studio team. - The Visual Studio generator doesn’t show interface libraries at all. Is this the intended behavior of the Visual Studio generator? Unclear to me is, what the semantics of header only interface sources are? Should headers be INTERFACE_SOURCES? I don’t see a point in propagating them to targets which link to the interface library. To my understanding this is what interface source means. Maybe there is more to it. When headers of the public interface of a library are supposed to be interface sources, then this means, that I should put headers of regular libraries in the PUBLIC section, right? Daniel From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Mittwoch, 5. September 2018 11:22 To: Daniel Eiband Cc: CMake Mailinglist Subject: Re: [CMake] Specify extra files for display in IDE Le mer. 5 sept. 2018 à 11:00, Daniel Eiband mailto:daniel.eib...@brainlab.com>> a écrit : Hi, I managed to solve the presentation of object libraries by renaming the targets and hiding certain targets in folders. I think this solution is acceptable. The issue with the display of header only libraries in IDEs, which are implemented as interface libraries, is still unsolved. The add_library() command doesn’t accept any sources. For an interface library you can add sources with target_sources(yourlib INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/whatever.h) You need the INTERFACE keyword though: https://cmake.org/cmake/help/latest/command/add_library.html#interface-libraries is this not working for you? Could you provide a strip-down archive which exhibit this issue I may try it on my side? Also setting the SOURCES property of an interface library target is rejected by CMake. This is because you can only populate INTERFACE_SOURCES on an INTERFACE target: https://cmake.org/cmake/help/latest/prop_tgt/INTERFACE_SOURCES.html https://cmake.org/cmake/help/latest/command/target_sources.html#command:target_sources I haven’t found any other way of adding the files to the interface library so that they are presented in the IDE. Like I said in a previous email on my side, interface library (INTERFACE) sources are displayed in vscode and qtcreator, may be the fact that they are not displayed by Visual Studio is a Visual Studio bug? By the way there is an old issue on this subject: https://gitlab.kitware.com/cmake/cmake/issues/15234 I know the workaround of adding an empty custom target. This is however not really satisfying, because Visual Studio for example displays them with a completely different icon and the suffix “(utility target)”. Doesn’t look like a C++ library any longer. It also sort of highlights the library because of the non-C++ icon and I have to hide even more targets (the real interface libraries). From a CMake interface perspective this is also an asymmetry: Why can I add arbitrary files to executable and static/shared library targets being displayed in IDEs without contributing to the build artifact while this is not possible for interface libraries? I think, the restriction on interface libraries should not be that they don’t have any source files. Interface libraries must not have source files which produce build artifacts. Agreed and I think it would more "natural" to be able to simply target_sources / add_library "as usual" and promote SOURCES to INTERFACE_SOURCES automatically since the target is an INTERFACE lib. Is this worth an enhancement bug or has this already been discussed? The only one I am aware of is this one: https://gitlab.kitware.com/cmake/cmake/issues/15234 -- Eric -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Specify extra files for display in IDE
Hi, I managed to solve the presentation of object libraries by renaming the targets and hiding certain targets in folders. I think this solution is acceptable. The issue with the display of header only libraries in IDEs, which are implemented as interface libraries, is still unsolved. The add_library() command doesn’t accept any sources. Also setting the SOURCES property of an interface library target is rejected by CMake. I haven’t found any other way of adding the files to the interface library so that they are presented in the IDE. I know the workaround of adding an empty custom target. This is however not really satisfying, because Visual Studio for example displays them with a completely different icon and the suffix “(utility target)”. Doesn’t look like a C++ library any longer. It also sort of highlights the library because of the non-C++ icon and I have to hide even more targets (the real interface libraries). From a CMake interface perspective this is also an asymmetry: Why can I add arbitrary files to executable and static/shared library targets being displayed in IDEs without contributing to the build artifact while this is not possible for interface libraries? I think, the restriction on interface libraries should not be that they don’t have any source files. Interface libraries must not have source files which produce build artifacts. Is this worth an enhancement bug or has this already been discussed? Daniel From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Daniel Eiband Sent: Donnerstag, 30. August 2018 15:47 To: Eric Noulard Cc: CMake Mailinglist Subject: Re: [CMake] Specify extra files for display in IDE Hi Eric, Thank you for your answers! Visual Studio supports the source_group command, but it cannot be used to add sources. It only controls where source files of targets are displayed. > I do very often add non source file (like README.md) to any targets This is what I also do for non-build related files such as readme files. It works except for interface libraries (read below). In the object library case I can add non-build related files, but for let's say 'logical' reasons I would like to show the build related files such as cpp files also in the shared library target which links to the object library. > At least the "never displayed" header only library looks like a bug of the > Visual Studio generator to me. The situation for interface libraries (header only) is different: CMake won't allow me to add any sources to the target, not even headers. As a result configure fails with an error. I'm pretty sure if I could add headers to interface libraries then they will show up in Visual Studio with this target. So I think it's not a generator bug, but a short-coming of CMake itself. Daniel From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Donnerstag, 30. August 2018 14:40 To: Daniel Eiband mailto:daniel.eib...@brainlab.com>> Cc: CMake Mailinglist mailto:cmake@cmake.org>> Subject: Re: [CMake] Specify extra files for display in IDE Le jeu. 30 août 2018 à 12:32, Daniel Eiband mailto:daniel.eib...@brainlab.com>> a écrit : Hi, I’m currently migrating a code base from a proprietary MSBuild based generator to CMake 3.11 which is shipped with Visual Studio. There are two aspects to this task: 1) Integration of custom build steps 2) Presentation in the IDE The first aspect of integrating all of our custom build steps as custom commands works really well. At one point I use an object library to be able to use the object files as input to such a custom tool and to link a shared library. Both the object library and the shared library are from the programmers perspective one logical unit. The object library is just an implementation detail. However, as for the second point, the source files are displayed with the object library target in the IDE while the shared library has no sources. This makes sense from the build targets point of view, but surprises the developers. My approach is to hide all targets which are sort of implementation detail into a folder. To make this work I would like to display the sources with the shared library which consumes the object files of the object library. Currently this seems to be impossible. Another inconsistency I noticed regarding the second point is the following: I implemented header only libraries as interface libraries in CMake. This works fine from the build perspective. Interface libraries however don’t allow me to list sources, not even headers. As a result, the headers of this header only library are not displayed anywhere in the IDE. This is odd, because in executable targets for example I can list all headers even if they don’t contribute to the build process directly and they are displayed in the IDE. Using empty custom targets to present the header files works, but they are not displayed as C++ libraries in Visual
Re: [CMake] Specify extra files for display in IDE
Hi Eric, Thank you for your answers! Visual Studio supports the source_group command, but it cannot be used to add sources. It only controls where source files of targets are displayed. > I do very often add non source file (like README.md) to any targets This is what I also do for non-build related files such as readme files. It works except for interface libraries (read below). In the object library case I can add non-build related files, but for let's say 'logical' reasons I would like to show the build related files such as cpp files also in the shared library target which links to the object library. > At least the "never displayed" header only library looks like a bug of the > Visual Studio generator to me. The situation for interface libraries (header only) is different: CMake won't allow me to add any sources to the target, not even headers. As a result configure fails with an error. I'm pretty sure if I could add headers to interface libraries then they will show up in Visual Studio with this target. So I think it's not a generator bug, but a short-coming of CMake itself. Daniel From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Donnerstag, 30. August 2018 14:40 To: Daniel Eiband Cc: CMake Mailinglist Subject: Re: [CMake] Specify extra files for display in IDE Le jeu. 30 août 2018 à 12:32, Daniel Eiband mailto:daniel.eib...@brainlab.com>> a écrit : Hi, I’m currently migrating a code base from a proprietary MSBuild based generator to CMake 3.11 which is shipped with Visual Studio. There are two aspects to this task: 1) Integration of custom build steps 2) Presentation in the IDE The first aspect of integrating all of our custom build steps as custom commands works really well. At one point I use an object library to be able to use the object files as input to such a custom tool and to link a shared library. Both the object library and the shared library are from the programmers perspective one logical unit. The object library is just an implementation detail. However, as for the second point, the source files are displayed with the object library target in the IDE while the shared library has no sources. This makes sense from the build targets point of view, but surprises the developers. My approach is to hide all targets which are sort of implementation detail into a folder. To make this work I would like to display the sources with the shared library which consumes the object files of the object library. Currently this seems to be impossible. Another inconsistency I noticed regarding the second point is the following: I implemented header only libraries as interface libraries in CMake. This works fine from the build perspective. Interface libraries however don’t allow me to list sources, not even headers. As a result, the headers of this header only library are not displayed anywhere in the IDE. This is odd, because in executable targets for example I can list all headers even if they don’t contribute to the build process directly and they are displayed in the IDE. Using empty custom targets to present the header files works, but they are not displayed as C++ libraries in Visual Studio any longer. This also litters the solution with lots of extra empty targets. I’m going to rephrase both described presentation problems into one more fundamental question, solutions or workarounds for either of both presentation problems are of course welcome: Can I specify sources used for builds and files used for display in IDEs separately? I think they are two different things. For my use case it would also be sufficient to be able to add extra files for display in IDEs to any target. I'm afraid that your question may be generator-specific and I'm no sure Visual Studio generator behaves in the same way as others I'm using. I do very often add non source file (like README.md) to any targets (add_executable, add_library, add_custom_target) in order to make them editable in the IDE. Since those file are guessed as not being compilable they inherit the HEADER_FILE_ONLY (https://cmake.org/cmake/help/v3.11/prop_sf/HEADER_FILE_ONLY.html) automatically and they show up in IDE just fine. My particular IDE being either qtcreator, vscode+cmaketools or eclipse and this works well for those. Moreover, in qtcreator (for example) header only libraries appear on their own with editable header file AND as subdir of every other targets their are used by. This subdir contains the headers. This is not the case with object libraries though :-( Concerning the visual grouping you must already being using source_group (https://cmake.org/cmake/help/latest/command/source_group.html) source_group does not seems to have any effect in my favorite IDEs... In the end I don't know if there is currently any ways to do what you want. At least the "never displayed" header only library looks like a bug of the Visua
[CMake] Specify extra files for display in IDE
Hi, I'm currently migrating a code base from a proprietary MSBuild based generator to CMake 3.11 which is shipped with Visual Studio. There are two aspects to this task: 1) Integration of custom build steps 2) Presentation in the IDE The first aspect of integrating all of our custom build steps as custom commands works really well. At one point I use an object library to be able to use the object files as input to such a custom tool and to link a shared library. Both the object library and the shared library are from the programmers perspective one logical unit. The object library is just an implementation detail. However, as for the second point, the source files are displayed with the object library target in the IDE while the shared library has no sources. This makes sense from the build targets point of view, but surprises the developers. My approach is to hide all targets which are sort of implementation detail into a folder. To make this work I would like to display the sources with the shared library which consumes the object files of the object library. Currently this seems to be impossible. Another inconsistency I noticed regarding the second point is the following: I implemented header only libraries as interface libraries in CMake. This works fine from the build perspective. Interface libraries however don't allow me to list sources, not even headers. As a result, the headers of this header only library are not displayed anywhere in the IDE. This is odd, because in executable targets for example I can list all headers even if they don't contribute to the build process directly and they are displayed in the IDE. Using empty custom targets to present the header files works, but they are not displayed as C++ libraries in Visual Studio any longer. This also litters the solution with lots of extra empty targets. I'm going to rephrase both described presentation problems into one more fundamental question, solutions or workarounds for either of both presentation problems are of course welcome: Can I specify sources used for builds and files used for display in IDEs separately? I think they are two different things. For my use case it would also be sufficient to be able to add extra files for display in IDEs to any target. Regards, Daniel -- 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] Link flags in CMAKE_CXX_CREATE_STATIC_LIBRARY
Hi Brad, Thanks a lot, works like a charm! Daniel -Original Message- From: Brad King [mailto:brad.k...@kitware.com] Sent: Donnerstag, 9. August 2018 15:21 To: Daniel Eiband ; cmake@cmake.org Subject: Re: [CMake] Link flags in CMAKE_CXX_CREATE_STATIC_LIBRARY On 08/07/2018 06:54 AM, Daniel Eiband wrote: > set_property(TARGET MyTarget APPEND PROPERTY LINK_FLAGS "/ignore:4221") > > This however doesn't affect the creation of static libraries. Static libraries are created by the librarian tool, not the linker. There is a separate STATIC_LIBRARY_FLAGS property for this: https://cmake.org/cmake/help/v3.12/prop_tgt/STATIC_LIBRARY_FLAGS.html -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[CMake] Link flags in CMAKE_CXX_CREATE_STATIC_LIBRARY
Hi, I'm using CMake on Windows with Ninja and MSVC inside Visual Studio. I'd like to suppress linker warning 4221. To do so I added the following linker flag: set_property(TARGET MyTarget APPEND PROPERTY LINK_FLAGS "/ignore:4221") This however doesn't affect the creation of static libraries. The only workaround I found is to manipulate the CMAKE_CXX_CREATE_STATIC_LIBRARY variable: string(REPLACE "" " /ignore:4221" CMAKE_CXX_CREATE_STATIC_LIBRARY "${CMAKE_CXX_CREATE_STATIC_LIBRARY}") Is there a nicer way to do this? Why are the link flags not passed to the static library creation or - if not possible - why are there no static library link flag properties? Regards, Daniel -- 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] Determine the directory to install package config and version files (like /usr/lib/cmake)
Is there a way to determine this directory? Right now I have something like: ${CMAKE_INSTALL_LIBDIR}/cmake//something-version.cmake On CentOS 7 w/cmake3, however, this should be /usr/lib/cmake3/... Obviously I can just check to see if this directory exists and then fall back, but I'm wondering if there is a bultin variable to retrieve this (I've looked, but no luck so far). -- 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] Copying Shared Libraries (DLLs) Next to the Executable
Personally, I find it much simpler just to expect the Path to include the locations of the DLL files as opposed to copying them. (And I often write small batch scripts to set up this development environment, and then optionally start cmake-gui.exe / devenv.exe / etc.) -- Daniel Schepler From: CMake [cmake-boun...@cmake.org] on behalf of Marek Vojtko (Firaxis) [marek.voj...@firaxis.com] Sent: Wednesday, February 21, 2018 7:20 PM To: cmake@cmake.org Subject: [CMake] Copying Shared Libraries (DLLs) Next to the Executable Hi, I need to copy external shared libraries (DLLs on Windows) next to the generated executable. Is calling "cmake -E copy_if_different" through a custom command added to the executable target still the best way to achieve this? CMake tracks include directories, compile definitions or options, link flags, etc. through its dependency system, but it doesn't provide an easy way to list / copy all shared libraries a target depends on? I am trying to follow the "new" CMake paradigms, using add_subdirectory(), set_target*() with PUBLIC/PRIVATE/INTERFACE scope, etc. to create a modular, re-usable setup, but that actively prevents me from using a custom command on the executable target. To wit: App depends on Lib. Lib depends on several third-party, pre-built DLLs and encapsulates the logic of when to depend on them. The third-party, pre-built shared libraries (DLLs) are located through custom Find*.cmake modules and used as IMPORTED targets. /CMakelists.txt /App /CMakelists.txt /Lib /CMakelists.txt /CMakelists.txt * set(CMAKE_MODULE_PATH "") project("DLLTest") add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/Lib") add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/App") /App/CMakelists.txt * add_executable(App WIN32 main.cpp) target_link_libraries(App PRIVATE Lib) /Lib/CMakelists.txt add_library(Lib STATIC lib.h lib.cpp) target_include_directories(Lib PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") if(Lib_NEEDS_DEPENDENCY) find_package(Dependency REQUIRED) target_link_libraries(Lib PUBLIC Dependency::Dependency) endif() FindDependency.cmake [snip] add_library(Dependency::Dependency SHARED IMPORTED) set_target_properties(Dependency::Dependency PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "inc" IMPORTED_IMPLIB "dependency.lib" IMPORTED_LOCATION "dependency.dll" ) In this setup, it is impossible to propagate a shared library (DLL) from Lib to App. This is because Lib and App have different BINARY_DIRs and Lib must create its target before App calls target_link_libraries(). That means that Lib does not know where App will generate its executable. If Lib is a SHARED target, I cannot set its RUNTIME_OUTPUT_DIRECTORY to be the same as App's. If Lib depends on IMPORTED targets (as is my case), I cannot create either a file(COPY) step, or an install(FILES) step, or even an add_custom_command() step in Lib to copy the shared library, because I don't know the destination. The only solution, it would seem, is to add a custom command to App's target, because then I know where to copy the shared libraries to. But that means that App now has to know it needs to copy a shared library from a "hidden" dependency of Lib. App also needs to know about every SHARED or IMPORTED target Lib depends on, not to mention duplicate the logic in Lib's CMakelists.txt that decided whether Lib depends on Dependency in the first place. I was looking into GetPrerequisites and FixupBundle, but both of those operate on an already existing executable and try to guess what shared libraries (DLLs) it might need. It feels silly to guess at something that CMake already knows (as the IMPORTED target sets the IMPORTED_IMPLIB and IMPORTED_LOCATION properties). Setting a common CMAKE_RUNTIME_OUTPUT_DIRECTORY for both App and Lib is problematic if I have multiple executables in my root CMakelists.txt and they depend on different versions of the shared libraries or I have other name clashes. Is there no automated way to get the list of shared libraries a target depends on? Thanks, Marek -- 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 -- Powered by www.kitware.com Please keep messages on-topi
Re: [CMake] CMake fixup_bundle for ubuntu 16.04
You would need to set the INSTALL_RPATH property of the targets to something like "$ORIGIN/../lib" . You might also need to add "-Wl,--disable-new-dtags" to the CMAKE_*_LINK_FLAGS variables - otherwise, the RPATH settings will only take effect for direct dependencies of the executables (and any plugins or shared libraries) you build but not for dependencies of these dependencies. (We also tend not to include copies of glibc or OpenGL libraries - for the former, that tends to have issues if there are any mismatches between the exact build of glibc included in the installer and the NSS modules from the system. For the latter, the OpenGL libraries vary too much between Mesa and the NVidia and AMD proprietary driver versions for any one of them to work on all systems.) -- Daniel Schepler From: CMake [cmake-boun...@cmake.org] on behalf of Waldo Valenzuela via CMake [cmake@cmake.org] Sent: Wednesday, December 13, 2017 11:15 AM To: Miklos Espak Cc: cmake@cmake.org Subject: Re: [CMake] CMake fixup_bundle for ubuntu 16.04 Dear Miklos, thanks for the email, and your suggestions, but the problem with fixup_bundle in ubuntu is that is not fixing the libraries locations from the executables meaning: if I execute the idd command like this “ idd ./app” where “app” is the executable, the locations of the library is still is “no found", that should be in the location that was copy after running the INSTALL. when you set LD_LIBRARY_PATH is for a temporally solution, or permanent if I modified the environment configuration of O.S.. The idea is that I want to create a standalone application. Under this scenario, if I have an executable called “app” and a shared library call “lib.so”, fixup_bundle should fix the location of the “lib.so” in the same folder where is “app”. Then if I run the command "idd ./app” the output should be: lib.so => “”, where is folder where is located “app" Cheers, Waldo. On 13 Dec 2017, at 03:58, Miklos Espak <esp...@gmail.com<mailto:esp...@gmail.com>> wrote: Hi, you need to add the directory where the Qt libs have been installed (along with your application binaries) to the LD_LIBRARY_PATH. In your case it is '/home/waldo/Developer/install/Release/bratumia/bin/', as I see. Also, you do *not* need to add the Qt plugin directories to the library path. The plugins are loaded at run-time. So that they can be found, you need to install a qt.conf file in the bin directory with the following contents: [Paths] Prefix=. You also do *not* need to add "/usr/lib" and "/usr/lib/x86-..." to the library path. These libraries are searched for by default. If you did it because your Qt installation is there, that's wrong. The fixup_bundle function should have copied the necessary Qt libs in the install bin folder, so you just need to add that folder to the path. Also, make sure that the DIRS variable contains all the directories where there are libraries to install, including dependencies. I hope that helps. Best regards, Miklos On 11 December 2017 at 19:07, Waldo Valenzuela via CMake <cmake@cmake.org<mailto:cmake@cmake.org>> wrote: Dear All, I am working on a multi-platform desktop app with Qt5-VTK8, on Windows and Mac no problem to created the standalone app, but in Ubuntu 16.04 I have several problems. I am using CodeBlocks to compile and run the app, and from CodeBlocks when I run the app there is no problem, it work normally like in windows and mac, but after run the installation, and If I want to run the app from the installation folder (./app ) I have several problems. the CMakeList.txt is FILE(GLOB_RECURSE QTPLUGINS_IMAGEFORMATS ${QT_BASE_DIRECTORY}/plugins/imageformats/*${CMAKE_SHARED_LIBRARY_SUFFIX}) FILE(GLOB_RECURSE QTPLUGINS_PLATFORMS ${QT_BASE_DIRECTORY}/plugins/platforms/*${CMAKE_SHARED_LIBRARY_SUFFIX}) SET(QTPLUGINS ${QTPLUGINS_IMAGEFORMATS} ${QTPLUGINS_PLATFORMS}) MESSAGE("Project libraries: ${QTPLUGINS}") INSTALL(CODE " INCLUDE(BundleUtilities) FIXUP_BUNDLE(\"${APPS}\" \"${QTPLUGINS}\" \"${DIRS}\") " COMPONENT ${PROJECT_NAME}) First I have this: -- fixup_bundle: fixing... -- 132/260: fix-up not required on this platform '/home/waldo/Developer/Qt/5.6.3/gcc_64/plugins/imageformats/libqicns.so' -- 133/260: fix-up not required on this platform '/home/waldo/Developer/install/Release/bratumia/bin/libQt5Core.so.5' -- 134/260: fix-up not required on this platform '/home/waldo/Developer/install/Release/bratumia/bin/libQt5Gui.so.5’ -- 167/260: fix-up not required on this platform '/home/waldo/Developer/install/Release/bratumia/bin/libITKEXPAT-4.13.so.1' -- 168/260: fix-up not required on this platform '/home/waldo/Developer/install/Release/bratumia/bin/libITKIOBMP-4.13.so.1' -- 169/260: fix-up not requir
Re: [cmake-developers] C++11 all features available?
On Mon, Aug 21, 2017 at 4:32 PM, Sebastian Holtermann <sebl...@xwmw.org> wrote: > Am Montag, 21. August 2017, 10:04:28 CEST schrieben Sie: > > On 08/21/2017 09:53 AM, Sebastian Holtermann wrote: > > > it looks like C++11 is now a requirement for CMake itself. > > > > Yes. We just merged this: > > > > https://gitlab.kitware.com/cmake/cmake/merge_requests/1132 > > > > but you beat us to the announcement. > > I saw the MR last week and was delighted. The iterator type naming in `for` > loops drove me mad. Feel free to use `auto`, but you will need to hold off range based for loops. > > > But does this mean *all* the nice features from the std library can be > > > used? > > Not all. We're still limited by some of the older C++11 compilers. > > We'll have to see how things go on nightly builds. As limitations > > are found they can be documented in `Help/dev/source.rst`. > Please have a look at the nightly testers on https://open.cdash.org/index.php?project=CMake and compare the feature availability here: Please see http://en.cppreference.com/w/cpp/compiler_support Currently CMake is still built with Visual Studio 2010, ie. MSVC 16.0. That means we should be able to use auto, nullptr, lambdas, std::array, std::function, type traits, trailing return types, r-values, ... Cheers, Daniel -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Future of ccmake and cmake-gui
Hi, With !977 merged, it is possible to base ccmake and cmake-gui on top of the cmake server. For demonstration, I copied the contents of the Source/CursesDialog directory and added a proxy implementation of the classes `cmake` and `cmState`. The result is 100% compatible with `ccmake`. The same would be possible with cmake-gui. Shall we proceed in this direction? To make the server available everywhere, we should backport the code from C++14 to C++11. I think this is limited to replacing `std::make_shared`. For cmake-gui, the proxies could use Qt functionality (QProcess, QJsonDocument, etc.). As a result, cmake-gui would not have any build dependencies apart from Qt. It might be worth considering to move ccmake and cmake-gui to their own repositories. Cheers, Daniel -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] CMake PCH Prototype
Hi Julian, I have rebased my old precompiled-headers branch on master and created a work-in-progress merge-request here: https://gitlab.kitware.com/cmake/cmake/merge_requests/984 Cheers, Daniel 2017-06-15 13:38 GMT+02:00 Julian Landesberger <j.landesber...@gmail.com>: > Hallo Daniel, > > wir hatten uns nach deinem Meetup-Vortrag letzte Woche kurz über die > Verwaltung von precompiled headers in CMake unterhalten. Du meintest > damals, du hättest bereits eine Art Prototyp dafür geschrieben, der aber > noch nicht an "großen" Projekten getestet wurde, und, dass du ihn dafür zur > Verfügung stellen könntest. > Ich würde den Prototypen gerne am Simulationscode des Lehrstuhls für > Computation in Engineering der TU München ausprobieren. Der hat immerhin > über 6000 source- und header-Dateien, ist also kein kompaktes > Beispielprojekt mehr. > > Würde mich freuen wenn wir da was machen könnten und beste Grüße! > > Julian Landesberger > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Splitting CMakeLib
On Wed, May 10, 2017 at 4:56 PM, Egor Pugin <egor.pu...@gmail.com> wrote: > Hi! > > I'd like to re-use some CMake internal components, but CMakeLib looks too > fat. > Is it possible to split it into several libraries? Are such changes > welcome to contribute? > Strongly in favor. Such a modularization will be a benefit for CMake. It will require to cleanup CMake's internal inter-dependencies and it will help to keep them clean afterwards. It will make CMake's codebase easier to approach by new contributors. It will allow experiments like replacing individual parts (eg. new frontend). Let's learn from LLVM/Clang. > Some rough plan: > 1) Support library (if any stuff) > 2) Core library (targets etc.) > 3) Generators library > 4) CMake syntax library (lexer, parser) > 5) Commands implementation library (could be merged with 4) > Don't merge the commands with the command interpreter/vm. 5) Scripting commands 6) Project commands 7) CTest commands 8) Package generators 9) Server ... True cmake power is in its generators. It's always possible to rip off > all other stuff, but in order to be tied with mainstream and > contribute back, I'm asking this. > Personally, I regard the generators as obsolete and see the future in the server. Cheers, Daniel -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [CMake] CMake regexes: Case insensitive and whitespace matching
Thanks! I’ll take away the message that it is indeed not possible and I didn’t miss anything there. ☺ Regards Daniel -- BMW Car IT GmbH Daniel Lüken Spezialist Entwicklung Moosacher Straße 86 80809 München Tel.: +49-89-189311-35 Fax: +49-89-189311-20 Mail: daniel.lue...@bmw-carit.de<mailto:daniel.lue...@bmw-carit.de> Web: http://www.bmw-carit.de<http://www.bmw-carit.de/> - BMW Car IT GmbH Geschäftsführer: Kai-Uwe Balszuweit und Alexis Trolin Sitz und Registergericht: München HRB 134810 - From: Roman Wüger [mailto:roman.wue...@gmx.at] Sent: Monday, May 08, 2017 11:16 PM To: Daniel Lueken <daniel.lue...@bmw-carit.de> Cc: cmake@cmake.org Subject: Re: [CMake] CMake regexes: Case insensitive and whitespace matching Hello Daniel, I tried it also in various ways, but I think the Regex in Cmake is very limited. What has worked for me was to use try_run and implement a simple c++ application which uses C++11's and accept one or two command line arguments (~ 15 lines of code). Hope it helps Regards Roman Am 08.05.2017 um 15:19 schrieb Daniel Lueken <daniel.lue...@bmw-carit.de<mailto:daniel.lue...@bmw-carit.de>>: Hi! Is there any way to do case insensitive matching in string(REGEX … ? Also, is there a way to match whitespaces? What I would like to do, speaking in Perl-like syntax, is something like string(REGEX REPLACE “/something\s+/stuff/i” … Not knowing how to do this, I am currently doing something along the lines of string(REGEX REPLACE “[Ss][Oo][Mm][Ee][Tt][Hh][Ii][Nn][Gg][\\r\\n\\t ]+” … which looks pretty wrong to me. Converting everything to upper or lower case is also not an option since parts of the input string in which I need to replace something are case sensitive. Best regards Daniel Lueken -- BMW Car IT GmbH Daniel Lüken Spezialist Entwicklung Moosacher Straße 86 80809 München Tel.: +49-89-189311-35 Fax: +49-89-189311-20 Mail: daniel.lue...@bmw-carit.de<mailto:daniel.lue...@bmw-carit.de> Web: http://www.bmw-carit.de<http://www.bmw-carit.de/> - BMW Car IT GmbH Geschäftsführer: Kai-Uwe Balszuweit und Alexis Trolin Sitz und Registergericht: München HRB 134810 - -- Powered by www.kitware.com<http://www.kitware.com> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] CMake regexes: Case insensitive and whitespace matching
Hi! Is there any way to do case insensitive matching in string(REGEX ... ? Also, is there a way to match whitespaces? What I would like to do, speaking in Perl-like syntax, is something like string(REGEX REPLACE "/something\s+/stuff/i" ... Not knowing how to do this, I am currently doing something along the lines of string(REGEX REPLACE "[Ss][Oo][Mm][Ee][Tt][Hh][Ii][Nn][Gg][\\r\\n\\t ]+" ... which looks pretty wrong to me. Converting everything to upper or lower case is also not an option since parts of the input string in which I need to replace something are case sensitive. Best regards Daniel Lueken -- BMW Car IT GmbH Daniel Lüken Spezialist Entwicklung Moosacher Straße 86 80809 München Tel.: +49-89-189311-35 Fax: +49-89-189311-20 Mail: daniel.lue...@bmw-carit.de<mailto:daniel.lue...@bmw-carit.de> Web: http://www.bmw-carit.de<http://www.bmw-carit.de/> - BMW Car IT GmbH Geschäftsführer: Kai-Uwe Balszuweit und Alexis Trolin Sitz und Registergericht: München HRB 134810 - -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [cmake-developers] Can we please require TR1 to build CMake?
On Mon, Jan 9, 2017 at 8:30 PM, Brad King <brad.k...@kitware.com> wrote: > On 01/09/2017 05:46 AM, Daniel Pfeifer wrote: > > start using TR1/C++11 library features, namely std::function, std::bind, > > std::placeholders, std::shared_ptr, std::make_shared. > > I'd love to be able to start using those too, but last time I checked > they are not supported everywhere CMake builds, at least in the standard > libraries (see below). > > > AIX-7.1_IBM-12.1 reports that __IBMCPP_TR1__ must be defined to use TR1. > > Hopefully, but that would take some investigation. > > > Xcode 2.1 and 3.2 fail. These builds are not marked as "expected". > > I'd be okay with dropping these. > > > This leaves HP-UX.11iv2.ia64-aCC and Solaris-10-8.11_Oracle-12.3. > > IIUC the Oracle compiler supports C++11 when told to use the proper > stdlib. However, I don't think there is a solution on HP-UX with its > standard library. > > > * Explicitly require SP1 for Visual Studio 2008. > > Okay. For hosting CMake's own build we could even consider requiring > VS 2010. One blocker for that on Kitware's side is updating our > dashboard machines as needed to be able to host CMake builds even if > testing generators for older versions. I'm not sure when I'll have > time to do that. > > > * Disallow compiling in C++98 mode if compiler is capable of C++11. > > Okay. > > > * Require TR1 by all means. This may require setting up Boost.TR1 > > on a very small number of exotic platforms. > > IIRC there is a tool to extract a subset of boost. Please see how > small it can get. We can even remove the config headers for the > platforms we don't need to use it, perhaps manually. > I have pushed an updated branch to https://gitlab.kitware.com/cmake/cmake/merge_requests/760/diffs The necessary subset of boost can be generated with: ``` mkdir -p cm_boost bcp --boost= \ boost/bind.hpp \ boost/function.hpp \ boost/mem_fn.hpp \ boost/ref.hpp \ boost/unordered_map.hpp \ boost/unordered_set.hpp \ boost/shared_ptr.hpp \ boost/weak_ptr.hpp \ boost/enable_shared_from_this.hpp \ cm_boost ``` The resulting directory is 6.5 MB, 2.6 MB of which are preprocessed headers for Boost.MPL. When we remove them, we get the size down to 3.9 MB. Removing individual config headers is tedious and does not save much. Cheers, Daniel -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Where execute_process INPUT_CONTENT or INPUT_VARIABLE?
On Mon, Apr 24, 2017 at 3:03 PM, Brad King <brad.k...@kitware.com> wrote: > On 04/23/2017 01:30 AM, Konstantin Podsvirov wrote: > > Where execute_process INPUT_CONTENT or INPUT_VARIABLE? > > > > This would be very convenient for a small input. > > > > Why should I always write a file for input? > > I agree that the options should be there but they can't be easily > implemented without choosing our own temporary file which will have > its own problems. > > The reason is that our internal process execution implementation > does not support communication from the parent on stdin. Fixing > that is not something I'm prepared to do or even accept as a > contribution because I'd rather migrate to libuv than extend our > own process management implementation further. Brad, can you share what the current status is on this? If I remember correctly, then libuv cannot be built yet on all necessary compilers. Is that still the case? This sounds like the biggest impediment. Once we can rely on libuv, we can also use it for filesystem operations. This would help solve issues like #13162. Cheers, Daniel -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Support for version suffixes
On Mon, Mar 27, 2017 at 11:03 PM, Roger Leigh <rle...@codelibre.net> wrote: > Hi folks, > > I'd like to bring this issue to your attention to canvas some feedback > regarding the use of version suffixes: > > https://gitlab.kitware.com/cmake/cmake/issues/16716 > > This is basically a proposal to allow an optional version suffix like > "-rc3", "-beta1" etc. in addition to the existing major.minor.patch.tweak > pattern, for better interoperability with systems and software releases > already using such suffixes, and also to permit the use of such suffixes by > CMake projects for their own purposes. A version suffix would be usable > anywhere currently using 4 digit versions, with all the necessary > functionality in CMake being updated to handle this. > > The proposal linked above contains a much more detailed rationale and > suggested implementation strategy. I'd be very happy to hear any thoughts > anyone has regarding this either on the above issue, or here. > Hi Roger, Thanks for starting this discussion! I started a prototype for a PKGCONF mode for find_package in addition to CONFIG and PACKAGE. In this mode, CMake parses .pc files and creates one imported target per file where values from the .pc file are set as target properties. It works pretty well and does not rely on pkg-config. To be compatible with pkg-config, I needed to extend `cmSystemTools::VersionCompare`, because pkg-config uses RPM version comparison. This however breaks current tests because 1.2 != 1.2.0 in the RPM version comparison. It might be necessary to provide several version comparison algorithms like Debian, RPM, Semver. Also splitting the version string into components may depend on the versioning scheme. Given OpenSSL version 1.0.2g, is that patch 2 suffix g, or rather patch 2g? Cheers, Daniel -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Build multiple CMake projects
On Fri, Mar 24, 2017 at 7:35 PM,wrote: > Hi, > > I have some CMake projects which depend on each other. They provide Config > scripts (all generated with the help of CMakePackageConfigHelpers) and the > CMake projects find there dependencies with find_package(). Even the > transitive dependencies are correctly modelled (exported to the Config > scripts with find_dependency). > > The setup in general is fine. The only drawback is that I have to build > and install them manually in the correct order. For example A depends on B > depends on C, I have to build+install first C, than B, then A ... > > The number of projects are getting more and more and it's getting harder > to build them. > > So my question: > a) Is there a CMake way to generate a dependency graph and build them in > the correct order, i.e., the same as CMake does within a project with the > targets but this time on project level? > b) What possiblities are provided by CMake to support this? > c) Are there tools you can recommend? > Make sure that your projects can be used both as a sub-project and as a installed package. That means: if the installed package provides a target called C::C, create an alias target with that name, so that projects A and B can use that name in target_link_libraries in both cases. The next thing is to make sure that `find_package(C REQUIRED)` finds the installed package when it supposed to be used, but does nothing when C is used as a sub-project. This can be achieved by overriding the `find_package` command. The original command can be called by prefixing it with _. Your top-level project might look like this: set(subprojects A B C) macro(find_package name) if("${name}" IN_LIST subprojects) set("${name}_FOUND" TRUE) else() _find_package("${name}" ${ARGN}) endif() endmacro() add_subdirectory(A) add_subdirectory(B) add_subdirectory(C) -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-716-g6a1c761
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 6a1c76184210f5dc289293bb27d5d322c0a5f67d (commit) via e1418249313f35511a3162242d626785e4f51144 (commit) from a1cca83f3823109ad2728c3664b8895b5b528244 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a1c76184210f5dc289293bb27d5d322c0a5f67d commit 6a1c76184210f5dc289293bb27d5d322c0a5f67d Merge: a1cca83 e141824 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Wed Mar 1 17:25:41 2017 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Mar 1 17:25:41 2017 -0500 Merge topic 'modernize-deprecated-headers' into next e1418249 Modernize deprecated headers https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1418249313f35511a3162242d626785e4f51144 commit e1418249313f35511a3162242d626785e4f51144 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Wed Mar 1 23:23:09 2017 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Wed Mar 1 23:23:09 2017 +0100 Modernize deprecated headers Replace C standard library headers in C++ code with their C++ alternatives. diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index d8bafee..71814bb 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -3,8 +3,8 @@ #include "cmCPackIFWInstaller.h" #include +#include #include -#include #include #include "CPack/cmCPackGenerator.h" diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx index e23b1b9..7bf34ce 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.cxx +++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx @@ -13,9 +13,9 @@ #include "cmXMLWriter.h" #include +#include #include #include -#include //- Logger --- #ifdef cmCPackLogger diff --git a/Source/CPack/IFW/cmCPackIFWRepository.cxx b/Source/CPack/IFW/cmCPackIFWRepository.cxx index cc204e8..ed4cb4e 100644 --- a/Source/CPack/IFW/cmCPackIFWRepository.cxx +++ b/Source/CPack/IFW/cmCPackIFWRepository.cxx @@ -10,7 +10,7 @@ #include "cmXMLWriter.h" #include -#include +#include #ifdef cmCPackLogger #undef cmCPackLogger diff --git a/Source/CPack/OSXScriptLauncher.cxx b/Source/CPack/OSXScriptLauncher.cxx index b159e64..689633a 100644 --- a/Source/CPack/OSXScriptLauncher.cxx +++ b/Source/CPack/OSXScriptLauncher.cxx @@ -3,8 +3,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 5c50da8..28b5a78 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -9,13 +9,13 @@ #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" +#include #include -#include +#include +#include #include #include #include -#include -#include #include #include diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index ec5fc88..df6ee22 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -9,9 +9,9 @@ #include #include +#include #include #include -#include #include diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h index 876eab7..0e7b9f4 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.h +++ b/Source/CPack/cmCPackDragNDropGenerator.h @@ -4,8 +4,8 @@ #define cmCPackDragNDropGenerator_h #include +#include #include -#include #include #include diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index a988ccc..d699f05 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -5,8 +5,8 @@ #include // IWYU pragma: keep +#include #include -#include #include #define cmCPack_Log(ctSelf, logType, msg) \ diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index 1940953..690f6f3 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -11,10 +11,10 @@ #include #include #include +#include +#include #include #include -#include -#include #include /* NSIS uses different command line syntax on Windows and others */ diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/
[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-254-ge939f8b
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via e939f8b18003e9b3fd2e2f398d3a2a0f8e5a46ad (commit) via 89541d043d1d53b1a6c1082a9e9574b16165562d (commit) via a3ff237a5c221be52bbd2cf7b526fd19b5202a35 (commit) from b7af957834c120064057a0180487a56fc12ec7e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e939f8b18003e9b3fd2e2f398d3a2a0f8e5a46ad commit e939f8b18003e9b3fd2e2f398d3a2a0f8e5a46ad Merge: b7af957 89541d0 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Feb 17 16:51:06 2017 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Feb 17 16:51:06 2017 -0500 Merge topic 'iwyu' into next 89541d04 fixup! cmFortranParser: include what you use a3ff237a ParserHelper: Move macros to bottom of files https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89541d043d1d53b1a6c1082a9e9574b16165562d commit 89541d043d1d53b1a6c1082a9e9574b16165562d Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Feb 17 22:49:24 2017 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Feb 17 22:49:24 2017 +0100 fixup! cmFortranParser: include what you use diff --git a/Source/cmFortranParser.cxx b/Source/cmFortranParser.cxx index 45d9639..c67227f 100644 --- a/Source/cmFortranParser.cxx +++ b/Source/cmFortranParser.cxx @@ -97,7 +97,7 @@ Modify cmFortranParser.cxx: - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] */ -#include +#include // IWYU pragma: keep #include #include diff --git a/Source/cmFortranParser.y b/Source/cmFortranParser.y index be4959c..3d68134 100644 --- a/Source/cmFortranParser.y +++ b/Source/cmFortranParser.y @@ -26,7 +26,7 @@ Modify cmFortranParser.cxx: - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] */ -#include +#include // IWYU pragma: keep #include #include diff --git a/Source/cmFortranParserTokens.h b/Source/cmFortranParserTokens.h index 18b9e0a..8d6a5fe 100644 --- a/Source/cmFortranParserTokens.h +++ b/Source/cmFortranParserTokens.h @@ -130,7 +130,7 @@ extern int cmFortran_yydebug; union YYSTYPE { -#line 75 "cmFortranParser.y" /* yacc.c:1909 */ +#line 70 "cmFortranParser.y" /* yacc.c:1909 */ char* string; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3ff237a5c221be52bbd2cf7b526fd19b5202a35 commit a3ff237a5c221be52bbd2cf7b526fd19b5202a35 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Feb 17 22:43:43 2017 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Feb 17 22:43:43 2017 +0100 ParserHelper: Move macros to bottom of files Since the class name is used in the macros, the iwyu tool gets confused wheter it needs a forward declaration or not. While editing the files, make sure structs have no typedef. Also, remove confusing comments about Java. diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h index 95bf0ad..5bfb236 100644 --- a/Source/cmCommandArgumentParserHelper.h +++ b/Source/cmCommandArgumentParserHelper.h @@ -8,27 +8,15 @@ #include #include -#define YYSTYPE cmCommandArgumentParserHelper::ParserType -#define YYSTYPE_IS_DECLARED -#define YY_EXTRA_TYPE cmCommandArgumentParserHelper* -#define YY_DECL \ - int cmCommandArgument_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner) - -/** \class cmCommandArgumentParserHelper - * \brief Helper class for parsing java source files - * - * Finds dependencies for java file and list of outputs - */ - class cmMakefile; class cmCommandArgumentParserHelper { public: - typedef struct + struct ParserType { char* str; - } ParserType; + }; cmCommandArgumentParserHelper(); ~cmCommandArgumentParserHelper(); @@ -100,4 +88,10 @@ private: bool RemoveEmpty; }; +#define YYSTYPE cmCommandArgumentParserHelper::ParserType +#define YYSTYPE_IS_DECLARED +#define YY_EXTRA_TYPE cmCommandArgumentParserHelper* +#define YY_DECL \ + int cmCommandArgument_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner) + #endif diff --git a/Source/cmDependsJavaParserHelper.h b/Source/cmDependsJavaParserHelper.h index 71b939c..5f28f70 100644 --- a/Source/cmDependsJavaParserHelper.h +++ b/Source/cmDependsJavaParserHelper.h @@ -8,26 +8,18 @@ #include #include -class cmDependsJavaParserHelper; - -#defi
[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-117-gd358f8b
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via d358f8bba5418d0a8e95bd5efe0a913b8acb2a13 (commit) via e0f3931226d6f947572bce7a4b98c55812bba105 (commit) via 72dcbbe5c017a4c071187259f9594ccf02f7b466 (commit) via 7fb14775a3cce73dc0cb0d759b96059a95f7104b (commit) via 615e2a17e499b2bd53cce8da1a0cfae36d67b24a (commit) via 45b49099d9dd034fd1e7344b3bae88b0e3d3427a (commit) via 5396bc92d0162fa9a9462e15ccaae8764da8ff98 (commit) from d8aec3f2d5478ffb7235b638d33d08e944093916 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d358f8bba5418d0a8e95bd5efe0a913b8acb2a13 commit d358f8bba5418d0a8e95bd5efe0a913b8acb2a13 Merge: d8aec3f e0f3931 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Feb 13 17:29:12 2017 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Feb 13 17:29:12 2017 -0500 Merge topic 'command-cleanup' into next e0f39312 cmCommands: add commands directly to cmState 72dcbbe5 split Default commands into Scripting and Project 7fb14775 cmDisallowedCommand: extract policy checking from cmCommand 615e2a17 cmCommand: Don't prefix error message with command name 45b49099 cmCommand: make noncopyable 5396bc92 cmCommand: remove member Helper https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0f3931226d6f947572bce7a4b98c55812bba105 commit e0f3931226d6f947572bce7a4b98c55812bba105 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Jan 20 22:40:16 2017 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Mon Feb 13 22:39:20 2017 +0100 cmCommands: add commands directly to cmState diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx index 64cd12e..b58dc62 100644 --- a/Source/cmCommands.cxx +++ b/Source/cmCommands.cxx @@ -1,6 +1,7 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCommands.h" +#include "cmState.h" #include "cmAddCustomCommandCommand.h" #include "cmAddCustomTargetCommand.h" @@ -105,170 +106,162 @@ #include "cmWriteFileCommand.h" #endif -std::vector<cmCommand*> GetScriptingCommands() +void GetScriptingCommands(cmState* state) { - std::vector<cmCommand*> commands; + state->AddCommand(new cmBreakCommand); + state->AddCommand(new cmCMakeMinimumRequired); + state->AddCommand(new cmCMakePolicyCommand); + state->AddCommand(new cmConfigureFileCommand); + state->AddCommand(new cmContinueCommand); + state->AddCommand(new cmExecProgramCommand); + state->AddCommand(new cmExecuteProcessCommand); + state->AddCommand(new cmFileCommand); + state->AddCommand(new cmFindFileCommand); + state->AddCommand(new cmFindLibraryCommand); + state->AddCommand(new cmFindPackageCommand); + state->AddCommand(new cmFindPathCommand); + state->AddCommand(new cmFindProgramCommand); + state->AddCommand(new cmForEachCommand); + state->AddCommand(new cmFunctionCommand); + state->AddCommand(new cmGetCMakePropertyCommand); + state->AddCommand(new cmGetDirectoryPropertyCommand); + state->AddCommand(new cmGetFilenameComponentCommand); + state->AddCommand(new cmGetPropertyCommand); + state->AddCommand(new cmIfCommand); + state->AddCommand(new cmIncludeCommand); + state->AddCommand(new cmListCommand); + state->AddCommand(new cmMacroCommand); + state->AddCommand(new cmMakeDirectoryCommand); + state->AddCommand(new cmMarkAsAdvancedCommand); + state->AddCommand(new cmMathCommand); + state->AddCommand(new cmMessageCommand); + state->AddCommand(new cmOptionCommand); + state->AddCommand(new cmParseArgumentsCommand); + state->AddCommand(new cmReturnCommand); + state->AddCommand(new cmSeparateArgumentsCommand); + state->AddCommand(new cmSetCommand); + state->AddCommand(new cmSetDirectoryPropertiesCommand); + state->AddCommand(new cmSetPropertyCommand); + state->AddCommand(new cmSiteNameCommand); + state->AddCommand(new cmStringCommand); + state->AddCommand(new cmUnsetCommand); + state->AddCommand(new cmWhileCommand); - commands.push_back(new cmBreakCommand); - commands.push_back(new cmCMakeMinimumRequired); - commands.push_back(new cmCMakePolicyCommand); - commands.push_back(new cmConfigureFileCommand); - commands.push_back(new cmContinueCommand); - commands.push_back(new cmExecProgramCommand); - c
[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-92-g9862605
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 9862605636abde65ca8e651d42b3d706beeaaecc (commit) via a45a5847e096e7f077acb0a4fde44bda9225fbc4 (commit) from 4c53c29d86e7dc4c580fb5b7c8f06551934ae03c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9862605636abde65ca8e651d42b3d706beeaaecc commit 9862605636abde65ca8e651d42b3d706beeaaecc Merge: 4c53c29 a45a584 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Feb 11 16:10:16 2017 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sat Feb 11 16:10:16 2017 -0500 Merge topic 'command-cleanup' into next a45a5847 fixup! split Default commands into Scripting and Project https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a45a5847e096e7f077acb0a4fde44bda9225fbc4 commit a45a5847e096e7f077acb0a4fde44bda9225fbc4 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Feb 11 22:09:37 2017 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Feb 11 22:09:37 2017 +0100 fixup! split Default commands into Scripting and Project diff --git a/Help/manual/cmake-commands.7.rst b/Help/manual/cmake-commands.7.rst index 8f019d2..611c989 100644 --- a/Help/manual/cmake-commands.7.rst +++ b/Help/manual/cmake-commands.7.rst @@ -113,6 +113,8 @@ These commands are available only in CMake projects. /command/try_compile /command/try_run +.. _`CTest Commands`: + CTest Commands == --- Summary of changes: Help/manual/cmake-commands.7.rst |2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-90-g4c53c29
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 4c53c29d86e7dc4c580fb5b7c8f06551934ae03c (commit) via 4ff5dce9f8be34d556f1fb98272a8654b1f6c5bb (commit) via 934ac7916e4e4df6ef55441d58fd1c310e4ad9f1 (commit) via 717491dd7d4a886d484025fd9002df44458117b5 (commit) via b75e7691425d4cb658f3b0981fdbfbc25dedfb43 (commit) via 17926f29cecc7574c9173ff06f5e3d0e4e250b02 (commit) via c1bfff2e72bd673e7b7bebddf58c7ea508bf4196 (commit) from fe4c8e497ce4eb67bd14187f8729710a72cfe37a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c53c29d86e7dc4c580fb5b7c8f06551934ae03c commit 4c53c29d86e7dc4c580fb5b7c8f06551934ae03c Merge: fe4c8e4 4ff5dce Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Feb 10 18:21:19 2017 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Feb 10 18:21:19 2017 -0500 Merge topic 'command-cleanup' into next 4ff5dce9 cmCommands: add commands directly to cmState 934ac791 split Default commands into Scripting and Project 717491dd cmDeprecatedCommand: extract policy checking from cmCommand b75e7691 cmCommand: Don't prefix error message with command name 17926f29 cmCommand: make noncopyable c1bfff2e cmCommand: remove member Helper https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ff5dce9f8be34d556f1fb98272a8654b1f6c5bb commit 4ff5dce9f8be34d556f1fb98272a8654b1f6c5bb Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Jan 20 22:40:16 2017 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Feb 11 00:20:22 2017 +0100 cmCommands: add commands directly to cmState diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx index bc24234..9ff395a 100644 --- a/Source/cmCommands.cxx +++ b/Source/cmCommands.cxx @@ -1,6 +1,7 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCommands.h" +#include "cmState.h" #include "cmAddCustomCommandCommand.h" #include "cmAddCustomTargetCommand.h" @@ -105,170 +106,162 @@ #include "cmWriteFileCommand.h" #endif -std::vector<cmCommand*> GetScriptingCommands() +void GetScriptingCommands(cmState* state) { - std::vector<cmCommand*> commands; + state->AddCommand(new cmBreakCommand); + state->AddCommand(new cmCMakeMinimumRequired); + state->AddCommand(new cmCMakePolicyCommand); + state->AddCommand(new cmConfigureFileCommand); + state->AddCommand(new cmContinueCommand); + state->AddCommand(new cmExecProgramCommand); + state->AddCommand(new cmExecuteProcessCommand); + state->AddCommand(new cmFileCommand); + state->AddCommand(new cmFindFileCommand); + state->AddCommand(new cmFindLibraryCommand); + state->AddCommand(new cmFindPackageCommand); + state->AddCommand(new cmFindPathCommand); + state->AddCommand(new cmFindProgramCommand); + state->AddCommand(new cmForEachCommand); + state->AddCommand(new cmFunctionCommand); + state->AddCommand(new cmGetCMakePropertyCommand); + state->AddCommand(new cmGetDirectoryPropertyCommand); + state->AddCommand(new cmGetFilenameComponentCommand); + state->AddCommand(new cmGetPropertyCommand); + state->AddCommand(new cmIfCommand); + state->AddCommand(new cmIncludeCommand); + state->AddCommand(new cmListCommand); + state->AddCommand(new cmMacroCommand); + state->AddCommand(new cmMakeDirectoryCommand); + state->AddCommand(new cmMarkAsAdvancedCommand); + state->AddCommand(new cmMathCommand); + state->AddCommand(new cmMessageCommand); + state->AddCommand(new cmOptionCommand); + state->AddCommand(new cmParseArgumentsCommand); + state->AddCommand(new cmReturnCommand); + state->AddCommand(new cmSeparateArgumentsCommand); + state->AddCommand(new cmSetCommand); + state->AddCommand(new cmSetDirectoryPropertiesCommand); + state->AddCommand(new cmSetPropertyCommand); + state->AddCommand(new cmSiteNameCommand); + state->AddCommand(new cmStringCommand); + state->AddCommand(new cmUnsetCommand); + state->AddCommand(new cmWhileCommand); - commands.push_back(new cmBreakCommand); - commands.push_back(new cmCMakeMinimumRequired); - commands.push_back(new cmCMakePolicyCommand); - commands.push_back(new cmConfigureFileCommand); - commands.push_back(new cmContinueCommand); - commands.push_back(new cmExecProgramCommand); - c
Re: [cmake-developers] Debugger for CMake
On Thu, Feb 2, 2017 at 12:02 PM, Milian Wolff <m...@milianw.de> wrote: > On Dienstag, 31. Januar 2017 20:55:45 CET Justin Berger wrote: > > > I liked the snapshots that were in Stephen Kelly's daemon-mode patch > much > > > > better than an interactive debugger. > > > > I'm not sure these tools have that much use-case overlap. As far as I can > > tell, snapshots has roughly the same overhead / functionality as > reversible > > interactive debuggers; which is non trivial. Which tool is best for a > given > > problem seems situational; and having both seems useful. > > > > I looked through the code for cmServer, since it maintains an instance of > > cmake in process, it could register as a debug listener and get events / > > set breakpoints and all in response to different requests coming in. The > > issue here though is that it seems like (and maybe this is wrong?) the > > actual call out to configure blocks on the libuv loop thread so it can't > > get or process any requests while configure is running; so maybe keeping > > them as seperate services running on separate loops is better. > > > > The only way I could see it making sense to use a completely different > > protocol would be if there were a semi-standard debugger protocol used in > > different IDE's for debugging interpreted code, and then I think it makes > > sense to pursue those. However, I did some research into that and didn't > > find anything especially relevant -- IDE maintainers would obviously > have a > > better sense of that though. Also, even if there is such a thing, there > is > > no reason not to support multiple debug protocols; it is just a matter of > > prioritization. > > GDB's MI is a standard protocol used by both clang and LLDB but I think it > will be overkill for something like CMake. From my POV, CMake is very > different from a normal application that you may debug. I mean do you > really > expect people to go line-by-line through a cmake script to see how it gets > evaluated? It depends. I don't. Rather, I want to see the effect a call has on the CMake > state, i.e. the approach that Stephen took is far better in my eyes. I personally could not agree more. But that answer greatly depends on the way you use CMake. If you use it as a build system generator and write your CMakeLists.txt files in a clean, modern way, then Steve's approach is perfect. However, if you (ab)use CMake as a general purpose scripting language, then a debugger might be welcome. Have a look at ExternalProject.cmake. You find even more complex examples in the wild if you google for "cmake package management". I am against a debugger in CMake. We should invest in making the clean, modern approach more clean, more modern, and more pleasant. Using CMake as a general purpose scripting language should be possible but painful. Like a continuous question whether you are using the right tool for the job. But that is just my opinion. PS: Adding an interactive debugger to the CMake scripting language might complicate adding new language front-ends. If we allow an alternative language front-end, you might be able to use existing tools to debug complicated scripts. Cheers, Daniel -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] What should the behaviour of NUMBER_OF_LOGICAL_CORES be?
Hi, I agree that it should be total number of cores. In addition, cmake_host_system_information() might be extended to provide the number of cores per physical core. This aligns with the information in the XML procuded by CTest: The Site element has the attributes NumberOfLogicalCPU, NumberOfPhysicalCPU, and LogicalProcessorsPerPhysical. Cheers, Daniel On Thu, Jan 26, 2017 at 9:56 PM, Nicolás Bértolo <nicolasbert...@gmail.com> wrote: > Hi, > > This question comes from https://gitlab.kitware.com/ > cmake/cmake/issues/16594 > Currently cmake_host_system_information(RESULT logical QUERY > NUMBER_OF_LOGICAL_CORES) is buggy, some parts of the code that implement it > assume it refers to the number of cores in the system and some assume it is > the number of cores per physical core. The documentation implies it is the > total number of cores, but in my system (AMD FX-8320) it is equal to 1 when > it should be 8. > > I have offered myself to fix this bug, but first I would like to know what > is the correct return value of this call should be. > Should it return the number of cores per physical core or the total number > of cores in the system? > > I think it should be the latter, but I would like to hear your opinions. > > Regards, > Nicolás. > > > > -- > [image: Avast logo] > <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=emailclient> > > El software de antivirus Avast ha analizado este correo electrónico en > busca de virus. > www.avast.com > <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=emailclient> > > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake-developers > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[Cmake-commits] CMake branch, next, updated. v3.7.2-2317-g8708542
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 8708542da2b794a08b11c3ccae91dc927504ae50 (commit) via eb86b4cec14df4a51cca9f178e8e758b97be11b7 (commit) via 178c897374718c2b7cfa76f5c016f23658d5d2b2 (commit) via 3bb4a798268669ca1364040abb3cfdf4a44c2f92 (commit) via 60b68304f25088db12112c47a4599e4fef405429 (commit) via 1731b90cd0b8c1c0da2f485a9b43006bb2174150 (commit) from 368845459f43438e239663171cb38125915d5080 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8708542da2b794a08b11c3ccae91dc927504ae50 commit 8708542da2b794a08b11c3ccae91dc927504ae50 Merge: 3688454 eb86b4c Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Tue Jan 24 16:36:47 2017 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Tue Jan 24 16:36:47 2017 -0500 Merge topic 'testdriver-cleanup' into next eb86b4ce TestDriver: fix/silence clang-tidy warnings 178c8973 TestDriver: calc NumTests at compile time 3bb4a798 TestDriver: use for loop 60b68304 TestDriver: abstract CM_CAST macro 1731b90c TestDriver: Revise C++ coding style using clang-format https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb86b4cec14df4a51cca9f178e8e758b97be11b7 commit eb86b4cec14df4a51cca9f178e8e758b97be11b7 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Tue Jan 24 22:24:06 2017 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Tue Jan 24 22:24:06 2017 +0100 TestDriver: fix/silence clang-tidy warnings diff --git a/Templates/TestDriver.cxx.in b/Templates/TestDriver.cxx.in index 7340842..ecf6fa1 100644 --- a/Templates/TestDriver.cxx.in +++ b/Templates/TestDriver.cxx.in @@ -1,7 +1,7 @@ -#include -#include -#include -#include +#include /* NOLINT */ +#include /* NOLINT */ +#include /* NOLINT */ +#include /* NOLINT */ #if defined(_MSC_VER) #pragma warning(disable : 4996) /* deprecation */ @@ -29,7 +29,7 @@ typedef struct static functionMapEntry cmakeGeneratedFunctionMapEntries[] = { @CMAKE_FUNCTION_TABLE_ENTIRES@ - { 0, 0 } + { NULL, NULL } /* NOLINT */ }; static const int NumTests = @@ -37,7 +37,6 @@ static const int NumTests = /* Allocate and create a lowercased copy of string (note that it has to be free'd manually) */ - static char* lowercase(const char* string) { char *new_string, *p; @@ -46,8 +45,8 @@ static char* lowercase(const char* string) stringSize = CM_CAST(size_t, strlen(string) + 1); new_string = CM_CAST(char*, malloc(sizeof(char) * stringSize)); - if (!new_string) { -return 0; + if (new_string == NULL) { /* NOLINT */ +return NULL;/* NOLINT */ } strncpy(new_string, string, stringSize); for (p = new_string; *p != 0; ++p) { @@ -87,12 +86,12 @@ int main(int ac, char* av[]) av++; } partial_match = 0; - arg = 0; + arg = NULL; /* NOLINT */ /* If partial match is requested. */ if (testToRun == -1 && ac > 1) { partial_match = (strcmp(av[1], "-R") == 0) ? 1 : 0; } - if (partial_match && ac < 3) { + if (partial_match != 0 && ac < 3) { printf("-R needs an additional parameter.\n"); return -1; } @@ -101,20 +100,18 @@ int main(int ac, char* av[]) } for (i = 0; i < NumTests && testToRun == -1; ++i) { test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name); -if (partial_match && strstr(test_name, arg) != NULL) { +if (partial_match != 0 && strstr(test_name, arg) != NULL) { /* NOLINT */ testToRun = i; ac -= 2; av += 2; -} else if (!partial_match && strcmp(test_name, arg) == 0) { +} else if (partial_match == 0 && strcmp(test_name, arg) == 0) { testToRun = i; ac--; av++; } free(test_name); } - if (arg) { -free(arg); - } + free(arg); if (testToRun != -1) { int result; @CMAKE_TESTDRIVER_BEFORE_TESTMAIN@ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=178c897374718c2b7cfa76f5c016f23658d5d2b2 commit 178c897374718c2b7cfa76f5c016f23658d5d2b2 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Tue Jan 24 22:24:06 2017 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Tue Jan 24 22:24:06 2017 +0100 TestDriver: calc NumTests at compile time diff --git a/Templates/TestDriver.cxx.in b/Templates/TestDriver.cxx.in index 8e54680..7340842 100644 --- a/Templates/TestDriver.cxx.in +++ b/Templates/TestDriver.cxx.in @@ -32,6 +32,9 @@ static func
Re: [cmake-developers] [Discussion] Add python support for CMakeLists
On Wed, Jan 11, 2017 at 10:23 PM, Shmuel H, <shmuelhcm...@gmail.com> wrote: > Hello, > > First of all, I have been using CMake for a few years now, it is awesome > tool, thank you. > > The only problem I currently have with CMake is its language, which has > not really intended to be one. After reading a few endless discussions > about this topic, I decided to give it a try and do something practical. > > My current design is using Python as an extension for the regular > CMakeLists.txt files: if there is a CMakeLists.py file, it would be loaded. > > It should not be too hard to maintain, the current API design uses only > 1-3 function that should be implemented in cmake. > > For more information, see the [closed] merge request #389 > <https://gitlab.kitware.com/cmake/cmake/merge_requests/389>. > > I would be happy to hear your opinion about this idea. > Hello Shmuel, what do you find fault with the CMake language? I have my own complaints about it, which may be completely orthogonal or even contradictory to yours. I am currently refactoring cmCommand and the way commands are interpreted in the CMake language. This refactoring will simplify porting the CMake language frontend to a different scripting engine. I have spent some thoughts on this and I have a very strong opinion about the direction. To avoid another "language X is better than Y" discussion, I will not go into more details. You should elaborate your motivation first. cheers, Daniel -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [CMake] CMake 3.7.1 gui fails to launch
Another alternative, which is the one we use here, is to configure the custom Qt build with a "-qtlibinfix" flag - which produces libraries with completely different SONAMEs so there's no conflict. (We use this in conjunction with an RPATH.) One thing that could break is that some distributions set QT_PLUGIN_PATH for KDE logins which causes errors on trying to load incompatible plugins, so they might need to unset QT_PLUGIN_PATH in their wrapper script. -- Daniel From: CMake [cmake-boun...@cmake.org] on behalf of Hendrik Sattler [p...@hendrik-sattler.de] Sent: Saturday, January 07, 2017 12:11 AM To: cmake@cmake.org; da...@daryllee.com; Alan W. Irwin Subject: Re: [CMake] CMake 3.7.1 gui fails to launch Am 6. Januar 2017 23:37:00 MEZ schrieb da...@daryllee.com: >And the answer is... > >I recently installed an IDE from a not-to-be-named company that I do a > >lot of business with. The installation of that software places their >installation directory in LD_LIBRARY_PATH and guess what? their >installation contains a copy of libQtGui.so and libQtCore.so. The >"ldd" tip led me to that discovery. For now I have put >/usr/lib/x86_64-linux-gnu in front of their path in LD_LIBRARY_PATH >and cmake-gui V3.7.1 is working. I may have to come up with a more >permanent fix, but for now their stuff seems to work and CMake seems >to work, so I'm claiming victory. Maybe as a customer you should tell them about this bad experience. They should either set RPATH in their programs or should set LD_LIBRARY_PATH only in a start wrapper script. In a program that lets the user start other programs, RPATH should be preferred or LD_LIBRARY_PATH should be cleaned up for child processes. HS -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[cmake-developers] Can we please require TR1 to build CMake?
Hi and happy 2017, I am currently doing some refactoring (more on that later) and I would like to start using TR1/C++11 library features, namely std::function, std::bind, std::placeholders, std::shared_ptr, std::make_shared. Some background information: The Dinkumware standard library introduced TR1 in version 5.05. Visual Studio 2008 (without Service Pack) ships with version 5.03. Visual Studio 2008 SP1 has version 5.05. Visual Studio 2010 has version 5.20. This version puts the symbols into namespace std. The version number is stored in _CPPLIB_VER. The GNU libstdc++ introduced TR1 in version 4.0. The TR1 headers have been put into a subdirectory. Starting with version 4.3, the headers can be included as in C++11 and the symbols are in namespace std, but only if the language mode is set to C++0x or higher. The library version number is stored in __GLIBCXX__. The LLVM libc++ was designed for C++11 from the beginning. I could not find information about TR1 availability in other standard library implementations. So I made a test run on the nightly dashboard builds. The results are here: https://open.cdash.org/index.php?project=CMake=2016-12-29 I was very surprised by the small number of failed builds. Five expected nightly builds failed on dash2win64.kitware. Apparently Visual Studio 2008 SP1 is not installed. The Intel compiler uses the standard library of Visual Studio. AIX-7.1_IBM-12.1 reports that __IBMCPP_TR1__ must be defined to use TR1. That should be easy to fix. Xcode 2.1 and 3.2 fail. These builds are not marked as "expected". This leaves HP-UX.11iv2.ia64-aCC and Solaris-10-8.11_Oracle-12.3. Here is my concrete proposal: * Explicitly require SP1 for Visual Studio 2008. * Drop support for Xcode 2.1 and 3.2 or mark builds as expected. * Disallow compiling in C++98 mode if compiler is capable of C++11. * Require TR1 by all means. This may require setting up Boost.TR1 on a very small number of exotic platforms. Cheers, Daniel -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[Cmake-commits] CMake branch, next, updated. v3.7.1-1872-gf090b78
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via f090b7818791116d3bd273403a91531e9a14d3fc (commit) via 4d7002fe4045e32dc3e5eefaff9ab2f20c878297 (commit) from 2969f55026a2bb77f063c6c119a9c9e3afc35854 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f090b7818791116d3bd273403a91531e9a14d3fc commit f090b7818791116d3bd273403a91531e9a14d3fc Merge: 2969f55 4d7002f Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Thu Dec 29 15:19:29 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Dec 29 15:19:29 2016 -0500 Merge topic 'require-tr1' into next 4d7002fe Revert "Require TR1" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d7002fe4045e32dc3e5eefaff9ab2f20c878297 commit 4d7002fe4045e32dc3e5eefaff9ab2f20c878297 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Thu Dec 29 21:18:44 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Thu Dec 29 21:18:44 2016 +0100 Revert "Require TR1" This reverts commit b0c31f93c84207b3c3a8ba31241ff2ee22886acf. diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index 23805be..80c9f3b 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -40,4 +40,6 @@ if(CMAKE_CXX_STANDARD) cm_check_cxx_feature(nullptr) cm_check_cxx_feature(override) cm_check_cxx_feature(unique_ptr) + cm_check_cxx_feature(unordered_map) + cm_check_cxx_feature(unordered_set) endif() diff --git a/Source/Checks/cm_cxx_unordered_map.cxx b/Source/Checks/cm_cxx_unordered_map.cxx new file mode 100644 index 000..be3de25 --- /dev/null +++ b/Source/Checks/cm_cxx_unordered_map.cxx @@ -0,0 +1,7 @@ +#include +int main() +{ + std::unordered_map<int, int> map; + map[0] = 0; + return 0; +} diff --git a/Source/Checks/cm_cxx_unordered_set.cxx b/Source/Checks/cm_cxx_unordered_set.cxx new file mode 100644 index 000..de4bb77 --- /dev/null +++ b/Source/Checks/cm_cxx_unordered_set.cxx @@ -0,0 +1,7 @@ +#include +int main() +{ + std::unordered_set set; + set.insert(0); + return 0; +} diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 07eba12..26f1df2 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -25,6 +25,8 @@ #cmakedefine CMake_HAVE_CXX_NULLPTR #cmakedefine CMake_HAVE_CXX_OVERRIDE #cmakedefine CMake_HAVE_CXX_UNIQUE_PTR +#cmakedefine CMake_HAVE_CXX_UNORDERED_MAP +#cmakedefine CMake_HAVE_CXX_UNORDERED_SET #define CMAKE_BIN_DIR "/@CMAKE_BIN_DIR@" #define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@" diff --git a/Source/cm_unordered_map.hxx b/Source/cm_unordered_map.hxx index 3a0d88a..dc8ca35 100644 --- a/Source/cm_unordered_map.hxx +++ b/Source/cm_unordered_map.hxx @@ -4,29 +4,22 @@ #define CM_UNORDERED_MAP_HXX #include -#include -#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20080306 || __cplusplus < 201103L) -#include -#else -#include -#endif +#if defined(CMake_HAVE_CXX_UNORDERED_MAP) -namespace cm { +#include +#define CM_UNORDERED_MAP std::unordered_map -#if (defined(_CPPLIB_VER) && _CPPLIB_VER < 520) ||\ - (defined(__GLIBCXX__) && (__GLIBCXX__ < 20080306 || __cplusplus < 201103L)) +#elif defined(CMAKE_BUILD_WITH_CMAKE) -using namespace std::tr1; +#include +#define CM_UNORDERED_MAP cmsys::hash_map #else -using namespace std; +#include +#define CM_UNORDERED_MAP std::map #endif -} // end namespace cm - -#define CM_UNORDERED_MAP cm::unordered_map - #endif diff --git a/Source/cm_unordered_set.hxx b/Source/cm_unordered_set.hxx index 1f66e00..ce58dbf 100644 --- a/Source/cm_unordered_set.hxx +++ b/Source/cm_unordered_set.hxx @@ -4,29 +4,22 @@ #define CM_UNORDERED_SET_HXX #include -#include -#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20080306 || __cplusplus < 201103L) -#include -#else -#include -#endif +#if defined(CMake_HAVE_CXX_UNORDERED_SET) -namespace cm { +#include +#define CM_UNORDERED_SET std::unordered_set -#if (defined(_CPPLIB_VER) && _CPPLIB_VER < 520) ||\ - (defined(__GLIBCXX__) && (__GLIBCXX__ < 20080306 || __cplusplus < 201103L)) +#elif defined(CMAKE_BUILD_WITH_CMAKE) -using namespace std::tr1; +#include +#define CM_UNORDERED_SET cmsys::hash_set #else -using namespace std; +#include +#define CM_UNORDERED_SET std::set #endif -} // end namespace cm - -#define CM_UNORDERED_SET
[Cmake-commits] CMake branch, next, updated. v3.7.1-1868-g3c5549e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 3c5549e5d6d8b3651f7696e5f9daade18ffab621 (commit) via b0c31f93c84207b3c3a8ba31241ff2ee22886acf (commit) from 54fd0836989e2a4bb8711265499e09e6ffd5c3d8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3c5549e5d6d8b3651f7696e5f9daade18ffab621 commit 3c5549e5d6d8b3651f7696e5f9daade18ffab621 Merge: 54fd083 b0c31f9 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Wed Dec 28 16:31:37 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Dec 28 16:31:37 2016 -0500 Merge topic 'require-tr1' into next b0c31f93 Require TR1 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0c31f93c84207b3c3a8ba31241ff2ee22886acf commit b0c31f93c84207b3c3a8ba31241ff2ee22886acf Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Wed Dec 28 20:41:17 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Wed Dec 28 20:41:17 2016 +0100 Require TR1 diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index 80c9f3b..23805be 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -40,6 +40,4 @@ if(CMAKE_CXX_STANDARD) cm_check_cxx_feature(nullptr) cm_check_cxx_feature(override) cm_check_cxx_feature(unique_ptr) - cm_check_cxx_feature(unordered_map) - cm_check_cxx_feature(unordered_set) endif() diff --git a/Source/Checks/cm_cxx_unordered_map.cxx b/Source/Checks/cm_cxx_unordered_map.cxx deleted file mode 100644 index be3de25..000 --- a/Source/Checks/cm_cxx_unordered_map.cxx +++ /dev/null @@ -1,7 +0,0 @@ -#include -int main() -{ - std::unordered_map<int, int> map; - map[0] = 0; - return 0; -} diff --git a/Source/Checks/cm_cxx_unordered_set.cxx b/Source/Checks/cm_cxx_unordered_set.cxx deleted file mode 100644 index de4bb77..000 --- a/Source/Checks/cm_cxx_unordered_set.cxx +++ /dev/null @@ -1,7 +0,0 @@ -#include -int main() -{ - std::unordered_set set; - set.insert(0); - return 0; -} diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 26f1df2..07eba12 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -25,8 +25,6 @@ #cmakedefine CMake_HAVE_CXX_NULLPTR #cmakedefine CMake_HAVE_CXX_OVERRIDE #cmakedefine CMake_HAVE_CXX_UNIQUE_PTR -#cmakedefine CMake_HAVE_CXX_UNORDERED_MAP -#cmakedefine CMake_HAVE_CXX_UNORDERED_SET #define CMAKE_BIN_DIR "/@CMAKE_BIN_DIR@" #define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@" diff --git a/Source/cm_unordered_map.hxx b/Source/cm_unordered_map.hxx index dc8ca35..3a0d88a 100644 --- a/Source/cm_unordered_map.hxx +++ b/Source/cm_unordered_map.hxx @@ -4,22 +4,29 @@ #define CM_UNORDERED_MAP_HXX #include +#include -#if defined(CMake_HAVE_CXX_UNORDERED_MAP) - +#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20080306 || __cplusplus < 201103L) +#include +#else #include -#define CM_UNORDERED_MAP std::unordered_map +#endif -#elif defined(CMAKE_BUILD_WITH_CMAKE) +namespace cm { -#include -#define CM_UNORDERED_MAP cmsys::hash_map +#if (defined(_CPPLIB_VER) && _CPPLIB_VER < 520) ||\ + (defined(__GLIBCXX__) && (__GLIBCXX__ < 20080306 || __cplusplus < 201103L)) + +using namespace std::tr1; #else -#include -#define CM_UNORDERED_MAP std::map +using namespace std; #endif +} // end namespace cm + +#define CM_UNORDERED_MAP cm::unordered_map + #endif diff --git a/Source/cm_unordered_set.hxx b/Source/cm_unordered_set.hxx index ce58dbf..1f66e00 100644 --- a/Source/cm_unordered_set.hxx +++ b/Source/cm_unordered_set.hxx @@ -4,22 +4,29 @@ #define CM_UNORDERED_SET_HXX #include +#include -#if defined(CMake_HAVE_CXX_UNORDERED_SET) - +#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20080306 || __cplusplus < 201103L) +#include +#else #include -#define CM_UNORDERED_SET std::unordered_set +#endif -#elif defined(CMAKE_BUILD_WITH_CMAKE) +namespace cm { -#include -#define CM_UNORDERED_SET cmsys::hash_set +#if (defined(_CPPLIB_VER) && _CPPLIB_VER < 520) ||\ + (defined(__GLIBCXX__) && (__GLIBCXX__ < 20080306 || __cplusplus < 201103L)) + +using namespace std::tr1; #else -#include -#define CM_UNORDERED_SET std::set +using namespace std; #endif +} // end namespace cm + +#define CM_UNORDERED_SET cm::unordered_set + #endif --- S
[CMake] What are the missing features in Ninja that CMake needs?
Hello, Kitware maintains a separate release of Ninja in order to support Fortran: https://github.com/Kitware/ninja I kind of want to ask what Kitware changed, but I probably won't understand the details. Instead, I was hoping someone could give me a toy example of a Fortran program that cannot be compiled without Kitware's changes to Ninja? Today I tried to compare CMake+Ninja with Meson+Ninja and both were able to handle the toy programs that I threw at them. So I haven't found the corner of the parameter space that is fixed by Kitware's patches. Cheers, Daniel. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Ninja+Fortran support for PGI compiler
On 16 December 2016 at 14:38, Brad King <brad.k...@kitware.com> wrote: > On 12/15/2016 09:10 PM, Daniel Carrera wrote: > > set(CMAKE_Fortran_PREPROCESS_SOURCE > > " -Mpreprocess-E > > ") > > > > I added that line to PGI-Fortran.cmake and it seems to work. > > Great! I'll integrate that for CMake 3.8. > > Awesome! Look... I just tested the Oracle compiler. I don't actually use it myself but I have it installed and it also has problems with CMake + Ninja. It looks like the same problem. So again I went to Modules/Compiler but this time I did not see an obvious .cmake file for Oracle. If you want to try to add Oracle to the list of compilers that CMake knows about, this might help: 1) Free download: http://www.oracle.com/technetwork/server-storage/developerstudio/downloads/index.html 2) To identify the compiler, the -V flag should help: $ f90 -V f90: Studio 12.5 Fortran 95 8.8 Linux_i386 2016/05/31 3) This is how you pre-process sources: $ f90 -fpp -F foo.f90 -o output_file Cheers, Daniel. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Ninja+Fortran support for PGI compiler
On 16 December 2016 at 17:18, Bill Hoffman <bill.hoff...@kitware.com> wrote: > On 12/16/2016 8:38 AM, Brad King wrote: > >> Great! I'll integrate that for CMake 3.8. >> > Daniel, do you think you could setup a dashboard so this stays working? > https://cmake.org/testing/ > > -Bill > Ok. I'll try. I need some help with the script: # Client maintainer: m...@mydomain.net set(CTEST_SITE "machine.site") set(CTEST_BUILD_NAME "pgfortran") set(CTEST_BUILD_CONFIGURATION Debug) set(CTEST_CMAKE_GENERATOR "Ninja") include(${CTEST_SCRIPT_DIRECTORY}/cmake_common.cmake) What should I write for "machine.site"? FYI, I will change computer in two months and I will forget to set this up again. You might want to add PGI to your own nightly tests. The PGI "community edition" is free. That's the one I have. https://www.pgroup.com/products/community.htm Cheers, Daniel. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Ninja+Fortran support for PGI compiler (was: Bug in Kitware's release of Ninja when compiling with PGI Fortran)
On 15 December 2016 at 17:35, Brad King <brad.k...@kitware.com> wrote: > > This is not a problem with Ninja or our branch of it, but rather with > CMake's information about the PGI Fortran compiler not being updated > to support the Ninja generator. One can see the value for a few other > compilers (from commit 39ebfc79e614dc395d5ace2ad5818b3ba75ca478): > > ``` > $ git grep -A 1 Fortran_PREPROCESS_SOURCE > Modules/Compiler/GNU-Fortran.cmake:set(CMAKE_Fortran_PREPROCESS_SOURCE > Modules/Compiler/GNU-Fortran.cmake- " -cpp >-E -o ") > -- > Modules/Compiler/Intel-Fortran.cmake:set(CMAKE_Fortran_PREPROCESS_SOURCE > Modules/Compiler/Intel-Fortran.cmake- " -fpp >-E > ") > -- > Modules/Compiler/SunPro-Fortran.cmake:set(CMAKE_Fortran_PREPROCESS_SOURCE > Modules/Compiler/SunPro-Fortran.cmake- " >-F -o ") > ``` > > The `Modules/Compiler/PGI-Fortran.cmake` module needs to be updated too. > I don't have that compiler handy, so if you can figure out the appropriate > line to add to that file, please try it out. If you get it working please > post it and Cc me so it can be integrated. > Ok... keeping in mind that I don't know much about CMake or PGI, this seems to be the correct line: set(CMAKE_Fortran_PREPROCESS_SOURCE " -Mpreprocess-E > ") The PGI documentation says that -Mpreprocess "instructs the compiler to perform cpp-like preprocessing on assembly and Fortran input source files". The -E flag causes the compiler to spit the result to stdout instead of saving it to a file. Since the -E flag behaves as in the Intel compiler, I used copied the stdout redirect ">" from the Intel-Fortran.cmake example. I added that line to PGI-Fortran.cmake and it seems to work. CMake can now make Ninja files for PGI. Cheers, Daniel. -- 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-commits] CMake branch, next, updated. v3.7.1-1727-g6a262ae
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 6a262ae56f4b5522836cde5a5f00baacf05aec56 (commit) via d3046264ae8f48af0e0f8ae8a21722a64d354fd2 (commit) from 45dc7662d8d9ebf0538be9b17459466eb5d744ae (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a262ae56f4b5522836cde5a5f00baacf05aec56 commit 6a262ae56f4b5522836cde5a5f00baacf05aec56 Merge: 45dc766 d304626 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Tue Dec 13 02:15:04 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Tue Dec 13 02:15:04 2016 -0500 Merge topic 'rebuild-lexers' into next d3046264 fixup! Regenerate lexer source code https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3046264ae8f48af0e0f8ae8a21722a64d354fd2 commit d3046264ae8f48af0e0f8ae8a21722a64d354fd2 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Tue Dec 13 08:14:42 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Tue Dec 13 08:14:42 2016 +0100 fixup! Regenerate lexer source code diff --git a/Source/cmListFileLexer.c b/Source/cmListFileLexer.c index ba1e2a3..31faca1 100644 --- a/Source/cmListFileLexer.c +++ b/Source/cmListFileLexer.c @@ -551,6 +551,7 @@ Modify cmListFileLexer.c: - remove blank lines at end of file - #include "cmStandardLexer.h" at the top - add cast in cmListFileLexer_yy_scan_bytes for loop condition of _yybytes_len to size_t + - change type of variable yyl under yy_find_action from yy_size_t to int */ @@ -570,7 +571,7 @@ Modify cmListFileLexer.c: struct cmListFileLexer_s { cmListFileLexer_Token token; - yy_size_t bracket; + int bracket; int comment; int line; int column; @@ -602,7 +603,7 @@ static void cmListFileLexerDestroy(cmListFileLexer* lexer); -#line 605 "cmListFileLexer.c" +#line 606 "cmListFileLexer.c" #define INITIAL 0 #define STRING 1 @@ -859,10 +860,10 @@ YY_DECL } { -#line 79 "cmListFileLexer.in.l" +#line 80 "cmListFileLexer.in.l" -#line 865 "cmListFileLexer.c" +#line 866 "cmListFileLexer.c" while ( /*CONSTCOND*/1 )/* loops until end-of-file is reached */ { @@ -910,7 +911,7 @@ yy_find_action: if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { - yy_size_t yyl; + int yyl; for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) @@ -934,7 +935,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: /* rule 1 can match eol */ YY_RULE_SETUP -#line 81 "cmListFileLexer.in.l" +#line 82 "cmListFileLexer.in.l" { lexer->token.type = cmListFileLexer_Token_Newline; cmListFileLexerSetToken(lexer, yytext, yyleng); @@ -947,7 +948,7 @@ YY_RULE_SETUP case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 90 "cmListFileLexer.in.l" +#line 91 "cmListFileLexer.in.l" { const char* bracket = yytext; lexer->comment = yytext[0] == '#'; @@ -970,7 +971,7 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 110 "cmListFileLexer.in.l" +#line 111 "cmListFileLexer.in.l" { lexer->column += yyleng; BEGIN(COMMENT); @@ -978,14 +979,14 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 115 "cmListFileLexer.in.l" +#line 116 "cmListFileLexer.in.l" { lexer->column += yyleng; } YY_BREAK case 5: YY_RULE_SETUP -#line 119 "cmListFileLexer.in.l" +#line 120 "cmListFileLexer.in.l" { lexer->token.type = cmListFileLexer_Token_ParenLeft; cmListFileLexerSetToken(lexer, yytext, yyleng); @@ -995,7 +996,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 126 "cmListFileLexer.in.l" +#line 127 "cmListFileLexer.in.l" { lexer->token.type = cmListFileLexer_Token_ParenRight; cmListFileLexerSetToken(lexer, yytext, yyleng); @@ -1005,7 +1006,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 133 "cmListFileLexer.in.l" +#line 134 "cmListFileLexer.in.l" { lexer->token.type = cmListFileLexer_Token_Identifier; cmListFileLexerSetToken(lexer, yytext, yyleng); @@ -1015,7 +1016,7 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 140 "cmListFileLexer.in.l" +#line 141 "cmListFileLex
[Cmake-commits] CMake branch, next, updated. v3.7.1-1702-g7554a08
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 7554a08895ec9d2754bf159450126be6f5d5ac15 (commit) via 6881448971ff63c32dd7d380872369afdec9b7b4 (commit) from aaa775916df2d1dbe5e09c91d0238f8271978c7c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7554a08895ec9d2754bf159450126be6f5d5ac15 commit 7554a08895ec9d2754bf159450126be6f5d5ac15 Merge: aaa7759 6881448 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Dec 12 03:05:48 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Dec 12 03:05:48 2016 -0500 Merge topic 'rebuild-lexers' into next 68814489 fixup! Regenerate lexer source code https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6881448971ff63c32dd7d380872369afdec9b7b4 commit 6881448971ff63c32dd7d380872369afdec9b7b4 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Dec 12 09:05:28 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Mon Dec 12 09:05:28 2016 +0100 fixup! Regenerate lexer source code diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h index 1790aae..b9adee5 100644 --- a/Source/cmStandardLexer.h +++ b/Source/cmStandardLexer.h @@ -19,10 +19,12 @@ #pragma warning(disable : 4786) #endif -#if defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 -#if !defined(__INTEL_COMPILER) +#if defined(__GNUC__) && !defined(__INTEL_COMPILER) +#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wsign-compare" +#endif +#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 403 #pragma GCC diagnostic ignored "-Wsign-conversion" #endif #endif --- Summary of changes: Source/cmStandardLexer.h |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.1-1700-gaaa7759
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via aaa775916df2d1dbe5e09c91d0238f8271978c7c (commit) via b046f1f16171e79d4877e96dedd2176a682529f2 (commit) from 19cdfe464bf366f900aea1d6b60b506b96bd850f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aaa775916df2d1dbe5e09c91d0238f8271978c7c commit aaa775916df2d1dbe5e09c91d0238f8271978c7c Merge: 19cdfe4 b046f1f Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Dec 11 15:42:53 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sun Dec 11 15:42:53 2016 -0500 Merge topic 'rebuild-lexers' into next b046f1f1 fixup! Regenerate lexer source code https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b046f1f16171e79d4877e96dedd2176a682529f2 commit b046f1f16171e79d4877e96dedd2176a682529f2 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Dec 11 21:42:24 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Dec 11 21:42:24 2016 +0100 fixup! Regenerate lexer source code diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h index f906e47..1790aae 100644 --- a/Source/cmStandardLexer.h +++ b/Source/cmStandardLexer.h @@ -23,6 +23,7 @@ #if !defined(__INTEL_COMPILER) #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wsign-conversion" #endif #endif --- Summary of changes: Source/cmStandardLexer.h |1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.1-1696-g15fd34c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 15fd34c75455508eb1d7cc95c2ed475b6cc503a1 (commit) via 1d8f0dd7836889944fd491c639e4010e97bc5e84 (commit) from 0cfcc2e3e5b7eb312b82ceddeabf1e696feea2d4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15fd34c75455508eb1d7cc95c2ed475b6cc503a1 commit 15fd34c75455508eb1d7cc95c2ed475b6cc503a1 Merge: 0cfcc2e 1d8f0dd Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Dec 11 15:24:58 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sun Dec 11 15:24:58 2016 -0500 Merge topic 'clang-tidy' into next 1d8f0dd7 fixup! clang-tidy: apply modernize-use-bool-literals fixes https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1d8f0dd7836889944fd491c639e4010e97bc5e84 commit 1d8f0dd7836889944fd491c639e4010e97bc5e84 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Dec 11 21:22:58 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Dec 11 21:22:58 2016 +0100 fixup! clang-tidy: apply modernize-use-bool-literals fixes diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 43b18dd..e70bbfe 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -351,7 +351,8 @@ std::string cmGeneratorExpression::Preprocess(const std::string& input, return stripExportInterface(input, context, resolveRelative); } - assert(!"cmGeneratorExpression::Preprocess called with invalid args"); + assert(false && + "cmGeneratorExpression::Preprocess called with invalid args"); return std::string(); } diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 9623e27..398f95b 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1377,7 +1377,7 @@ cmPolicies::PolicyStatus statusForTarget(cmGeneratorTarget const* tgt, #undef RETURN_POLICY - assert(!"Unreachable code. Not a valid policy"); + assert(false && "Unreachable code. Not a valid policy"); return cmPolicies::WARN; } @@ -1392,7 +1392,7 @@ cmPolicies::PolicyID policyForString(const char* policy_id) #undef RETURN_POLICY_ID - assert(!"Unreachable code. Not a valid policy"); + assert(false && "Unreachable code. Not a valid policy"); return cmPolicies::CMP0002; } diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx index 25a0176..c33349a 100644 --- a/Source/cmGeneratorExpressionParser.cxx +++ b/Source/cmGeneratorExpressionParser.cxx @@ -242,11 +242,11 @@ void cmGeneratorExpressionParser::ParseContent( if (this->NestingLevel == 0) { extendText(result, this->it); } else { -assert(!"Got unexpected syntax token."); +assert(false && "Got unexpected syntax token."); } assert(this->it != this->Tokens.end()); ++this->it; return; } - assert(!"Unhandled token in generator expression."); + assert(false && "Unhandled token in generator expression."); } diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ccd3bfa..b6db0d6 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3389,7 +3389,8 @@ const char* getLinkInterfaceDependentProperty(cmGeneratorTarget const* tgt, { switch (t) { case BoolType: - assert(!"String compatibility check function called for boolean"); + assert(false && + "String compatibility check function called for boolean"); return CM_NULLPTR; case StringType: return tgt->GetLinkInterfaceDependentStringProperty(prop, config); @@ -3398,7 +3399,7 @@ const char* getLinkInterfaceDependentProperty(cmGeneratorTarget const* tgt, case NumberMaxType: return tgt->GetLinkInterfaceDependentNumberMaxProperty(prop, config); } - assert(!"Unreachable!"); + assert(false && "Unreachable!"); return CM_NULLPTR; } @@ -3589,7 +3590,7 @@ std::string compatibilityType(CompatibleType t) case NumberMinType: return "Numeric minimum compatibility"; } - assert(!"Unreachable!"); + assert(false && "Unreachable!"); return ""; } @@ -3603,7 +3604,7 @@ std::string compatibilityAgree(CompatibleType t, bool dominant) c
[Cmake-commits] CMake branch, next, updated. v3.7.1-1694-g0cfcc2e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 0cfcc2e3e5b7eb312b82ceddeabf1e696feea2d4 (commit) via a6e932533da73b906508e42840c665b89955fb00 (commit) from 22492e41fbc94575cf126d9f3bde083da9b8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0cfcc2e3e5b7eb312b82ceddeabf1e696feea2d4 commit 0cfcc2e3e5b7eb312b82ceddeabf1e696feea2d4 Merge: 22492e4 a6e9325 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Dec 11 03:14:44 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sun Dec 11 03:14:44 2016 -0500 Merge topic 'clang-tidy' into next a6e93253 fixup! clang-tidy: apply performance-unnecessary-value-param fixes https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6e932533da73b906508e42840c665b89955fb00 commit a6e932533da73b906508e42840c665b89955fb00 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Dec 11 09:14:23 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Dec 11 09:14:23 2016 +0100 fixup! clang-tidy: apply performance-unnecessary-value-param fixes diff --git a/Source/cmProcessOutput.cxx b/Source/cmProcessOutput.cxx index e2ba58d..617e1ca 100644 --- a/Source/cmProcessOutput.cxx +++ b/Source/cmProcessOutput.cxx @@ -52,12 +52,16 @@ cmProcessOutput::~cmProcessOutput() { } -bool cmProcessOutput::DecodeText(std::string const& raw, std::string& decoded, +bool cmProcessOutput::DecodeText(std::string raw, std::string& decoded, size_t id) { +#if !defined(_WIN32) + static_cast(id); + decoded.swap(raw); + return true; +#else bool success = true; decoded = raw; -#if defined(_WIN32) if (id > 0) { if (rawparts.size() < id) { rawparts.reserve(id); @@ -114,10 +118,8 @@ bool cmProcessOutput::DecodeText(std::string const& raw, std::string& decoded, success = DoDecodeText(raw, decoded, NULL); } } -#else - static_cast(id); -#endif return success; +#endif } bool cmProcessOutput::DecodeText(const char* data, size_t length, diff --git a/Source/cmProcessOutput.h b/Source/cmProcessOutput.h index 0ea8aa1..d2e631f 100644 --- a/Source/cmProcessOutput.h +++ b/Source/cmProcessOutput.h @@ -57,7 +57,7 @@ public: * keep incomplete characters in separate buffers for each stream. * \return true if successfully decoded \a raw to \a decoded or false if not. */ - bool DecodeText(std::string const& raw, std::string& decoded, size_t id = 0); + bool DecodeText(std::string raw, std::string& decoded, size_t id = 0); /** * Decode \a data with \a length from external encoding to internal * encoding in \a decoded. --- Summary of changes: Source/cmProcessOutput.cxx | 12 +++- Source/cmProcessOutput.h |2 +- 2 files changed, 8 insertions(+), 6 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.1-1692-g22492e4
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 22492e41fbc94575cf126d9f3bde083da9b8 (commit) via 172e77380b8b4b012069eadb43b6156c4201e6a0 (commit) from 2e29d71c33f54eb84b1fae5bbb3c362b4f994f29 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22492e41fbc94575cf126d9f3bde083da9b8 commit 22492e41fbc94575cf126d9f3bde083da9b8 Merge: 2e29d71 172e773 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Dec 10 12:49:45 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sat Dec 10 12:49:45 2016 -0500 Merge topic 'clang-tidy' into next 172e7738 fixup! clang-tidy: apply misc-suspicious-string-compare fixes https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=172e77380b8b4b012069eadb43b6156c4201e6a0 commit 172e77380b8b4b012069eadb43b6156c4201e6a0 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Dec 10 18:49:29 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Dec 10 18:49:29 2016 +0100 fixup! clang-tidy: apply misc-suspicious-string-compare fixes diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index a208509..f12c9e8 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -810,9 +810,7 @@ void cmCoreTryCompile::CleanupFiles(const char* binDir) for (unsigned long i = 0; i < dir.GetNumberOfFiles(); ++i) { const char* fileName = dir.GetFile(i); if (strcmp(fileName, ".") != 0 && strcmp(fileName, "..") != 0) { - std::pair<std::set::iterator, bool> const inserted = -deletedFiles.insert(fileName); - if (inserted.second) { + if (deletedFiles.insert(fileName).second) { std::string const fullPath = std::string(binDir).append("/").append(fileName); if (cmSystemTools::FileIsDirectory(fullPath)) { --- Summary of changes: Source/cmCoreTryCompile.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.1-1685-g977cfef
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 977cfef6f69e51639b9d7206667adff4b1154095 (commit) via fa07c5135990639b2cb4f382c085d0cb89592e70 (commit) via a1a00f9f5553d9fca6b99de6679a961f9538a45d (commit) via 3557e49685fb5b58f05c25d13ffcca5f4a2eff47 (commit) via 38041d5268571762738be3e99da5c1fd13e27cde (commit) via 65f5d303534c4705accc0a3f38cf845ee6b7823f (commit) via 3e6039ec93e6ba5d8d311b5480dd075bf110908b (commit) via 50cd2d8567409ac6bf371c245eae6bd0b904ed12 (commit) via 308f37c6da621016d9cb5da49c50fa6c1ff9005c (commit) via b88843d651dc2c500af13c1fe882b389c4949b04 (commit) from 09752e9d1a58132bf439eb5e82df125ad8d60c0e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=977cfef6f69e51639b9d7206667adff4b1154095 commit 977cfef6f69e51639b9d7206667adff4b1154095 Merge: 09752e9 fa07c51 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Dec 10 11:08:23 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sat Dec 10 11:08:23 2016 -0500 Merge topic 'clang-tidy' into next fa07c513 clang-tidy: apply misc-redundant-expression fixes a1a00f9f clang-tidy: apply misc-suspicious-string-compare fixes 3557e496 clang-tidy: apply readability-static-definition-in-anonymous-namespace fixes 38041d52 clang-tidy: apply readability-redundant-control-flow fixes 65f5d303 clang-tidy: apply modernize-use-bool-literals fixes 3e6039ec clang-tidy: apply readability-redundant-string-init fixes 50cd2d85 clang-tidy: apply performance-faster-string-find fixes 308f37c6 clang-tidy: apply performance-unnecessary-value-param fixes b88843d6 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa07c5135990639b2cb4f382c085d0cb89592e70 commit fa07c5135990639b2cb4f382c085d0cb89592e70 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Dec 10 16:55:49 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Dec 10 16:55:49 2016 +0100 clang-tidy: apply misc-redundant-expression fixes diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index fbc94cc..5c45fe5 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -119,10 +119,9 @@ void cmCTestRunTest::CompressOutput() strm.next_out = out; ret = deflate(, Z_FINISH); - if (ret == Z_STREAM_ERROR || ret != Z_STREAM_END) { + if (ret != Z_STREAM_END) { cmCTestLog(this->CTest, ERROR_MESSAGE, - "Error during output " - "compression. Sending uncompressed output." + "Error during output compression. Sending uncompressed output." << std::endl); delete[] out; return; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index dfec0fb..559275e 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2787,7 +2787,7 @@ bool cmCTest::CompressString(std::string& str) strm.next_out = [0]; ret = deflate(, Z_FINISH); - if (ret == Z_STREAM_ERROR || ret != Z_STREAM_END) { + if (ret != Z_STREAM_END) { cmCTestLog(this, ERROR_MESSAGE, "Error during gzip compression." << std::endl); return false; diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx index 21a5209..0018263 100644 --- a/Source/cmDocumentationFormatter.cxx +++ b/Source/cmDocumentationFormatter.cxx @@ -156,7 +156,7 @@ void cmDocumentationFormatter::PrintColumn(std::ostream& os, const char* text) // Move to beginning of next word. Skip over whitespace. l = r; -while (*l && (*l == ' ')) { +while (*l == ' ') { ++l; } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1a00f9f5553d9fca6b99de6679a961f9538a45d commit a1a00f9f5553d9fca6b99de6679a961f9538a45d Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Dec 10 16:49:34 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Dec 10 16:49:34 2016 +0100 clang-tidy: apply misc-suspicious-string-compare fixes diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index 2c9ca63..1940953 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -597,13 +597,11 @@ bool cmCPackNSISGenerator::GetListOfSubdirectories( { cmsys::Directory dir; dir.Load(topdir); - size_t fileNum; - for (fileNum = 0; file
[Cmake-commits] CMake branch, next, updated. v3.7.1-1675-g09752e9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 09752e9d1a58132bf439eb5e82df125ad8d60c0e (commit) via 471e3ff8ee3854dc6f2b507cb09f9dc7f088284e (commit) from 6573bc3cfb0a24e091c9fc544a43d51064bb78b1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=09752e9d1a58132bf439eb5e82df125ad8d60c0e commit 09752e9d1a58132bf439eb5e82df125ad8d60c0e Merge: 6573bc3 471e3ff Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Dec 10 05:43:12 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sat Dec 10 05:43:12 2016 -0500 Merge topic 'rebuild-lexers' into next 471e3ff8 fixup! Regenerate lexer source code https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=471e3ff8ee3854dc6f2b507cb09f9dc7f088284e commit 471e3ff8ee3854dc6f2b507cb09f9dc7f088284e Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Dec 10 10:54:26 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Dec 10 11:39:26 2016 +0100 fixup! Regenerate lexer source code diff --git a/Source/cmCommandArgumentLexer.cxx b/Source/cmCommandArgumentLexer.cxx index 22ddb90..12dce37 100644 --- a/Source/cmCommandArgumentLexer.cxx +++ b/Source/cmCommandArgumentLexer.cxx @@ -462,9 +462,12 @@ Modify cmCommandArgumentLexer.cxx: - remove trailing whitespace: sed -i 's/\s*$//' cmCommandArgumentLexer.h cmCommandArgumentLexer.cxx - remove blank lines at end of file - #include "cmStandardLexer.h" at the top + - add cast in cmCommandArgument_yy_scan_bytes for loop condition of _yybytes_len to size_t */ +/* IWYU pragma: no_forward_declare yyguts_t */ + #include "cmCommandArgumentParserHelper.h" /* Replace the lexer input function. */ @@ -478,7 +481,7 @@ Modify cmCommandArgumentLexer.cxx: /*--*/ -#line 481 "cmCommandArgumentLexer.cxx" +#line 484 "cmCommandArgumentLexer.cxx" #define INITIAL 0 #define ESCAPES 1 @@ -731,10 +734,10 @@ YY_DECL } { -#line 39 "cmCommandArgumentLexer.in.l" +#line 42 "cmCommandArgumentLexer.in.l" -#line 737 "cmCommandArgumentLexer.cxx" +#line 740 "cmCommandArgumentLexer.cxx" while ( /*CONSTCOND*/1 )/* loops until end-of-file is reached */ { @@ -793,7 +796,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 41 "cmCommandArgumentLexer.in.l" +#line 44 "cmCommandArgumentLexer.in.l" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); @@ -802,7 +805,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 47 "cmCommandArgumentLexer.in.l" +#line 50 "cmCommandArgumentLexer.in.l" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); @@ -811,7 +814,7 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 53 "cmCommandArgumentLexer.in.l" +#line 56 "cmCommandArgumentLexer.in.l" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); @@ -820,7 +823,7 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 59 "cmCommandArgumentLexer.in.l" +#line 62 "cmCommandArgumentLexer.in.l" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); @@ -830,7 +833,7 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 66 "cmCommandArgumentLexer.in.l" +#line 69 "cmCommandArgumentLexer.in.l" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); @@ -840,7 +843,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 73 "cmCommandArgumentLexer.in.l" +#line 76 "cmCommandArgumentLexer.in.l" { //std::cerr << __LINE__ << " here: [" << yytext <<
[Cmake-commits] CMake branch, next, updated. v3.7.1-1673-g6573bc3
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 6573bc3cfb0a24e091c9fc544a43d51064bb78b1 (commit) via 3d840e4da4fcd1b57036d0906b014643d4cbcbf7 (commit) from 8ea54462c97909a798b406b0eebb6cd1a703004f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6573bc3cfb0a24e091c9fc544a43d51064bb78b1 commit 6573bc3cfb0a24e091c9fc544a43d51064bb78b1 Merge: 8ea5446 3d840e4 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Dec 9 16:09:00 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Dec 9 16:09:00 2016 -0500 Merge topic 'rebuild-lexers' into next 3d840e4d fixup! Regenerate lexer source code https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d840e4da4fcd1b57036d0906b014643d4cbcbf7 commit 3d840e4da4fcd1b57036d0906b014643d4cbcbf7 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Dec 9 21:57:43 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Dec 9 22:07:30 2016 +0100 fixup! Regenerate lexer source code diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 07a9fdb..fa2fbe3 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -83,6 +83,10 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning: Value stored to 'yytoken' is never read" "index_encoder.c.241.2. warning: Value stored to .out_start. is never read" "index.c.*warning: Access to field.*results in a dereference of a null pointer.*loaded from variable.*" + "cmCommandArgumentLexer.cxx:[0-9]+:[0-9]+: warning: Call to 'realloc' has an allocation size of 0 bytes" + "cmDependsJavaLexer.cxx:[0-9]+:[0-9]+: warning: Call to 'realloc' has an allocation size of 0 bytes" + "cmExprLexer.cxx:[0-9]+:[0-9]+: warning: Call to 'realloc' has an allocation size of 0 bytes" + "cmListFileLexer.c:[0-9]+:[0-9]+: warning: Call to 'realloc' has an allocation size of 0 bytes" "cmFortranLexer.cxx:[0-9]+:[0-9]+: warning: Call to 'realloc' has an allocation size of 0 bytes" "testProcess.*warning: Dereference of null pointer .loaded from variable .invalidAddress.." "liblzma/simple/x86.c:[0-9]+:[0-9]+: warning: The result of the '<<' expression is undefined" diff --git a/Source/cmCommandArgumentLexer.cxx b/Source/cmCommandArgumentLexer.cxx index bf8f350..22ddb90 100644 --- a/Source/cmCommandArgumentLexer.cxx +++ b/Source/cmCommandArgumentLexer.cxx @@ -462,7 +462,6 @@ Modify cmCommandArgumentLexer.cxx: - remove trailing whitespace: sed -i 's/\s*$//' cmCommandArgumentLexer.h cmCommandArgumentLexer.cxx - remove blank lines at end of file - #include "cmStandardLexer.h" at the top - - change type of variable i in cmCommandArgument_yy_scan_bytes from yy_size_t to int */ @@ -479,7 +478,7 @@ Modify cmCommandArgumentLexer.cxx: /*--*/ -#line 482 "cmCommandArgumentLexer.cxx" +#line 481 "cmCommandArgumentLexer.cxx" #define INITIAL 0 #define ESCAPES 1 @@ -732,10 +731,10 @@ YY_DECL } { -#line 40 "cmCommandArgumentLexer.in.l" +#line 39 "cmCommandArgumentLexer.in.l" -#line 738 "cmCommandArgumentLexer.cxx" +#line 737 "cmCommandArgumentLexer.cxx" while ( /*CONSTCOND*/1 )/* loops until end-of-file is reached */ { @@ -794,7 +793,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 42 "cmCommandArgumentLexer.in.l" +#line 41 "cmCommandArgumentLexer.in.l" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); @@ -803,7 +802,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 48 "cmCommandArgumentLexer.in.l" +#line 47 "cmCommandArgumentLexer.in.l" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); @@ -812,7 +811,7 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 54 "cmCommandArgumentLexer.in.l" +#line 53 "cmCommandArgumentLexer.in.l" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << s
[Cmake-commits] CMake branch, next, updated. v3.7.1-1656-gf4a9406
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via f4a9406513d4c0f1bdc825325e3691ab83fc6b7b (commit) via 5f457173b1c2fce6a6a8cb2c41ee34c750b07216 (commit) from 2170072ec502d612f62746e9ed1c960dec5fd714 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f4a9406513d4c0f1bdc825325e3691ab83fc6b7b commit f4a9406513d4c0f1bdc825325e3691ab83fc6b7b Merge: 2170072 5f45717 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Thu Dec 8 19:51:53 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Dec 8 19:51:53 2016 -0500 Merge topic 'rebuild-lexers' into next 5f457173 fixup! Regenerate lexer source code https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5f457173b1c2fce6a6a8cb2c41ee34c750b07216 commit 5f457173b1c2fce6a6a8cb2c41ee34c750b07216 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Dec 9 01:50:40 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Dec 9 01:50:40 2016 +0100 fixup! Regenerate lexer source code diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx index 9261302..33a9662 100644 --- a/Source/cmExprLexer.cxx +++ b/Source/cmExprLexer.cxx @@ -1,3 +1,4 @@ +#include "cmStandardLexer.h" #line 2 "cmExprLexer.cxx" #line 4 "cmExprLexer.cxx" --- Summary of changes: Source/cmExprLexer.cxx |1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.1-1491-g3bd5d24
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 3bd5d24975e984b7df2c55855aacaaa291ca35d1 (commit) via 1af67b199a048ed8f02f3b7090ad7d9fdae3e558 (commit) via c45b767a8c2120ba61b9fafa31d8db37a919d62a (commit) from f4d8b9d6db329e27d4bdcf07859649bb43fe7214 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3bd5d24975e984b7df2c55855aacaaa291ca35d1 commit 3bd5d24975e984b7df2c55855aacaaa291ca35d1 Merge: f4d8b9d 1af67b1 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Dec 3 09:03:01 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sat Dec 3 09:03:01 2016 -0500 Merge topic 'test-handler-multimap' into next 1af67b19 cmCTestTestHandler: use multimap c45b767a CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1af67b199a048ed8f02f3b7090ad7d9fdae3e558 commit 1af67b199a048ed8f02f3b7090ad7d9fdae3e558 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Tue Nov 29 23:36:54 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Dec 3 14:54:52 2016 +0100 cmCTestTestHandler: use multimap diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index ab43dbc..68f9a54 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -797,8 +797,9 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const // Prepare some maps to help us find setup and cleanup tests for // any given fixture - typedef std::set TestIteratorSet; - typedef std::map<std::string, TestIteratorSet> FixtureDependencies; + typedef ListOfTests::const_iterator TestIterator; + typedef std::multimap<std::string, TestIterator> FixtureDependencies; + typedef FixtureDependencies::const_iterator FixtureDepsIterator; FixtureDependencies fixtureSetups; FixtureDependencies fixtureDeps; @@ -809,14 +810,14 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const const std::set& setups = p.FixturesSetup; for (std::set::const_iterator depsIt = setups.begin(); depsIt != setups.end(); ++depsIt) { - fixtureSetups[*depsIt].insert(it); - fixtureDeps[*depsIt].insert(it); + fixtureSetups.insert(std::make_pair(*depsIt, it)); + fixtureDeps.insert(std::make_pair(*depsIt, it)); } const std::set& cleanups = p.FixturesCleanup; for (std::set::const_iterator depsIt = cleanups.begin(); depsIt != cleanups.end(); ++depsIt) { - fixtureDeps[*depsIt].insert(it); + fixtureDeps.insert(std::make_pair(*depsIt, it)); } } @@ -859,17 +860,15 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const // associated with the required fixture. If any of those setup // tests fail, this test should not run. We make the fixture's // cleanup tests depend on this test case later. - FixtureDependencies::const_iterator setupIt = -fixtureSetups.find(requiredFixtureName); - if (setupIt != fixtureSetups.end()) { -for (TestIteratorSet::const_iterator sIt = setupIt->second.begin(); - sIt != setupIt->second.end(); ++sIt) { - const std::string& setupTestName = (**sIt).Name; - tests[i].RequireSuccessDepends.insert(setupTestName); - if (std::find(tests[i].Depends.begin(), tests[i].Depends.end(), -setupTestName) == tests[i].Depends.end()) { -tests[i].Depends.push_back(setupTestName); - } + std::pair<FixtureDepsIterator, FixtureDepsIterator> setupRange = +fixtureSetups.equal_range(requiredFixtureName); + for (FixtureDepsIterator sIt = setupRange.first; + sIt != setupRange.second; ++sIt) { +const std::string& setupTestName = sIt->second->Name; +tests[i].RequireSuccessDepends.insert(setupTestName); +if (std::find(tests[i].Depends.begin(), tests[i].Depends.end(), + setupTestName) == tests[i].Depends.end()) { + tests[i].Depends.push_back(setupTestName); } } @@ -882,17 +881,11 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const // Already added this fixture continue; } - FixtureDependencies::const_iterator fixtureIt = -fixtureDeps.find(requiredFixtureName); - if (fixtureIt == fixtureDeps.end()) { -// No setup or cleanup tests for this fixture -continue; -
Re: [cmake-developers] Fwd: cmVisualStudio10TargetGenerator should not generate a rule for an ImportLibrary for executables
On Mon, Nov 28, 2016 at 2:41 PM, Lode Leroywrote: > Please consider the following patch for inclusion in cmake. > > The problem is that when a project contains a FOO.DLL and a FOO.EXE, > the cmake generator tries to build FOO.LIB for both. > The FOO.EXE does not need a FOO.LIB. > > $ diff -urp CMake-3.7.0-orig/ CMake-3.7.0 > Only in CMake-3.7.0: build > diff -urp CMake-3.7.0-orig/Source/cmVisualStudio10TargetGenerator.cxx > CMake-3.7.0/Source/cmVisualStudio10TargetGenerator.cxx > --- CMake-3.7.0-orig/Source/cmVisualStudio10TargetGenerator.cxx > 2016-11-11 15:24:18.0 +0100 > +++ CMake-3.7.0/Source/cmVisualStudio10TargetGenerator.cxx > 2016-11-28 14:28:26.344898900 +0100 > @@ -2310,7 +2310,9 @@ bool cmVisualStudio10TargetGenerator::Co > imLib += "/"; > imLib += targetNameImport; > > -linkOptions.AddFlag("ImportLibrary", imLib.c_str()); > +if (this->GeneratorTarget->GetType() != cmState::EXECUTABLE) { > +linkOptions.AddFlag("ImportLibrary", imLib.c_str()); > +} > linkOptions.AddFlag("ProgramDataBaseFile", pdb.c_str()); > > // A Windows Runtime component uses internal .NET metadata, > -- > > I am no windows expert, but I think the import library is required when you want to link against the executable. Please see https://cmake.org/cmake/help/v3.7/prop_tgt/ENABLE_EXPORTS.html -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Questions about C++ version and third party libraries
On Sat, Nov 26, 2016 at 11:17 AM, mateusz janekwrote: > Hello CMake community, > > First of all, I want to say "Hello" to everyone, I am new to the CMake > developers community. > Hello and welcome! > I have some questions about developing rules, before I'll start to write > the code: > -In which version of C++ is CMake written? > CMake can still be built with Visual Studio 2008. It is mostly written in C++98 but built with C++14 where possible. We use some abstractions like CM_NULLPTR or CM_OVERRIDE. The parts for the language server are written in C++14. -Am I right that it is forbidden to use third party libraries? > CMake uses several third party libraries. Have a look at the Utilities directory. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[Cmake-commits] CMake branch, next, updated. v3.7.0-1329-g250c3b9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 250c3b994e4057baaa713288697cb29eda59de25 (commit) via 52834ffc22f87b634c194f75966b52793696e825 (commit) from 39707fbe51f914b538aabfa6f02852009f24d370 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=250c3b994e4057baaa713288697cb29eda59de25 commit 250c3b994e4057baaa713288697cb29eda59de25 Merge: 39707fb 52834ff Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Nov 25 18:22:25 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Nov 25 18:22:25 2016 -0500 Merge topic 'include-what-you-use' into next 52834ffc Fixup! iwyu: Fix more findings https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52834ffc22f87b634c194f75966b52793696e825 commit 52834ffc22f87b634c194f75966b52793696e825 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Nov 26 00:22:11 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Nov 26 00:22:11 2016 +0100 Fixup! iwyu: Fix more findings diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 9c5c862..2f6238b 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -4,7 +4,6 @@ #include #include -#include #include #include #include --- Summary of changes: Source/cmFileCommand.cxx |1 - 1 file changed, 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.0-1327-g39707fb
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 39707fbe51f914b538aabfa6f02852009f24d370 (commit) via 153be68ff49b80eef0558c3cde89e3cd7e4d9856 (commit) via 807a2e02ca64ddd34788d9724867e38df5d8e701 (commit) via 9527fc332a8a74d5dd27d16af122b89cc3a394ef (commit) via aeff60e44c203dd67b316a6c6eab1454a408e1f7 (commit) from 86d0d04211c1102be5449a18825aec645c7b6942 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=39707fbe51f914b538aabfa6f02852009f24d370 commit 39707fbe51f914b538aabfa6f02852009f24d370 Merge: 86d0d04 153be68 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Nov 25 18:07:06 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Nov 25 18:07:06 2016 -0500 Merge topic 'include-what-you-use' into next 153be68f avoid including cmStandardIncludes.h 807a2e02 iwyu: Fix VisualStudio specific issues 9527fc33 iwyu: Fix more findings aeff60e4 iwyu: Fix OSX specific issues https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=153be68ff49b80eef0558c3cde89e3cd7e4d9856 commit 153be68ff49b80eef0558c3cde89e3cd7e4d9856 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Nov 25 23:21:20 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Nov 25 23:31:51 2016 +0100 avoid including cmStandardIncludes.h diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 0c4f573..2bccf2e 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -4,6 +4,7 @@ #include #include +#include #include #include #include diff --git a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h index b535979..a3c8394 100644 --- a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h +++ b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h @@ -5,9 +5,8 @@ #include -#include "cmStandardIncludes.h" - #include +#include /** \class cmWIXRichtTextFormatWriter * \brief Helper class to generate Rich Text Format (RTF) documents diff --git a/Source/cmGhsMultiGpj.h b/Source/cmGhsMultiGpj.h index 793d471..2c2b123 100644 --- a/Source/cmGhsMultiGpj.h +++ b/Source/cmGhsMultiGpj.h @@ -5,8 +5,6 @@ #include -#include "cmStandardIncludes.h" - class cmGeneratedFileStream; class GhsMultiGpj diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 6bbfed5..286f375 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -2,14 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalGhsMultiGenerator.h" +#include + +#include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGhsMultiTargetGenerator.h" #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" #include "cmVersion.h" -#include -#include const char* cmGlobalGhsMultiGenerator::FILE_EXTENSION = ".gpj"; const char* cmGlobalGhsMultiGenerator::DEFAULT_MAKE_PROGRAM = "gbuild"; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=807a2e02ca64ddd34788d9724867e38df5d8e701 commit 807a2e02ca64ddd34788d9724867e38df5d8e701 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Nov 25 22:54:58 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Nov 25 23:31:51 2016 +0100 iwyu: Fix VisualStudio specific issues diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx index db97c47..eded883 100644 --- a/Source/bindexplib.cxx +++ b/Source/bindexplib.cxx @@ -62,11 +62,10 @@ *-- */ #include "bindexplib.h" + #include #include #include -#include -#include #include typedef struct cmANON_OBJECT_HEADER_BIGOBJ { diff --git a/Source/bindexplib.h b/Source/bindexplib.h index 1a0c3a3..d6900ba 100644 --- a/Source/bindexplib.h +++ b/Source/bindexplib.h @@ -5,8 +5,9 @@ #include -#include "cmStandardIncludes.h" - +#include +#include +#include class bindexplib { diff --git a/Source/cmCallVisualStudioMacro.cxx b/Source/cmCallVisualStudioMacro.cxx index a21a7d2..99fe587 100644 --- a/Source/cmCallVisualStudioMacro.cxx +++ b/Source/cmCallVisualStudioMacro.cxx @@ -2,6 +2,8 @@
Re: [cmake-developers] improved CodeBlocks group support
On Mon, Nov 21, 2016 at 4:21 PM, Tobias Hungerwrote: > Hi Tim, > > Am 21.11.2016 01:19 schrieb "tim cotter" : > > > > i've patched my local cmake to automatically add a virtual folder group > option for every file in a code blocks project. > > > > it's not proper support for cmake source groups. > > but it does what i want it to do. > > > > the patch is small. > > > > would the community be interested in such a thing? > > Have you tested this with the IDEs that user this extra generator? > CodeBlocks and QtCreator are the ones I know to be using this. > > > if so, how would i go about submitting it? > > If you can create a merge request at gitlab.kitware.com, then that would > be the best option. Not sure you can get an account there (that is able to > create merge requests). > https://gitlab.kitware.com/cmake/cmake/blob/master/CONTRIBUTING.rst -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc3-948-g2a71480
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 2a71480fa93b4c8bdb6485c1a78a9cd01f050791 (commit) via 7719d01d2925429be2ee4f742cbce81c5c5e1044 (commit) from f2f7d5af951cdca95bd245838d5f24fea85a92cf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a71480fa93b4c8bdb6485c1a78a9cd01f050791 commit 2a71480fa93b4c8bdb6485c1a78a9cd01f050791 Merge: f2f7d5a 7719d01 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Nov 7 14:07:05 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Nov 7 14:07:05 2016 -0500 Merge topic 'include-what-you-use' into next 7719d01d Fixup! Fix several include-what-you-use findings https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7719d01d2925429be2ee4f742cbce81c5c5e1044 commit 7719d01d2925429be2ee4f742cbce81c5c5e1044 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Nov 7 20:06:10 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Mon Nov 7 20:06:10 2016 +0100 Fixup! Fix several include-what-you-use findings diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 1bade57..afff0f3 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -20,6 +20,7 @@ #undef GetCurrentDirectory #include +#include #include // include sys/stat.h after sys/types.h --- Summary of changes: Source/cmFileCommand.cxx |1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc3-946-gf2f7d5a
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via f2f7d5af951cdca95bd245838d5f24fea85a92cf (commit) via 6086ab4f5cdfc87fa2bdac95ecf83c6d3677e5f2 (commit) from 0c32230ce5fd27d4a2515c7194df00b3c36b532d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2f7d5af951cdca95bd245838d5f24fea85a92cf commit f2f7d5af951cdca95bd245838d5f24fea85a92cf Merge: 0c32230 6086ab4 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Nov 7 03:02:47 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Nov 7 03:02:47 2016 -0500 Merge topic 'include-what-you-use' into next 6086ab4f Fixup! Fix several include-what-you-use findings https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6086ab4f5cdfc87fa2bdac95ecf83c6d3677e5f2 commit 6086ab4f5cdfc87fa2bdac95ecf83c6d3677e5f2 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Nov 7 09:00:32 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Mon Nov 7 09:00:32 2016 +0100 Fixup! Fix several include-what-you-use findings diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx index cf6cb1b..c6288a5 100644 --- a/Source/cmStateSnapshot.cxx +++ b/Source/cmStateSnapshot.cxx @@ -18,6 +18,10 @@ #include "cmVersion.h" #include "cmake.h" +#if defined(__CYGWIN__) +#include "cmSystemTools.h" +#endif + cmStateSnapshot::cmStateSnapshot(cmState* state) : State(state) , Position() --- Summary of changes: Source/cmStateSnapshot.cxx |4 1 file changed, 4 insertions(+) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc3-944-g0c32230
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 0c32230ce5fd27d4a2515c7194df00b3c36b532d (commit) via 0721d07ec934eb7a6049c2fd9d3b7f5e25707772 (commit) from 998cbca769bb7cedf28bd1d77c51b0de63f1913c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c32230ce5fd27d4a2515c7194df00b3c36b532d commit 0c32230ce5fd27d4a2515c7194df00b3c36b532d Merge: 998cbca 0721d07 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Nov 6 02:45:27 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sun Nov 6 02:45:27 2016 -0500 Merge topic 'include-what-you-use' into next 0721d07e Fixup! Fix several include-what-you-use findings https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0721d07ec934eb7a6049c2fd9d3b7f5e25707772 commit 0721d07ec934eb7a6049c2fd9d3b7f5e25707772 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Nov 6 08:45:03 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Nov 6 08:45:03 2016 +0100 Fixup! Fix several include-what-you-use findings diff --git a/Source/cmGeneratorExpressionEvaluationFile.h b/Source/cmGeneratorExpressionEvaluationFile.h index d597270..26135df 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.h +++ b/Source/cmGeneratorExpressionEvaluationFile.h @@ -5,14 +5,19 @@ #include // IWYU pragma: keep -#include "cmGeneratorExpression.h" - -#include #include #include -#include #include +#include "cmGeneratorExpression.h" +#include "cm_auto_ptr.hxx" + +#if defined(_MSC_VER) +typedef unsigned short mode_t; +#else +#include +#endif + class cmLocalGenerator; class cmGeneratorExpressionEvaluationFile diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 9817a3c..0801f26 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -11,6 +11,12 @@ #include #include +#if defined(_MSC_VER) +typedef unsigned short mode_t; +#else +#include +#endif + class cmSystemToolsFileTime; /** \class cmSystemTools --- Summary of changes: Source/cmGeneratorExpressionEvaluationFile.h | 13 + Source/cmSystemTools.h |6 ++ 2 files changed, 15 insertions(+), 4 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc3-942-g998cbca
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 998cbca769bb7cedf28bd1d77c51b0de63f1913c (commit) via 0cd654c8e23b19311bae876ada4ad5b432c1ad1b (commit) from 2c62af2d4bc7c5f1d66869b49da138f76586c155 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=998cbca769bb7cedf28bd1d77c51b0de63f1913c commit 998cbca769bb7cedf28bd1d77c51b0de63f1913c Merge: 2c62af2 0cd654c Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Nov 5 19:12:03 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sat Nov 5 19:12:03 2016 -0400 Merge topic 'clang-tidy' into next 0cd654c8 cmGeneratorTarget: Correctly set FortranModuleDirectoryCreated https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0cd654c8e23b19311bae876ada4ad5b432c1ad1b commit 0cd654c8e23b19311bae876ada4ad5b432c1ad1b Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Nov 6 00:11:03 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Nov 6 00:11:03 2016 +0100 cmGeneratorTarget: Correctly set FortranModuleDirectoryCreated diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ca3e373..f5db7f6 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3947,6 +3947,7 @@ std::string cmGeneratorTarget::GetFortranModuleDirectory( if (!this->FortranModuleDirectoryCreated) { this->FortranModuleDirectory = this->CreateFortranModuleDirectory(working_dir); +this->FortranModuleDirectoryCreated = true; } return this->FortranModuleDirectory; --- Summary of changes: Source/cmGeneratorTarget.cxx |1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc3-940-g2c62af2
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 2c62af2d4bc7c5f1d66869b49da138f76586c155 (commit) via bac93dcf192d8680cd72570682d6593da9818088 (commit) via 1e994985d83b09d71b4928a61a75d1cf3861aaec (commit) via 5ae3966d75593b05a9658af8d2fdd47c2bf48a4d (commit) via 443180fb9915eefe0b232875505632ffb9fabb95 (commit) from 6dacf55a79b849ccefb468166d012686b1ed3a18 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c62af2d4bc7c5f1d66869b49da138f76586c155 commit 2c62af2d4bc7c5f1d66869b49da138f76586c155 Merge: 6dacf55 bac93dc Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Nov 5 18:56:12 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sat Nov 5 18:56:12 2016 -0400 Merge topic 'clang-tidy' into next bac93dcf cmGeneratorTarget: Don't assing a bool to a string 1e994985 cmGlobalNinjaGenerator: Suppress clang-tidy warning 5ae3966d cmCTestSubmitHandler: Remove redundant c_str() 443180fb cmCPluginAPI: Fix clang-tidy findings https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bac93dcf192d8680cd72570682d6593da9818088 commit bac93dcf192d8680cd72570682d6593da9818088 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Nov 5 23:54:57 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Nov 5 23:54:57 2016 +0100 cmGeneratorTarget: Don't assing a bool to a string diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ca056c0..ca3e373 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3945,7 +3945,6 @@ std::string cmGeneratorTarget::GetFortranModuleDirectory( std::string const& working_dir) const { if (!this->FortranModuleDirectoryCreated) { -this->FortranModuleDirectory = true; this->FortranModuleDirectory = this->CreateFortranModuleDirectory(working_dir); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e994985d83b09d71b4928a61a75d1cf3861aaec commit 1e994985d83b09d71b4928a61a75d1cf3861aaec Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Nov 5 23:51:30 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Nov 5 23:51:30 2016 +0100 cmGlobalNinjaGenerator: Suppress clang-tidy warning diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 830ab7f..22de7c4 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -130,7 +130,7 @@ std::string cmGlobalNinjaGenerator::EncodeLiteral(const std::string& lit) std::string cmGlobalNinjaGenerator::EncodePath(const std::string& path) { - std::string result = path; + std::string result = path; // NOLINT(clang-tidy) #ifdef _WIN32 if (this->IsGCCOnWindows()) std::replace(result.begin(), result.end(), '\\', '/'); @@ -283,7 +283,7 @@ void cmGlobalNinjaGenerator::WriteCustomCommandBuild( bool restat, const cmNinjaDeps& outputs, const cmNinjaDeps& deps, const cmNinjaDeps& orderOnly) { - std::string cmd = command; + std::string cmd = command; // NOLINT(clang-tidy) #ifdef _WIN32 if (cmd.empty()) // TODO Shouldn't an empty command be handled by ninja? https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ae3966d75593b05a9658af8d2fdd47c2bf48a4d commit 5ae3966d75593b05a9658af8d2fdd47c2bf48a4d Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Nov 5 23:46:24 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Nov 5 23:46:24 2016 +0100 cmCTestSubmitHandler: Remove redundant c_str() diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index d21471d..d10f7ad 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -926,7 +926,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC( return false; } size_t fileSize = static_cast(st.st_size); -FILE* fp = cmsys::SystemTools::Fopen(local_file.c_str(), "rb"); +FILE* fp = cmsys::SystemTools::Fopen(local_file, "rb"); if (!fp) { cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot open file: " << local_file << std::endl); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=443180fb9915eefe0b232875505632ffb9fabb95 commit 443180fb9915eefe0b232875505632ffb9fabb95 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Nov 5 23:44:29 2016 +0100
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc3-935-g6dacf55
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 6dacf55a79b849ccefb468166d012686b1ed3a18 (commit) via 0ee7b4132a7ef9c2eca46a7268a718132fa31cb2 (commit) from 166cd2c80d14149698a3b9f39d2973defaa8af8f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6dacf55a79b849ccefb468166d012686b1ed3a18 commit 6dacf55a79b849ccefb468166d012686b1ed3a18 Merge: 166cd2c 0ee7b41 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Nov 5 18:32:37 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sat Nov 5 18:32:37 2016 -0400 Merge topic 'include-what-you-use' into next 0ee7b413 Fixup! Fix several include-what-you-use findings https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0ee7b4132a7ef9c2eca46a7268a718132fa31cb2 commit 0ee7b4132a7ef9c2eca46a7268a718132fa31cb2 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Nov 5 23:32:21 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Nov 5 23:32:21 2016 +0100 Fixup! Fix several include-what-you-use findings diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 9038469..5e03c39 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -5,6 +5,7 @@ #include "CMakeSetupDialog.h" #include "cmAlgorithms.h" #include "cmDocumentation.h" +#include "cmDocumentationEntry.h" #include "cmVersion.h" #include "cmake.h" #include @@ -17,6 +18,7 @@ #include #include #include +#include #include "cmSystemTools.h" // IWYU pragma: keep --- Summary of changes: Source/QtDialog/CMakeSetup.cxx |2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc3-933-g166cd2c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 166cd2c80d14149698a3b9f39d2973defaa8af8f (commit) via 7e58067e3820cb79780adb0847bc90fb081e8206 (commit) from 838fd5c3ecc961323affd2a890ff3421edc82f08 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=166cd2c80d14149698a3b9f39d2973defaa8af8f commit 166cd2c80d14149698a3b9f39d2973defaa8af8f Merge: 838fd5c 7e58067 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Nov 5 18:15:41 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sat Nov 5 18:15:41 2016 -0400 Merge topic 'include-what-you-use' into next 7e58067e Fix several include-what-you-use findings diff --cc Source/cmGlobalGenerator.cxx index 42e9df1,2d0767f..fa447ff --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@@ -33,20 -44,10 +44,10 @@@ #include "cmVersion.h" #include "cmake.h" - #include - #include - #include - #include - #include - #include - #include - #include - #include - #if defined(CMAKE_BUILD_WITH_CMAKE) +#include "cmCryptoHash.h" #include #include -#include #endif class cmInstalledFile; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7e58067e3820cb79780adb0847bc90fb081e8206 commit 7e58067e3820cb79780adb0847bc90fb081e8206 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Nov 5 21:40:14 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sat Nov 5 23:04:23 2016 +0100 Fix several include-what-you-use findings diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 7ee0f75..08ea4ee 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -22,6 +22,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmState.h" +#include "cmStateDirectory.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index aa55379..22f69fa 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -3,9 +3,17 @@ #ifndef cmAlgorithms_h #define cmAlgorithms_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep + +#include +#include +#include +#include +#include +#include +#include +#include +#include inline bool cmHasLiteralPrefixImpl(const std::string& str1, const char* str2, size_t N) diff --git a/Source/cmCMakeMinimumRequired.cxx b/Source/cmCMakeMinimumRequired.cxx index 655c42a..942688c 100644 --- a/Source/cmCMakeMinimumRequired.cxx +++ b/Source/cmCMakeMinimumRequired.cxx @@ -2,9 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCMakeMinimumRequired.h" +#include +#include + #include "cmMakefile.h" #include "cmSystemTools.h" #include "cmVersion.h" +#include "cmake.h" + +class cmExecutionStatus; // cmCMakeMinimumRequired bool cmCMakeMinimumRequired::InitialPass(std::vector const& args, diff --git a/Source/cmCMakeMinimumRequired.h b/Source/cmCMakeMinimumRequired.h index 3acedd2..08a5c38 100644 --- a/Source/cmCMakeMinimumRequired.h +++ b/Source/cmCMakeMinimumRequired.h @@ -3,8 +3,14 @@ #ifndef cmCMakeMinimumRequired_h #define cmCMakeMinimumRequired_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmCMakeMinimumRequired * \brief cmake_minimum_required command * diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 024260c..010fc4e 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2,6 +2,27 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTest.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "cmAlgorithms.h" #include "cmCTestBuildAndTestHandler.h" #include "cmCTestBuildHandler.h" @@ -21,35 +42,15 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmState.h" +#include "cmStateSnapshot.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmVersion.h" #include "cmVersionConf
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-824-g4b4bebc
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 4b4bebc7e19687ff9d1d28374555e647e5b1a634 (commit) via 5214bb354b508cafc859b4a05b4e5f8ed44767e0 (commit) via 602b78aa79f6d99e775fa0a84fb441156d192833 (commit) via c58c739da7287a1cb33558f4e121ecdb23cfadd9 (commit) via 6b90e2850c1bd5df0aab0f1a93ea12f21bb9213f (commit) via cc9987f1ae6319e6641fcfa4cf5997dc7c907948 (commit) from b45687a47df2c5bd075f0316eb753c1a786c08b3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b4bebc7e19687ff9d1d28374555e647e5b1a634 commit 4b4bebc7e19687ff9d1d28374555e647e5b1a634 Merge: b45687a 5214bb3 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Oct 30 14:51:04 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sun Oct 30 14:51:04 2016 -0400 Merge topic 'clang-tidy' into next 5214bb35 Avoid some copies 602b78aa Remove redundant c_str() calls c58c739d Use the empty method to check for emptiness 6b90e285 CMake Nightly Date Stamp cc9987f1 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5214bb354b508cafc859b4a05b4e5f8ed44767e0 commit 5214bb354b508cafc859b4a05b4e5f8ed44767e0 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Oct 30 19:50:19 2016 +0100 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Oct 30 19:50:19 2016 +0100 Avoid some copies diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx index b55341b..9844306 100644 --- a/Source/cmFileMonitor.cxx +++ b/Source/cmFileMonitor.cxx @@ -247,7 +247,10 @@ public: void StopWatching() final {} - void AppendCallback(cmFileMonitor::Callback cb) { CbList.push_back(cb); } + void AppendCallback(cmFileMonitor::Callback const& cb) + { +this->CbList.push_back(cb); + } std::string Path() const final { @@ -310,7 +313,7 @@ cmFileMonitor::~cmFileMonitor() } void cmFileMonitor::MonitorPaths(const std::vector& paths, - Callback cb) + Callback const& cb) { for (const auto& p : paths) { std::vector pathSegments; diff --git a/Source/cmFileMonitor.h b/Source/cmFileMonitor.h index e05f48d..48169b8 100644 --- a/Source/cmFileMonitor.h +++ b/Source/cmFileMonitor.h @@ -17,7 +17,7 @@ public: ~cmFileMonitor(); using Callback = std::function<void(const std::string&, int, int)>; - void MonitorPaths(const std::vector& paths, Callback cb); + void MonitorPaths(const std::vector& paths, Callback const& cb); void StopMonitoring(); std::vector WatchedFiles() const; diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 17d49e8..90caaf9 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -963,7 +963,7 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule( (type == cmStateEnums::OBJECT_LIBRARY) || (type == cmStateEnums::GLOBAL_TARGET) || (type == cmStateEnums::UTILITY)) { - std::string name = target->GetName(); + std::string const& name = target->GetName(); if (emittedTargets.insert(name).second) { path = "... "; path += name; diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx index f3aa79c..7a17f2c 100644 --- a/Source/cmOutputRequiredFilesCommand.cxx +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -180,26 +180,23 @@ protected: while (cmSystemTools::GetLineFromStream(fin, line)) { if (cmHasLiteralPrefix(line.c_str(), "#include")) { // if it is an include line then create a string class -std::string currentline = line; -size_t qstart = currentline.find('\"', 8); +size_t qstart = line.find('\"', 8); size_t qend; // if a quote is not found look for a < if (qstart == std::string::npos) { - qstart = currentline.find('<', 8); + qstart = line.find('<', 8); // if a < is not found then move on if (qstart == std::string::npos) { -cmSystemTools::Error("unknown include directive ", - currentline.c_str()); +cmSystemTools::Error("unknown include directive ", line.c_str()); continue; } else { -qend = currentline.find('>', qstart + 1)
Re: [cmake-developers] iwyu and clang-tidy not working under mac os
On Wed, Oct 26, 2016 at 11:27 AM, Roman Wügerwrote: > Hello, > > I set CMAKE_CXX_INCLUDE_WHAT_YOU_USE and CMAKE_CXX_CLANG_TIDY. Both work > as expected with CMake 3.6.2 under linux. Under Mac OS with the same > sources and the same CMake version doesn't produce any output. > > On Linux clang 3.8 is used, on Mac OS it is AppleClang 7.3.0 with > clang-tidy installed from homebrew. > > Any hints? > When you run "make VERBOSE=1" and look at what is executed, do you see any "cmake --iwyu" invocations? -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-762-g1563b93
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 1563b936fd11bb6512d7365a070a6185ffc9fbaf (commit) via 85f893c0535538991218b8caaafe3ff871017b29 (commit) via bf111520211ec74ab847b7fa11637b702af2e8ca (commit) from 5521217d66f57464ac4ecf715527682f5148f356 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1563b936fd11bb6512d7365a070a6185ffc9fbaf commit 1563b936fd11bb6512d7365a070a6185ffc9fbaf Merge: 5521217 85f893c Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Wed Oct 26 03:03:24 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Oct 26 03:03:24 2016 -0400 Merge topic 'include-what-you-use' into next 85f893c0 fixup! Include necessary headers in commands bf111520 fixup! Include necessary headers in commands https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85f893c0535538991218b8caaafe3ff871017b29 commit 85f893c0535538991218b8caaafe3ff871017b29 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Wed Oct 26 09:01:56 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Wed Oct 26 09:01:56 2016 +0200 fixup! Include necessary headers in commands diff --git a/Source/cmEndWhileCommand.cxx b/Source/cmEndWhileCommand.cxx index f24c280..5623f33 100644 --- a/Source/cmEndWhileCommand.cxx +++ b/Source/cmEndWhileCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEndWhileCommand.h" -#include "cmListFileArgument.h" +#include "cmListFileCache.h" class cmExecutionStatus; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf111520211ec74ab847b7fa11637b702af2e8ca commit bf111520211ec74ab847b7fa11637b702af2e8ca Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Wed Oct 26 08:58:37 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Wed Oct 26 08:58:37 2016 +0200 fixup! Include necessary headers in commands diff --git a/Source/cmEndWhileCommand.cxx b/Source/cmEndWhileCommand.cxx index 48f09f1..f24c280 100644 --- a/Source/cmEndWhileCommand.cxx +++ b/Source/cmEndWhileCommand.cxx @@ -2,8 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmEndWhileCommand.h" +#include "cmListFileArgument.h" + class cmExecutionStatus; -struct cmListFileArgument; bool cmEndWhileCommand::InvokeInitialPass( std::vector const& args, cmExecutionStatus&) --- Summary of changes: Source/cmEndWhileCommand.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-759-g5521217
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 5521217d66f57464ac4ecf715527682f5148f356 (commit) via c98c12731a987cf83d7aabc3b8127c51ceb8d741 (commit) from 331a9929897ad4ba864320e12bee96db86ffd8fe (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5521217d66f57464ac4ecf715527682f5148f356 commit 5521217d66f57464ac4ecf715527682f5148f356 Merge: 331a992 c98c127 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Tue Oct 25 15:39:03 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Tue Oct 25 15:39:03 2016 -0400 Merge topic 'include-what-you-use' into next c98c1273 Include necessary headers in commands https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c98c12731a987cf83d7aabc3b8127c51ceb8d741 commit c98c12731a987cf83d7aabc3b8127c51ceb8d741 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Tue Oct 25 20:35:04 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Tue Oct 25 21:22:36 2016 +0200 Include necessary headers in commands diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index 1ab4ef6..620de31 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -2,11 +2,19 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddCustomCommandCommand.h" -#include "cmTarget.h" +#include +#include "cmCustomCommand.h" +#include "cmCustomCommandLines.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" #include "cmSourceFile.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" -#include "cmGlobalGenerator.h" +class cmExecutionStatus; // cmAddCustomCommandCommand bool cmAddCustomCommandCommand::InitialPass( diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h index 643163c..ea92163 100644 --- a/Source/cmAddCustomCommandCommand.h +++ b/Source/cmAddCustomCommandCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddCustomCommandCommand_h #define cmAddCustomCommandCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddCustomCommandCommand * \brief cmAddCustomCommandCommand defines a new command (rule) that can * be executed within the build process diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index 9c41dac..4e656aa 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -2,8 +2,18 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddCustomTargetCommand.h" +#include + +#include "cmCustomCommandLines.h" #include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" + +class cmExecutionStatus; // cmAddCustomTargetCommand bool cmAddCustomTargetCommand::InitialPass( diff --git a/Source/cmAddCustomTargetCommand.h b/Source/cmAddCustomTargetCommand.h index 2ad244c..b679247 100644 --- a/Source/cmAddCustomTargetCommand.h +++ b/Source/cmAddCustomTargetCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddCustomTargetCommand_h #define cmAddCustomTargetCommand_h +#include +#include +#include + #include "cmCommand.h" +class cmExecutionStatus; + /** \class cmAddCustomTargetCommand * \brief Command that adds a target to the build system. * diff --git a/Source/cmAddDefinitionsCommand.cxx b/Source/cmAddDefinitionsCommand.cxx index 8d82e71..9e0607c 100644 --- a/Source/cmAddDefinitionsCommand.cxx +++ b/Source/cmAddDefinitionsCommand.cxx @@ -2,6 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAddDefinitionsCommand.h" +#include "cmMakefile.h" + +class cmExecutionStatus; + // cmAddDefinitionsCommand bool cmAddDefinitionsCommand::InitialPass(std::vector const& args, cmExecutionStatus&) diff --git a/Source/cmAddDefinitionsCommand.h b/Source/cmAddDefinitionsCommand.h index c6b5699..735f8cc 100644 --- a/Source/cmAddDefinitionsCommand.h +++ b/Source/cmAddDefinitionsCommand.h @@ -3,8 +3,14 @@ #ifndef cmAddDefinitionsCommand_h #define cmAddDefinitionsComma
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-727-g1529102
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 1529102dab129c3d2e1010f1e37544fd4a698f5d (commit) via c15dc1972839e175afaa9011f74376dadf08277f (commit) from 2b3a600e8570df998247ed89da75522cb97e8563 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1529102dab129c3d2e1010f1e37544fd4a698f5d commit 1529102dab129c3d2e1010f1e37544fd4a698f5d Merge: 2b3a600 c15dc19 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Oct 24 16:36:31 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Oct 24 16:36:31 2016 -0400 Merge topic 'cm_unordered_set' into next c15dc197 Introduce CM_UNORDERED_SET https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c15dc1972839e175afaa9011f74376dadf08277f commit c15dc1972839e175afaa9011f74376dadf08277f Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Oct 24 22:33:18 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Mon Oct 24 22:34:52 2016 +0200 Introduce CM_UNORDERED_SET Avoid duplicating switch among std::unordered_set, cmsys::hash_set, and std::set. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8ac302a..ca056c0 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -21,6 +21,7 @@ #include "cmTargetLinkLibraryType.h" #include "cmTargetPropertyComputer.h" #include "cm_auto_ptr.hxx" +#include "cm_unordered_set.hxx" #include "cmake.h" #include @@ -34,16 +35,6 @@ #include #include -#if defined(CMake_HAVE_CXX_UNORDERED_SET) -#include -#define UNORDERED_SET std::unordered_set -#elif defined(CMAKE_BUILD_WITH_CMAKE) -#include -#define UNORDERED_SET cmsys::hash_set -#else -#define UNORDERED_SET std::set -#endif - template <> const char* cmTargetPropertyComputer::GetSources( cmGeneratorTarget const* tgt, cmMessenger* /* messenger */, @@ -926,7 +917,7 @@ static void AddInterfaceEntries( static bool processSources( cmGeneratorTarget const* tgt, const std::vector<cmGeneratorTarget::TargetPropertyEntry*>& entries, - std::vector& srcs, UNORDERED_SET& uniqueSrcs, + std::vector& srcs, CM_UNORDERED_SET& uniqueSrcs, cmGeneratorExpressionDAGChecker* dagChecker, std::string const& config, bool debugSources) { @@ -1053,7 +1044,7 @@ void cmGeneratorTarget::GetSourceFiles(std::vector& files, cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), "SOURCES", CM_NULLPTR, CM_NULLPTR); - UNORDERED_SET uniqueSrcs; + CM_UNORDERED_SET uniqueSrcs; bool contextDependentDirectSources = processSources(this, this->SourceEntries, files, uniqueSrcs, , config, debugSources); @@ -1592,7 +1583,7 @@ class cmTargetCollectLinkLanguages public: cmTargetCollectLinkLanguages(cmGeneratorTarget const* target, const std::string& config, - UNORDERED_SET& languages, + CM_UNORDERED_SET& languages, cmGeneratorTarget const* head) : Config(config) , Languages(languages) @@ -1659,7 +1650,7 @@ public: private: std::string Config; - UNORDERED_SET& Languages; + CM_UNORDERED_SET& Languages; cmGeneratorTarget const* HeadTarget; const cmGeneratorTarget* Target; std::set Visited; @@ -1731,7 +1722,7 @@ void cmGeneratorTarget::ComputeLinkClosure(const std::string& config, LinkClosure& lc) const { // Get languages built in this target. - UNORDERED_SET languages; + CM_UNORDERED_SET languages; cmLinkImplementation const* impl = this->GetLinkImplementation(config); assert(impl); for (std::vector::const_iterator li = impl->Languages.begin(); @@ -1748,7 +1739,7 @@ void cmGeneratorTarget::ComputeLinkClosure(const std::string& config, } // Store the transitive closure of languages. - for (UNORDERED_SET::const_iterator li = languages.begin(); + for (CM_UNORDERED_SET::const_iterator li = languages.begin(); li != languages.end(); ++li) { lc.Languages.push_back(*li); } @@ -1769,7 +1760,7 @@ void cmGeneratorTarget::ComputeLinkClosure(const std::string& config, } // Now consider languages that propagate from linked targets. -for (UNORDERED_SET::const_iterator sit = languages.begin(); +for (CM_UNORDERED_SET::const_itera
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-725-g2b3a600
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 2b3a600e8570df998247ed89da75522cb97e8563 (commit) via 15aa814b85a90fb8e8798eb99617d27957c28f36 (commit) from 08714bc5fcc28cc8e66faa6bd6f06c9a1c1b7cc2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2b3a600e8570df998247ed89da75522cb97e8563 commit 2b3a600e8570df998247ed89da75522cb97e8563 Merge: 08714bc 15aa814 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Oct 24 15:50:58 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Oct 24 15:50:58 2016 -0400 Merge topic 'remove-cmobject' into next 15aa814b Remove cmObject.h and cmTypeMacro.h https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15aa814b85a90fb8e8798eb99617d27957c28f36 commit 15aa814b85a90fb8e8798eb99617d27957c28f36 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Oct 23 01:19:00 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Mon Oct 24 21:49:28 2016 +0200 Remove cmObject.h and cmTypeMacro.h diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index 88a3741..d656063 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -10,7 +10,6 @@ #include "cmCPackIFWInstaller.h" #include "cmCPackIFWPackage.h" #include "cmCPackIFWRepository.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPack7zGenerator.h b/Source/CPack/cmCPack7zGenerator.h index 063b032..a617d9b 100644 --- a/Source/CPack/cmCPack7zGenerator.h +++ b/Source/CPack/cmCPack7zGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPack7zGenerator * \brief A generator for 7z files diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index 7010664..df02ae8 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -7,7 +7,6 @@ #include "cmArchiveWrite.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h index f46ae5a..7db933e 100644 --- a/Source/CPack/cmCPackDebGenerator.h +++ b/Source/CPack/cmCPackDebGenerator.h @@ -6,7 +6,6 @@ #include #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index a7652b1..f32dd70 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -6,9 +6,7 @@ #include #include "cmCPackComponentGroup.h" -#include "cmObject.h" #include "cmSystemTools.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index 5381eb2..0a98f91 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -5,9 +5,6 @@ #include -#include "cmObject.h" -#include "cmTypeMacro.h" - #include #include #include diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index 2ac805d..9ffe5c4 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -5,9 +5,6 @@ #include -#include "cmObject.h" -#include "cmTypeMacro.h" - #include #include #include diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h index d61341c..b4bf2d4 100644 --- a/Source/CPack/cmCPackNSISGenerator.h +++ b/Source/CPack/cmCPackNSISGenerator.h @@ -6,7 +6,6 @@ #include #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackPKGGenerator.h b/Source/CPack/cmCPackPKGGenerator.h index 5569185..bb3c1a7 100644 --- a/Source/CPack/cmCPackPKGGenerator.h +++ b/Source/CPack/cmCPackPKGGenerator.h @@ -3,6 +3,9 @@ #ifndef cmCPackPKGGenerator_h #define cmCPackPKGGenerator_h +#include +#include + #include "cmCPackGenerator.h" class cmCPackComponent; diff --git a/Source/CPack/cmCPackRPMGenerator.h b/Source/CPack/cmCPackRPMGenerator.h index f8bcbfe..4d48bd8 100644 --- a/Source/CPack/cmCPackRPMGenerator.h +++ b/Source/CPack/cmCPackRPMGenerator.h @@ -6,7 +6,6 @@ #include #include "cmCPac
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-679-ge640244
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via e6402444f1f837efb452c50c106a738a66b59d48 (commit) via 645186c0b7e46cf99882616ef2a00f07a472825c (commit) from bbc1ed0b6f8669912dbf7151d3c46fa806e04a67 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6402444f1f837efb452c50c106a738a66b59d48 commit e6402444f1f837efb452c50c106a738a66b59d48 Merge: bbc1ed0 645186c Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Oct 23 04:25:57 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sun Oct 23 04:25:57 2016 -0400 Merge topic 'remove-cmobject' into next 645186c0 Revert "Remove cmObject.h and cmTypeMacro.h" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=645186c0b7e46cf99882616ef2a00f07a472825c commit 645186c0b7e46cf99882616ef2a00f07a472825c Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Oct 23 10:25:23 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Oct 23 10:25:23 2016 +0200 Revert "Remove cmObject.h and cmTypeMacro.h" This reverts commit dcb8b0fb35e74749d07b8aec837b41564691f0c7. diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index d656063..88a3741 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -10,6 +10,7 @@ #include "cmCPackIFWInstaller.h" #include "cmCPackIFWPackage.h" #include "cmCPackIFWRepository.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPack7zGenerator.h b/Source/CPack/cmCPack7zGenerator.h index a617d9b..063b032 100644 --- a/Source/CPack/cmCPack7zGenerator.h +++ b/Source/CPack/cmCPack7zGenerator.h @@ -7,6 +7,7 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPack7zGenerator * \brief A generator for 7z files diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index df02ae8..7010664 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -7,6 +7,7 @@ #include "cmArchiveWrite.h" #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h index 7db933e..f46ae5a 100644 --- a/Source/CPack/cmCPackDebGenerator.h +++ b/Source/CPack/cmCPackDebGenerator.h @@ -6,6 +6,7 @@ #include #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index f32dd70..a7652b1 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -6,7 +6,9 @@ #include #include "cmCPackComponentGroup.h" +#include "cmObject.h" #include "cmSystemTools.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index 0a98f91..5381eb2 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -5,6 +5,9 @@ #include +#include "cmObject.h" +#include "cmTypeMacro.h" + #include #include #include diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index 9ffe5c4..2ac805d 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -5,6 +5,9 @@ #include +#include "cmObject.h" +#include "cmTypeMacro.h" + #include #include #include diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h index b4bf2d4..d61341c 100644 --- a/Source/CPack/cmCPackNSISGenerator.h +++ b/Source/CPack/cmCPackNSISGenerator.h @@ -6,6 +6,7 @@ #include #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackPKGGenerator.h b/Source/CPack/cmCPackPKGGenerator.h index bb3c1a7..5569185 100644 --- a/Source/CPack/cmCPackPKGGenerator.h +++ b/Source/CPack/cmCPackPKGGenerator.h @@ -3,9 +3,6 @@ #ifndef cmCPackPKGGenerator_h #define cmCPackPKGGenerator_h -#include -#include - #include "cmCPackGenerator.h" class cmCPackComponent; diff --git a/Source/CPack/cmCPackRPMGenerator.h b/Source/CPack/cmCPackRPMGenerator.h index 4d48bd8..f8bcbfe 100644 --- a/Source/CPa
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-677-gbbc1ed0
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via bbc1ed0b6f8669912dbf7151d3c46fa806e04a67 (commit) via 3aa68a0197e510372c26152d4bbf9a1066b082d3 (commit) via f01ee88d0040b4905844af32d10a689d8ccfc672 (commit) from 797b4d3a176c01c91b040ac4fc1e787796e62deb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bbc1ed0b6f8669912dbf7151d3c46fa806e04a67 commit bbc1ed0b6f8669912dbf7151d3c46fa806e04a67 Merge: 797b4d3 3aa68a0 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Oct 23 04:06:32 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sun Oct 23 04:06:32 2016 -0400 Merge topic 'cmcommand-no-disable' into next 3aa68a01 Merge topic 'separate-compilation' into cmcommand-no-disable f01ee88d Remove cmCommand::Enabled and all related accessors diff --cc Source/cmCommand.h index 6a1979a,5adca64..dcfe8da --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@@ -17,11 -19,13 +17,11 @@@ * to support such features as enable/disable, inheritance, * documentation, and construction. */ -class cmCommand : public cmObject +class cmCommand { public: - cmTypeMacro(cmCommand, cmObject); - /** -* Construct the command. By default it is enabled with no makefile. +* Construct the command. By default it has no makefile. */ cmCommand() : Makefile(CM_NULLPTR) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3aa68a0197e510372c26152d4bbf9a1066b082d3 commit 3aa68a0197e510372c26152d4bbf9a1066b082d3 Merge: f01ee88 32040cd Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Oct 23 10:06:00 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Oct 23 10:06:00 2016 +0200 Merge topic 'separate-compilation' into cmcommand-no-disable diff --cc Source/cmCommand.h index cc34756,9299c71..5adca64 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@@ -104,16 -96,29 +95,9 @@@ public virtual std::string GetName() const = 0; /** - * Enable the command. - */ - void EnabledOn() { this->Enabled = true; } - - /** - * Disable the command. - */ - void EnabledOff() { this->Enabled = false; } - - /** - * Query whether the command is enabled. - */ - bool GetEnabled() const { return this->Enabled; } - - /** - * Disable or enable the command. - */ - void SetEnabled(bool enabled) { this->Enabled = enabled; } - - /** * Return the last error string. */ - const char* GetError() - { - if (this->Error.empty()) { - this->Error = this->GetName(); - this->Error += " unknown error."; - } - return this->Error.c_str(); - } + const char* GetError(); /** * Set the error message https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f01ee88d0040b4905844af32d10a689d8ccfc672 commit f01ee88d0040b4905844af32d10a689d8ccfc672 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Oct 23 08:55:19 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Oct 23 08:55:19 2016 +0200 Remove cmCommand::Enabled and all related accessors Enabled is never set to false. Remove the member variable and all related getters and setters. diff --git a/Source/cmCommand.h b/Source/cmCommand.h index d8e337d..cc34756 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -25,12 +25,11 @@ public: cmTypeMacro(cmCommand, cmObject); /** - * Construct the command. By default it is enabled with no makefile. + * Construct the command. By default it has no makefile. */ cmCommand() +: Makefile(CM_NULLPTR) { -this->Makefile = CM_NULLPTR; -this->Enabled = true; } /** @@ -105,26 +104,6 @@ public: virtual std::string GetName() const = 0; /** - * Enable the command. - */ - void EnabledOn() { this->Enabled = true; } - - /** - * Disable the command. - */ - void EnabledOff() { this->Enabled = false; } - - /** - * Query whether the command is enabled. - */ - bool GetEnabled() const { return this->Enabled; } - - /** - * Disable or enable the command. - */ - void SetEnabled(bool enabled) { this->Enabled = enabled; } - - /** * Return the last error string. */ const char* GetError() @@ -169,7 +148,6 @@ protected: cmCommandArgumentsHelper Helper; private: - bool Enabled; std::string Error; }; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 00c0e82..741ffb8 100644 --- a/Source
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-674-g797b4d3
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 797b4d3a176c01c91b040ac4fc1e787796e62deb (commit) via dcb8b0fb35e74749d07b8aec837b41564691f0c7 (commit) via 2214011f7b3b13fe7ae0f68f0f9d49af11e12edd (commit) via 7f9a8d53aa8a3595f4f1f2f81607f8df3627642d (commit) via fb0b087c4dc65f18aef431e41de3aa9b91e35371 (commit) via 2169b0faa40a20cd9aae25f9170cca074579a023 (commit) via 9855ebf11a1556bd0b73a1eaec39232842871528 (commit) from a8102f933066923c47ed35e0125a5c2e0940a4e8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=797b4d3a176c01c91b040ac4fc1e787796e62deb commit 797b4d3a176c01c91b040ac4fc1e787796e62deb Merge: a8102f9 dcb8b0f Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Oct 23 04:02:55 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sun Oct 23 04:02:55 2016 -0400 Merge topic 'remove-cmobject' into next dcb8b0fb Remove cmObject.h and cmTypeMacro.h 2214011f Make cmCPackGenerator not inherit from cmObject 7f9a8d53 Make cmCPackGeneratorFactory not inherit from cmObject fb0b087c Make cmCTestGenericHandler not inherit from cmObject 2169b0fa Make cmCPackLog not inherit from cmObject 9855ebf1 Make cmCommand not inherit from cmObject https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dcb8b0fb35e74749d07b8aec837b41564691f0c7 commit dcb8b0fb35e74749d07b8aec837b41564691f0c7 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Oct 23 01:19:00 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Oct 23 08:02:33 2016 +0200 Remove cmObject.h and cmTypeMacro.h diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index 88a3741..d656063 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -10,7 +10,6 @@ #include "cmCPackIFWInstaller.h" #include "cmCPackIFWPackage.h" #include "cmCPackIFWRepository.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPack7zGenerator.h b/Source/CPack/cmCPack7zGenerator.h index 063b032..a617d9b 100644 --- a/Source/CPack/cmCPack7zGenerator.h +++ b/Source/CPack/cmCPack7zGenerator.h @@ -7,7 +7,6 @@ #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" /** \class cmCPack7zGenerator * \brief A generator for 7z files diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index 7010664..df02ae8 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -7,7 +7,6 @@ #include "cmArchiveWrite.h" #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h index f46ae5a..7db933e 100644 --- a/Source/CPack/cmCPackDebGenerator.h +++ b/Source/CPack/cmCPackDebGenerator.h @@ -6,7 +6,6 @@ #include #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index a7652b1..f32dd70 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -6,9 +6,7 @@ #include #include "cmCPackComponentGroup.h" -#include "cmObject.h" #include "cmSystemTools.h" -#include "cmTypeMacro.h" #include #include diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index 5381eb2..0a98f91 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -5,9 +5,6 @@ #include -#include "cmObject.h" -#include "cmTypeMacro.h" - #include #include #include diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index 2ac805d..9ffe5c4 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -5,9 +5,6 @@ #include -#include "cmObject.h" -#include "cmTypeMacro.h" - #include #include #include diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h index d61341c..b4bf2d4 100644 --- a/Source/CPack/cmCPackNSISGenerator.h +++ b/Source/CPack/cmCPackNSISGenerator.h @@ -6,7 +6,6 @@ #include #include "cmCPackGenerator.h" -#include "cmTypeMacro.h" #include #include
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-667-ga8102f9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via a8102f933066923c47ed35e0125a5c2e0940a4e8 (commit) via 719a9e8f89a9b6f9bfd78638b62907062a84d535 (commit) from 1a8f42e50f1435c05479ad3039e27d6c842a69fd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8102f933066923c47ed35e0125a5c2e0940a4e8 commit a8102f933066923c47ed35e0125a5c2e0940a4e8 Merge: 1a8f42e 719a9e8 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Oct 21 17:53:16 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Oct 21 17:53:16 2016 -0400 Merge topic 'cm_unordered_map' into next 719a9e8f Introduce CM_UNORDERED_MAP https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=719a9e8f89a9b6f9bfd78638b62907062a84d535 commit 719a9e8f89a9b6f9bfd78638b62907062a84d535 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Oct 21 23:52:51 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Oct 21 23:52:51 2016 +0200 Introduce CM_UNORDERED_MAP diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index 569b3a2..8dfb9ea 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -6,20 +6,11 @@ #include #include "cmLinkedTree.h" +#include "cm_unordered_map.hxx" #include #include -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -#include -#else -#include "cmsys/hash_map.hxx" -#endif -#else -#include -#endif - /** \class cmDefinitions * \brief Store a scope of variable definitions for CMake language. * @@ -85,15 +76,7 @@ private: }; static Def NoDef; -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - typedef std::unordered_map<std::string, Def> MapType; -#else - typedef cmsys::hash_map<std::string, Def> MapType; -#endif -#else - typedef std::map<std::string, Def> MapType; -#endif + typedef CM_UNORDERED_MAP<std::string, Def> MapType; MapType Map; static Def const& GetInternal(const std::string& key, StackIter begin, diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx index a6c9cd0..55d8c2a 100644 --- a/Source/cmFileTimeComparison.cxx +++ b/Source/cmFileTimeComparison.cxx @@ -7,14 +7,7 @@ #include #include -// Use a hash table to avoid duplicate file time checks from disk. -#if defined(CMAKE_BUILD_WITH_CMAKE) -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -#include -#else -#include -#endif -#endif +#include "cm_unordered_map.hxx" // Use a platform-specific API to get file times efficiently. #if !defined(_WIN32) || defined(__CYGWIN__) @@ -35,27 +28,9 @@ public: bool FileTimesDiffer(const char* f1, const char* f2); private: -#if defined(CMAKE_BUILD_WITH_CMAKE) - // Use a hash table to efficiently map from file name to modification time. - class HashString - { - public: -size_t operator()(const std::string& s) const { return h(s.c_str()); } -#ifdef CMake_HAVE_CXX_UNORDERED_MAP -std::hash h; -#else -cmsys::hash h; -#endif - }; -#ifdef CMake_HAVE_CXX_UNORDERED_MAP - typedef std::unordered_map<std::string, -#else - typedef cmsys::hash_map<std::string, -#endif - cmFileTimeComparison_Type, HashString> + typedef CM_UNORDERED_MAP<std::string, cmFileTimeComparison_Type> FileStatsMap; FileStatsMap Files; -#endif // Internal methods to lookup and compare modification times. inline bool Stat(const char* fname, cmFileTimeComparison_Type* st); @@ -68,7 +43,6 @@ private: bool cmFileTimeComparisonInternal::Stat(const char* fname, cmFileTimeComparison_Type* st) { -#if defined(CMAKE_BUILD_WITH_CMAKE) // Use the stored time if available. cmFileTimeComparisonInternal::FileStatsMap::iterator fit = this->Files.find(fname); @@ -76,7 +50,6 @@ bool cmFileTimeComparisonInternal::Stat(const char* fname, *st = fit->second; return true; } -#endif #if !defined(_WIN32) || defined(__CYGWIN__) // POSIX version. Use the stat function. @@ -97,11 +70,8 @@ bool cmFileTimeComparisonInternal::Stat(const char* fname, *st = fdata.ftLastWriteTime; #endif -#if defined(CMAKE_BUILD_WITH_CMAKE) // Store the time for future use. this->Files[fname] = *st; -#endif - return true; } diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index d8d47a1..4bf4bd1 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -12,6 +12,7 @@ #include "c
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-665-g1a8f42e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 1a8f42e50f1435c05479ad3039e27d6c842a69fd (commit) via 32040cd3aefa07524d64f65340bdc2b7e1cca513 (commit) from 35e25ada0edbcd6a36204ea13a4da8309dab3cfc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a8f42e50f1435c05479ad3039e27d6c842a69fd commit 1a8f42e50f1435c05479ad3039e27d6c842a69fd Merge: 35e25ad 32040cd Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Oct 21 15:41:30 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Oct 21 15:41:30 2016 -0400 Merge topic 'separate-compilation' into next 32040cd3 Fix newly discovered clang-tidy issues https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=32040cd3aefa07524d64f65340bdc2b7e1cca513 commit 32040cd3aefa07524d64f65340bdc2b7e1cca513 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Oct 21 21:32:43 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Oct 21 21:32:43 2016 +0200 Fix newly discovered clang-tidy issues Clang-tidy reports some issues only from the currently compiled source file and its associated header file. Separating the compilation of commands exposed some clang-tidy issues that were not reported previously. Fix them. diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 18118a3..56cf91a 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -270,8 +270,8 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, yet its linker language. */ if ((type == cmStateEnums::SHARED_LIBRARY || type == cmStateEnums::MODULE_LIBRARY) && - (this->Makefile->GetState()->GetGlobalPropertyAsBool( - "TARGET_SUPPORTS_SHARED_LIBS") == false)) { + !this->Makefile->GetState()->GetGlobalPropertyAsBool( +"TARGET_SUPPORTS_SHARED_LIBS")) { std::ostringstream w; w << "ADD_LIBRARY called with " << (type == cmStateEnums::SHARED_LIBRARY ? "SHARED" : "MODULE") diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 4c0b649..7d98e73 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -222,7 +222,7 @@ bool cmConditionEvaluator::GetBooleanValue( double d = strtod(arg.c_str(), ); if (*end == '\0') { // The whole string is a number. Use C conversion to bool. - return d ? true : false; + return static_cast(d); } } @@ -444,7 +444,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&, if (this->IsKeyword(keyCOMMAND, *arg) && argP1 != newArgs.end()) { cmCommand* command = this->Makefile.GetState()->GetCommand(argP1->c_str()); -this->HandlePredicate(command ? true : false, reducible, arg, newArgs, +this->HandlePredicate(command != CM_NULLPTR, reducible, arg, newArgs, argP1, argP2); } // does a policy exist @@ -456,7 +456,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&, // does a target exist if (this->IsKeyword(keyTARGET, *arg) && argP1 != newArgs.end()) { this->HandlePredicate( - this->Makefile.FindTargetToUse(argP1->GetValue()) ? true : false, + this->Makefile.FindTargetToUse(argP1->GetValue()) != CM_NULLPTR, reducible, arg, newArgs, argP1, argP2); } // does a test exist @@ -464,7 +464,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList& newArgs, std::string&, this->Policy64Status != cmPolicies::WARN) { if (this->IsKeyword(keyTEST, *arg) && argP1 != newArgs.end()) { const cmTest* haveTest = this->Makefile.GetTest(argP1->c_str()); - this->HandlePredicate(haveTest ? true : false, reducible, arg, + this->HandlePredicate(haveTest != CM_NULLPTR, reducible, arg, newArgs, argP1, argP2); } } else if (this->Policy64Status == cmPolicies::WARN && @@ -638,8 +638,8 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList& newArgs, bool success = cmSystemTools::FileTimeCompare( arg->GetValue(), (argP2)->GetValue(), ); this->HandleBinaryOp( - (success == false || fileI
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-663-g35e25ad
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 35e25ada0edbcd6a36204ea13a4da8309dab3cfc (commit) via 14f1a9d044504d831fe34e711f4e54da4d3f2d08 (commit) via 2b7eb72ebdd57a7c61075cad0fa6c7f3947f6e54 (commit) via 4bb235357a363646685f6595b6ea501becb74813 (commit) via b500bd327a4565bb85c0ef3585ad7c36aac5d8c5 (commit) via 3e330d8805c29f00ff550b37f50add3d009c93d7 (commit) via 75fbf9008092484c869d6e075d9c8a056ad8c331 (commit) from 5b23ea48ac45f2b08ec1941c291608737ec16555 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=35e25ada0edbcd6a36204ea13a4da8309dab3cfc commit 35e25ada0edbcd6a36204ea13a4da8309dab3cfc Merge: 5b23ea4 14f1a9d Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Oct 21 14:27:25 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Oct 21 14:27:25 2016 -0400 Merge topic 'separate-compilation' into next 14f1a9d0 cmCommand: implement functions in cxx file 2b7eb72e bootstrap: Sort source files lexicographically 4bb23535 Create all commands from a single function b500bd32 Separate compilation for commands included in cmBootstrapCommands2 3e330d88 Separate compilation for commands included in cmBootstrapCommands1 75fbf900 Separate compilation for commands included in cmCommands https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14f1a9d044504d831fe34e711f4e54da4d3f2d08 commit 14f1a9d044504d831fe34e711f4e54da4d3f2d08 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Thu Oct 20 00:29:18 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Oct 21 18:14:51 2016 +0200 cmCommand: implement functions in cxx file diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index b2617ae..09c0acf 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -386,6 +386,8 @@ set(SRCS cmake.cxx cmake.h + cmCommand.cxx + cmCommand.h cmCommands.cxx cmCommands.h cmAddCompileOptionsCommand.cxx diff --git a/Source/cmCommand.cxx b/Source/cmCommand.cxx new file mode 100644 index 000..3c839de --- /dev/null +++ b/Source/cmCommand.cxx @@ -0,0 +1,48 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmCommand.h" + +bool cmCommand::InvokeInitialPass(const std::vector& args, + cmExecutionStatus& status) +{ + std::vector expandedArguments; + if (!this->Makefile->ExpandArguments(args, expandedArguments)) { +// There was an error expanding arguments. It was already +// reported, so we can skip this command without error. +return true; + } + return this->InitialPass(expandedArguments, status); +} + +const char* cmCommand::GetError() +{ + if (this->Error.empty()) { +this->Error = this->GetName(); +this->Error += " unknown error."; + } + return this->Error.c_str(); +} + +void cmCommand::SetError(const std::string& e) +{ + this->Error = this->GetName(); + this->Error += " "; + this->Error += e; +} + +bool cmCommand::Disallowed(cmPolicies::PolicyID pol, const char* e) +{ + switch (this->Makefile->GetPolicyStatus(pol)) { +case cmPolicies::WARN: + this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, + cmPolicies::GetPolicyWarning(pol)); +case cmPolicies::OLD: + return false; +case cmPolicies::REQUIRED_IF_USED: +case cmPolicies::REQUIRED_ALWAYS: +case cmPolicies::NEW: + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e); + break; + } + return true; +} diff --git a/Source/cmCommand.h b/Source/cmCommand.h index d8e337d..9299c71 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -28,9 +28,9 @@ public: * Construct the command. By default it is enabled with no makefile. */ cmCommand() +: Makefile(CM_NULLPTR) +, Enabled(true) { -this->Makefile = CM_NULLPTR; -this->Enabled = true; } /** @@ -50,16 +50,7 @@ public: * arguments and then invokes the InitialPass. */ virtual bool InvokeInitialPass(const std::vector& args, - cmExecutionStatus& status) - { -std::vector expandedArguments; -if (!this->Makefile->ExpandArguments(args, expandedArguments)) { - // There was an error expanding arguments. It was alr
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-656-g5b23ea4
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 5b23ea48ac45f2b08ec1941c291608737ec16555 (commit) via e3770c56a8ef6b20f473556a1ca29ea6e0f51f7f (commit) from 174057f9e157e570a83cf7cd55a7e121d0f4c63c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5b23ea48ac45f2b08ec1941c291608737ec16555 commit 5b23ea48ac45f2b08ec1941c291608737ec16555 Merge: 174057f e3770c5 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Oct 21 14:06:54 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Oct 21 14:06:54 2016 -0400 Merge topic 'parallel-boostrap-test' into next e3770c56 BootstrapTest: Use --parallel=... argument. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e3770c56a8ef6b20f473556a1ca29ea6e0f51f7f commit e3770c56a8ef6b20f473556a1ca29ea6e0f51f7f Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Oct 21 18:18:18 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Oct 21 18:22:44 2016 +0200 BootstrapTest: Use --parallel=... argument. Determine the number of processors and provide it to the bootstrap script. Also make sure this test does not run parallel with other tests. diff --git a/Tests/BootstrapTest.cmake b/Tests/BootstrapTest.cmake index 9c9fe09..07a65bf 100644 --- a/Tests/BootstrapTest.cmake +++ b/Tests/BootstrapTest.cmake @@ -1,7 +1,12 @@ file(MAKE_DIRECTORY "${bin_dir}") -message(STATUS "running bootstrap: ${bootstrap}") +include(ProcessorCount) +ProcessorCount(nproc) +if(NOT nproc EQUAL 0) + set(parallel_arg --parallel=${nproc}) +endif() +message(STATUS "running bootstrap: ${bootstrap} ${parallel_arg}") execute_process( - COMMAND ${bootstrap} + COMMAND ${bootstrap} ${parallel_arg} WORKING_DIRECTORY "${bin_dir}" RESULT_VARIABLE result ) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 7df9403..5d72e5c 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3081,8 +3081,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release -P ${CMAKE_CURRENT_SOURCE_DIR}/BootstrapTest.cmake ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BootstrapTest") -# Make this test run early during parallel execution -set_tests_properties(BootstrapTest PROPERTIES COST 5000) +# This test will use all processors. +set_tests_properties(BootstrapTest PROPERTIES RUN_SERIAL 1) # provide more time for the bootstrap test get_test_property(BootstrapTest TIMEOUT PREVIOUS_TIMEOUT) --- Summary of changes: Tests/BootstrapTest.cmake |9 +++-- Tests/CMakeLists.txt |4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-674-gec25bfb
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via ec25bfbe1a2623245fb3b7bc047b5243d3916dfd (commit) via d2080ff950d88d91f80affce596171862c0fcd59 (commit) from 307cb3c1f24857f4ff93747c14fb268d6b20fdb4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec25bfbe1a2623245fb3b7bc047b5243d3916dfd commit ec25bfbe1a2623245fb3b7bc047b5243d3916dfd Merge: 307cb3c d2080ff Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Wed Oct 19 15:06:55 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Oct 19 15:06:55 2016 -0400 Merge topic 'clang-tidy' into next d2080ff9 fixup! fix more issues reported by clang-tidy https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d2080ff950d88d91f80affce596171862c0fcd59 commit d2080ff950d88d91f80affce596171862c0fcd59 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Wed Oct 19 21:06:13 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Wed Oct 19 21:06:13 2016 +0200 fixup! fix more issues reported by clang-tidy diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 073d0d6..de48193 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -934,13 +934,15 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, e << "NAME property is read-only\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "EXPORT_NAME" && this->IsImported()) { + } + if (prop == "EXPORT_NAME" && this->IsImported()) { std::ostringstream e; e << "EXPORT_NAME property can't be set on imported targets (\"" << this->Name << "\")\n"; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; - } else if (prop == "SOURCES" && this->IsImported()) { + } + if (prop == "SOURCES" && this->IsImported()) { std::ostringstream e; e << "SOURCES property can't be set on imported targets (\"" << this->Name << "\")\n"; diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 290261a..b878534 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -803,9 +803,13 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } std::cerr << std::endl; return 1; -} else if (args[1] == "vs_link_exe") { +} + +if (args[1] == "vs_link_exe") { return cmcmd::VisualStudioLink(args, 1); -} else if (args[1] == "vs_link_dll") { +} + +if (args[1] == "vs_link_dll") { return cmcmd::VisualStudioLink(args, 2); } @@ -928,7 +932,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) #endif } return 0; -} else if (args[1] == "server") { +} + +if (args[1] == "server") { const std::string pipePrefix = "--pipe="; bool supportExperimental = false; bool isDebug = false; --- Summary of changes: Source/cmTarget.cxx |6 -- Source/cmcmd.cxx| 12 +--- 2 files changed, 13 insertions(+), 5 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-309-ga27be19
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via a27be19f9c4990e97310c1fbf0005aaaf9bbf40e (commit) via 326d5fa74781d807b9ecc2feed1b433657c3a92b (commit) via 7d45db99563c83a1a85722b1ee0f1fe10f8967d3 (commit) via a28b8f95bca8ac99c811fe24cd1e291330a1cd28 (commit) via 66c6144cdafcae83fe4c36a4355a67aa69198809 (commit) from c2382855e6a9706c9f71beb1f57bfafc75587f65 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a27be19f9c4990e97310c1fbf0005aaaf9bbf40e commit a27be19f9c4990e97310c1fbf0005aaaf9bbf40e Merge: c238285 326d5fa Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Oct 9 18:23:45 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sun Oct 9 18:23:45 2016 -0400 Merge topic 'cmake-cleanup' into next 326d5fa7 Allow custom built libarchive to use custom built expat. 7d45db99 Don't require liblzma when using system libarchive a28b8f95 Don't require libbz2 when using system libarchive 66c6144c CMakeCPack: remove obsolete conditions https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=326d5fa74781d807b9ecc2feed1b433657c3a92b commit 326d5fa74781d807b9ecc2feed1b433657c3a92b Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Oct 10 00:21:00 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Mon Oct 10 00:21:00 2016 +0200 Allow custom built libarchive to use custom built expat. Expat is built anyway. diff --git a/CMakeLists.txt b/CMakeLists.txt index 827a19c..b8a635f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -368,6 +368,23 @@ macro (CMAKE_BUILD_UTILITIES) CMAKE_SET_TARGET_FOLDER(cmcompress "Utilities/3rdParty") #- + # Build expat library for CMake, CTest, and libarchive. + if(CMAKE_USE_SYSTEM_EXPAT) +find_package(EXPAT) +if(NOT EXPAT_FOUND) + message(FATAL_ERROR +"CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!") +endif() +set(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS}) +set(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES}) + else() +set(CMAKE_EXPAT_INCLUDES) +set(CMAKE_EXPAT_LIBRARIES cmexpat) +add_subdirectory(Utilities/cmexpat) +CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty") + endif() + + #- # Build or use system libbz2 for libarchive. if(NOT CMAKE_USE_SYSTEM_LIBARCHIVE) if(CMAKE_USE_SYSTEM_BZIP2) @@ -410,6 +427,8 @@ macro (CMAKE_BUILD_UTILITIES) set(CMAKE_TAR_INCLUDES ${LibArchive_INCLUDE_DIRS}) set(CMAKE_TAR_LIBRARIES ${LibArchive_LIBRARIES}) else() +set(EXPAT_INCLUDE_DIR ${CMAKE_EXPAT_INCLUDES}) +set(EXPAT_LIBRARY ${CMAKE_EXPAT_LIBRARIES}) set(ZLIB_INCLUDE_DIR ${CMAKE_ZLIB_INCLUDES}) set(ZLIB_LIBRARY ${CMAKE_ZLIB_LIBRARIES}) add_definitions(-DLIBARCHIVE_STATIC) @@ -419,7 +438,7 @@ macro (CMAKE_BUILD_UTILITIES) set(ENABLE_ZLIB ON CACHE INTERNAL "Enable the use of the system found ZLIB library if found") set(ENABLE_BZip2 ON CACHE INTERNAL "Enable the use of the system found BZip2 library if found") set(ENABLE_LIBXML2 OFF CACHE INTERNAL "Enable the use of the system found libxml2 library if found") -set(ENABLE_EXPAT OFF CACHE INTERNAL "Enable the use of the system found EXPAT library if found") +set(ENABLE_EXPAT ON CACHE INTERNAL "Enable the use of the system found EXPAT library if found") set(ENABLE_PCREPOSIX OFF CACHE INTERNAL "Enable the use of the system found PCREPOSIX library if found") set(ENABLE_LibGCC OFF CACHE INTERNAL "Enable the use of the system found LibGCC library if found") set(ENABLE_XATTR OFF CACHE INTERNAL "Enable extended attribute support") @@ -432,23 +451,6 @@ macro (CMAKE_BUILD_UTILITIES) endif() #- - # Build expat library for CMake and CTest. - if(CMAKE_USE_SYSTEM_EXPAT) -find_package(EXPAT) -if(NOT EXPAT_FOUND) - message(FATAL_ERROR -"CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!") -endif() -set(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS}) -set(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES}) - else() -set(CMAKE_EXPAT_INCLUDES) -set(CMAKE_EXPAT_LIBRARIES cmexpat) -add_subdirectory(Utilities/cmexpat) -CMAKE_SET_TARGET_FOLDER(cmexpat "Utiliti
Re: [cmake-developers] Is there a way in CMake to get a list of all CTest tests added with add_test?
On Wed, Oct 5, 2016 at 12:54 PM, Nils Gladitzwrote: > On 04.10.2016 11:20, Tobias Hunger wrote: >> >> On Mo, 2016-10-03 at 14:25 -0400, Brad King wrote: The list we need would thus be built up to contain all COMMAND arguments to add_test that are also build targets in CMake. >>> >>> The list would also need to include targets mentioned in generator >>> expressions such as `$`. This will almost certainly >>> be better done as a CMake feature implemented in C++. This was actually >>> an early design philosophy: do the hard stuff in C++ so that complex >>> logic is not needed in CMake-language code. >> >> Access to the list of defined tests would be nice to have in the >> server-mode, >> too:-) >> >> If some work is done in that direction, please keep server-mode in mind >> when >> designing the APIs. I would love to reuse them to expose that information >> to >> clients. > > > This might be rare but the tests that cmake knows about might differ from > the tests that ctest knows about given that tests can be dynamically defined > through TEST_INCLUDE_FILE[1]. > > I've never used it that way but I was considering e.g. querying test > binaries (produced at build time) for the tests they define and making those > available dynamically when ctest processes CTestTestfile.cmake. This is in > contrast to e.g. FindGTests.cmake's GTEST_ADD_TESTS() which tries to > accomplish the same thing at configuration time by parsing test sources > instead. +1. I wrote about that approach here: http://purplekarrot.net/blog/cmake-and-test-suites.html -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] semantics of ctest_build(APPEND)
Hi, the documentation of the ctest_build command states "Append semantics are defined by the dashboard server in use." I think this is not precise enough. The client side effect of APPEND is that CTest creates an Append="true" attribute in the XML. It does not append anything to the already existing file. The existing file is overwritten. For append to work as expected, it is necessary to call ctest_submit(PARTS Build) between the ctest_build commands. This is not documented. Cheers, Daniel -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[Cmake-commits] CMake branch, next, updated. v3.6.2-2458-g7ee381d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 7ee381d0f5f46674cab4e9554236d6249010655d (commit) via 05e6d18bebfa01059ebb43505c0eba6f6c56af73 (commit) from ac947c5134adb8bf9a100843082b45c4a7ed7097 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ee381d0f5f46674cab4e9554236d6249010655d commit 7ee381d0f5f46674cab4e9554236d6249010655d Merge: ac947c5 05e6d18 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Sep 25 01:52:46 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sun Sep 25 01:52:46 2016 -0400 Merge topic 'auto-ptr' into next 05e6d18b fixup! Add a feature check to test availability of auto_ptr https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05e6d18bebfa01059ebb43505c0eba6f6c56af73 commit 05e6d18bebfa01059ebb43505c0eba6f6c56af73 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Sep 25 07:52:23 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Sep 25 07:52:23 2016 +0200 fixup! Add a feature check to test availability of auto_ptr diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index 83bcff5..80c9f3b 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -32,11 +32,11 @@ function(cm_check_cxx_feature name) endfunction() if(CMAKE_CXX_STANDARD) + cm_check_cxx_feature(auto_ptr) cm_check_cxx_feature(make_unique) if(CMake_HAVE_CXX_MAKE_UNIQUE) set(CMake_HAVE_CXX_UNIQUE_PTR 1) endif() - cm_check_cxx_feature(auto_ptr) cm_check_cxx_feature(nullptr) cm_check_cxx_feature(override) cm_check_cxx_feature(unique_ptr) --- Summary of changes: Source/Checks/cm_cxx_features.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.6.2-2442-g9041fb2
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 9041fb2470a9df8ce922bb0c8e591e99b98fd5fd (commit) via 92207752dfaeeffe674946a7139475777ad90eac (commit) from ffa78c37c8efccc0d73ceae0fd0c31eabca1633d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9041fb2470a9df8ce922bb0c8e591e99b98fd5fd commit 9041fb2470a9df8ce922bb0c8e591e99b98fd5fd Merge: ffa78c3 9220775 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 23 16:44:08 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Sep 23 16:44:08 2016 -0400 Merge topic 'tidy-server' into next 92207752 cmServer: add braces around conditional statements https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92207752dfaeeffe674946a7139475777ad90eac commit 92207752dfaeeffe674946a7139475777ad90eac Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 23 22:43:36 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Sep 23 22:43:36 2016 +0200 cmServer: add braces around conditional statements diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx index d5dac4e..46c1946 100644 --- a/Source/cmServer.cxx +++ b/Source/cmServer.cxx @@ -123,8 +123,9 @@ void cmServer::RegisterProtocol(cmServerProtocol* protocol) [version](cmServerProtocol* p) { return p->ProtocolVersion() == version; }); - if (it == this->SupportedProtocols.end()) + if (it == this->SupportedProtocols.end()) { this->SupportedProtocols.push_back(protocol); + } } void cmServer::PrintHello() const @@ -181,37 +182,44 @@ void cmServer::reportMessage(const char* msg, const char* title, cmServerResponse cmServer::SetProtocolVersion(const cmServerRequest& request) { - if (request.Type != kHANDSHAKE_TYPE) + if (request.Type != kHANDSHAKE_TYPE) { return request.ReportError("Waiting for type \"" + kHANDSHAKE_TYPE + "\"."); + } Json::Value requestedProtocolVersion = request.Data[kPROTOCOL_VERSION_KEY]; - if (requestedProtocolVersion.isNull()) + if (requestedProtocolVersion.isNull()) { return request.ReportError("\"" + kPROTOCOL_VERSION_KEY + "\" is required for \"" + kHANDSHAKE_TYPE + "\"."); + } - if (!requestedProtocolVersion.isObject()) + if (!requestedProtocolVersion.isObject()) { return request.ReportError("\"" + kPROTOCOL_VERSION_KEY + "\" must be a JSON object."); + } Json::Value majorValue = requestedProtocolVersion[kMAJOR_KEY]; - if (!majorValue.isInt()) + if (!majorValue.isInt()) { return request.ReportError("\"" + kMAJOR_KEY + "\" must be set and an integer."); + } Json::Value minorValue = requestedProtocolVersion[kMINOR_KEY]; - if (!minorValue.isNull() && !minorValue.isInt()) + if (!minorValue.isNull() && !minorValue.isInt()) { return request.ReportError("\"" + kMINOR_KEY + "\" must be unset or an integer."); + } const int major = majorValue.asInt(); const int minor = minorValue.isNull() ? -1 : minorValue.asInt(); - if (major < 0) + if (major < 0) { return request.ReportError("\"" + kMAJOR_KEY + "\" must be >= 0."); - if (!minorValue.isNull() && minor < 0) + } + if (!minorValue.isNull() && minor < 0) { return request.ReportError("\"" + kMINOR_KEY + "\" must be >= 0 when set."); + } this->Protocol = this->FindMatchingProtocol(this->SupportedProtocols, major, minor); @@ -284,12 +292,15 @@ cmServerProtocol* cmServer::FindMatchingProtocol( cmServerProtocol* bestMatch = nullptr; for (auto protocol : protocols) { auto version = protocol->ProtocolVersion(); -if (major != version.first) +if (major != version.first) { continue; -if (minor == version.second) +} +if (minor == version.second) { return protocol; -if (!bestMatch || bestMatch->ProtocolVersion().second < version.second) +} +if (!bestMatch || bestMatch->ProtocolVersion().second < version.second) { bestMatch = protocol;
[Cmake-commits] CMake branch, next, updated. v3.6.2-2440-gffa78c3
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via ffa78c37c8efccc0d73ceae0fd0c31eabca1633d (commit) via b941f3bfe7ba3bffd535372c2a4d9d668bc83356 (commit) via a5a7771a428a1d4a9bb671e56ea6d497361bc753 (commit) via 6ed564577dd0fffdd7dabfaa0ba14e2518c26048 (commit) from 3c6d4f69016e6ce48430b3d49c63857aaeb14b76 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ffa78c37c8efccc0d73ceae0fd0c31eabca1633d commit ffa78c37c8efccc0d73ceae0fd0c31eabca1633d Merge: 3c6d4f6 b941f3b Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 23 16:07:41 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Sep 23 16:07:41 2016 -0400 Merge topic 'ctest-no-manual-delete' into next b941f3bf CTest::CompressString: Avoid manual delete a5a7771a CTest::CompressString: Reorder code to avoid unnecessary allocation 6ed56457 CTest::Base64EncodeFile: Avoid manual delete https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b941f3bfe7ba3bffd535372c2a4d9d668bc83356 commit b941f3bfe7ba3bffd535372c2a4d9d668bc83356 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 23 22:06:17 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Sep 23 22:06:17 2016 +0200 CTest::CompressString: Avoid manual delete diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 0624b52..9b5248e 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2803,34 +2803,29 @@ bool cmCTest::CompressString(std::string& str) // zlib makes the guarantee that this is the maximum output size int outSize = static_cast(static_cast(str.size()) * 1.001 + 13.0); - unsigned char* out = new unsigned char[outSize]; + std::vector out(outSize); strm.avail_in = static_cast(str.size()); strm.next_in = in; strm.avail_out = outSize; - strm.next_out = out; + strm.next_out = [0]; ret = deflate(, Z_FINISH); if (ret == Z_STREAM_ERROR || ret != Z_STREAM_END) { cmCTestLog(this, ERROR_MESSAGE, "Error during gzip compression." << std::endl); -delete[] out; return false; } (void)deflateEnd(); // Now base64 encode the resulting binary string - unsigned char* base64EncodedBuffer = new unsigned char[(outSize * 3) / 2]; + std::vector base64EncodedBuffer((outSize * 3) / 2); size_t rlen = -cmsysBase64_Encode(out, strm.total_out, base64EncodedBuffer, 1); +cmsysBase64_Encode([0], strm.total_out, [0], 1); - str = ""; - str.append(reinterpret_cast<char*>(base64EncodedBuffer), rlen); - - delete[] base64EncodedBuffer; - delete[] out; + str.assign(reinterpret_cast<char*>([0]), rlen); return true; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5a7771a428a1d4a9bb671e56ea6d497361bc753 commit a5a7771a428a1d4a9bb671e56ea6d497361bc753 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 23 22:04:47 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Sep 23 22:04:47 2016 +0200 CTest::CompressString: Reorder code to avoid unnecessary allocation diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index d058ca7..0624b52 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2790,22 +2790,21 @@ bool cmCTest::CompressString(std::string& str) int ret; z_stream strm; - unsigned char* in = -reinterpret_cast(const_cast<char*>(str.c_str())); - // zlib makes the guarantee that this is the maximum output size - int outSize = -static_cast(static_cast(str.size()) * 1.001 + 13.0); - unsigned char* out = new unsigned char[outSize]; - strm.zalloc = Z_NULL; strm.zfree = Z_NULL; strm.opaque = Z_NULL; ret = deflateInit(, -1); // default compression level if (ret != Z_OK) { -delete[] out; return false; } + unsigned char* in = +reinterpret_cast(const_cast<char*>(str.c_str())); + // zlib makes the guarantee that this is the maximum output size + int outSize = +static_cast(static_cast(str.size()) * 1.001 + 13.0); + unsigned char* out = new unsigned char[outSize]; + strm.avail_in = static_cast(str.size()); strm.next_in = in; strm.avail_out = outSize; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ed564577dd0fffdd7dabfaa0ba14e2518c26048 commit 6ed564577dd0fffdd7dabfaa0ba14e2518c26048 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 23 22:03:49 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate:
[Cmake-commits] CMake branch, next, updated. v3.6.2-2436-g3c6d4f6
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 3c6d4f69016e6ce48430b3d49c63857aaeb14b76 (commit) via 061e0e1b30ad8db23e9c416c983627c618cb2737 (commit) via a2bf3ec9f86a3395ba79764167bd44690a379766 (commit) from b09e96ba1960ce16f09b73767b9d3a2a171b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3c6d4f69016e6ce48430b3d49c63857aaeb14b76 commit 3c6d4f69016e6ce48430b3d49c63857aaeb14b76 Merge: b09e900 061e0e1 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 23 15:57:08 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Sep 23 15:57:08 2016 -0400 Merge topic 'auto-ptr' into next 061e0e1b Use std::auto_ptr on compilers that do not warn about it a2bf3ec9 Add a feature check to test availability of auto_ptr https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=061e0e1b30ad8db23e9c416c983627c618cb2737 commit 061e0e1b30ad8db23e9c416c983627c618cb2737 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 23 21:56:34 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Sep 23 21:56:34 2016 +0200 Use std::auto_ptr on compilers that do not warn about it diff --git a/Source/cm_auto_ptr.hxx b/Source/cm_auto_ptr.hxx index f6c4362..f38eda5 100644 --- a/Source/cm_auto_ptr.hxx +++ b/Source/cm_auto_ptr.hxx @@ -14,7 +14,13 @@ #include -// FIXME: Use std::auto_ptr on compilers that do not warn about it. +#ifdef CMake_HAVE_CXX_AUTO_PTR + +#include +#define CM_AUTO_PTR std::auto_ptr + +#else + #define CM_AUTO_PTR cm::auto_ptr // The HP compiler cannot handle the conversions necessary to use @@ -219,3 +225,5 @@ public: #endif #endif + +#endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2bf3ec9f86a3395ba79764167bd44690a379766 commit a2bf3ec9f86a3395ba79764167bd44690a379766 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 23 21:49:12 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Sep 23 21:49:12 2016 +0200 Add a feature check to test availability of auto_ptr diff --git a/Source/Checks/cm_cxx_auto_ptr.cxx b/Source/Checks/cm_cxx_auto_ptr.cxx new file mode 100644 index 000..fc49346 --- /dev/null +++ b/Source/Checks/cm_cxx_auto_ptr.cxx @@ -0,0 +1,16 @@ +#include + +std::auto_ptr get_auto_ptr() +{ + return std::auto_ptr(new int(0)); +} + +int use_auto_ptr(std::auto_ptr ptr) +{ + return *ptr; +} + +int main() +{ + return use_auto_ptr(get_auto_ptr()); +} diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index c6a532f..83bcff5 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -36,6 +36,7 @@ if(CMAKE_CXX_STANDARD) if(CMake_HAVE_CXX_MAKE_UNIQUE) set(CMake_HAVE_CXX_UNIQUE_PTR 1) endif() + cm_check_cxx_feature(auto_ptr) cm_check_cxx_feature(nullptr) cm_check_cxx_feature(override) cm_check_cxx_feature(unique_ptr) diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 8365367..8a1e81f 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -30,6 +30,7 @@ #cmakedefine CMAKE_USE_MACH_PARSER #cmakedefine CMAKE_USE_LIBUV #cmakedefine CMAKE_ENCODING_UTF8 +#cmakedefine CMake_HAVE_CXX_AUTO_PTR #cmakedefine CMake_HAVE_CXX_MAKE_UNIQUE #cmakedefine CMake_HAVE_CXX_NULLPTR #cmakedefine CMake_HAVE_CXX_OVERRIDE --- Summary of changes: Source/Checks/cm_cxx_auto_ptr.cxx | 16 Source/Checks/cm_cxx_features.cmake |1 + Source/cmConfigure.cmake.h.in |1 + Source/cm_auto_ptr.hxx | 10 +- 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 Source/Checks/cm_cxx_auto_ptr.cxx hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.6.2-2139-ga1d30dc
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via a1d30dcccfa79e3f79ab13c88749a8d0f04f14aa (commit) via 3fab1fef23476b27274cddf4bb8f6cbe8d36c712 (commit) from df4c1374fb8c4e1a966fc3610c4af0fc13d05fd5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1d30dcccfa79e3f79ab13c88749a8d0f04f14aa commit a1d30dcccfa79e3f79ab13c88749a8d0f04f14aa Merge: df4c137 3fab1fe Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 16 17:31:48 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Sep 16 17:31:48 2016 -0400 Merge topic 'clang-tidy-fixes' into next 3fab1fef cmNinjaNormalTargetGenerator: make sure comments match parameter names https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3fab1fef23476b27274cddf4bb8f6cbe8d36c712 commit 3fab1fef23476b27274cddf4bb8f6cbe8d36c712 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 16 23:31:37 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Sep 16 23:31:37 2016 +0200 cmNinjaNormalTargetGenerator: make sure comments match parameter names diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 335b552..b2384b0 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -336,7 +336,7 @@ std::vector cmNinjaNormalTargetGenerator::ComputeLinkCmd() std::string targetOutputReal = this->ConvertToNinjaPath(gt.GetFullPath(cfgName, /*implib=*/false, - /*realpath=*/true)); + /*realname=*/true)); cmakeCommand += targetOutputReal; cmakeCommand += " || true"; linkCmds.push_back(cmakeCommand); @@ -414,7 +414,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() std::string targetOutputReal = ConvertToNinjaPath(gt.GetFullPath(cfgName, /*implib=*/false, - /*realpath=*/true)); + /*realname=*/true)); std::string targetOutputImplib = ConvertToNinjaPath(gt.GetFullPath(cfgName, /*implib=*/true)); --- Summary of changes: Source/cmNinjaNormalTargetGenerator.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.6.2-2137-gdf4c137
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via df4c1374fb8c4e1a966fc3610c4af0fc13d05fd5 (commit) via 7b94a7adb32d1a8966628d2b194cfc5de04d7ecc (commit) from 7a2e9e8cb77e7ceeb7a160c8e83ed974c3db10b2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df4c1374fb8c4e1a966fc3610c4af0fc13d05fd5 commit df4c1374fb8c4e1a966fc3610c4af0fc13d05fd5 Merge: 7a2e9e8 7b94a7a Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 16 17:17:39 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Sep 16 17:17:39 2016 -0400 Merge topic 'clang-tidy-fixes' into next 7b94a7ad cmCommandArgumentsHelper: simplify boolean expression https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b94a7adb32d1a8966628d2b194cfc5de04d7ecc commit 7b94a7adb32d1a8966628d2b194cfc5de04d7ecc Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 16 23:16:54 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Sep 16 23:16:54 2016 +0200 cmCommandArgumentsHelper: simplify boolean expression diff --git a/Source/cmCommandArgumentsHelper.cxx b/Source/cmCommandArgumentsHelper.cxx index 1345bd5..b8fe365 100644 --- a/Source/cmCommandArgumentsHelper.cxx +++ b/Source/cmCommandArgumentsHelper.cxx @@ -57,14 +57,7 @@ bool cmCommandArgument::MayFollow(const cmCommandArgument* current) const if (this->ArgumentsBeforeEmpty) { return true; } - - std::set::const_iterator argIt = -this->ArgumentsBefore.find(current); - if (argIt != this->ArgumentsBefore.end()) { -return true; - } - - return false; + return this->ArgumentsBefore.find(current) != this->ArgumentsBefore.end(); } bool cmCommandArgument::KeyMatches(const std::string& key) const --- Summary of changes: Source/cmCommandArgumentsHelper.cxx |9 + 1 file changed, 1 insertion(+), 8 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.6.2-2135-g7a2e9e8
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 7a2e9e8cb77e7ceeb7a160c8e83ed974c3db10b2 (commit) via 782fcbb92e096a28f899c89eed6fe23f29cd997c (commit) via 809ca6c81fa23cec111a9e97529d71538c55f9eb (commit) via 516f8edb2e061749c56b6f9a58332fbf59e45a1a (commit) via d9f5d3c50fe376423382d6445f7fb2906a43469e (commit) via 3fda10945132fdd2dc11ea074a96789a4afa86bc (commit) from f9224eb7b28c6c6456524906103e7f26b5afe17e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a2e9e8cb77e7ceeb7a160c8e83ed974c3db10b2 commit 7a2e9e8cb77e7ceeb7a160c8e83ed974c3db10b2 Merge: f9224eb 782fcbb Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 16 17:04:57 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Sep 16 17:04:57 2016 -0400 Merge topic 'clang-tidy-fixes' into next 782fcbb9 Use CM_NULLPTR 809ca6c8 Use braces around statements 516f8edb Avoid else after return d9f5d3c5 Remove redundant get() call on smart pointer 3fda1094 Mark overridden functions with CM_OVERRIDE https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=782fcbb92e096a28f899c89eed6fe23f29cd997c commit 782fcbb92e096a28f899c89eed6fe23f29cd997c Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 16 23:01:40 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Sep 16 23:01:40 2016 +0200 Use CM_NULLPTR diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index 3aef9cf..8063328 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -253,7 +253,7 @@ bool cmGetPropertyCommand::HandleTargetMode() if (this->Makefile->IsAlias(this->Name)) { return this->StoreResult(target->GetName().c_str()); } - return this->StoreResult(NULL); + return this->StoreResult(CM_NULLPTR); } return this->StoreResult( target->GetProperty(this->PropertyName, this->Makefile)); diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index f55fefb..8450360 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -1118,7 +1118,7 @@ bool cmInstallCommand::HandleExportAndroidMKMode( cmCAEnabler exportOld(, "EXPORT_LINK_INTERFACE_LIBRARIES", ); cmCAString filename(, "FILE", ); - exp.Follows(0); + exp.Follows(CM_NULLPTR); ica.ArgumentGroup.Follows(); std::vector unknownArgs; diff --git a/Source/cm_auto_ptr.hxx b/Source/cm_auto_ptr.hxx index 2cd35c3..f6c4362 100644 --- a/Source/cm_auto_ptr.hxx +++ b/Source/cm_auto_ptr.hxx @@ -12,7 +12,7 @@ #ifndef CM_AUTO_PTR_HXX #define CM_AUTO_PTR_HXX -#include +#include // FIXME: Use std::auto_ptr on compilers that do not warn about it. #define CM_AUTO_PTR cm::auto_ptr @@ -115,7 +115,7 @@ public: * * auto_ptr ptr(new X()); */ - explicit auto_ptr(X* p = 0) throw() + explicit auto_ptr(X* p = CM_NULLPTR) throw() : x_(p) { } @@ -157,7 +157,7 @@ public: X* release() throw() { X* x = this->x_; -this->x_ = 0; +this->x_ = CM_NULLPTR; return x; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=809ca6c81fa23cec111a9e97529d71538c55f9eb commit 809ca6c81fa23cec111a9e97529d71538c55f9eb Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Fri Sep 16 22:52:02 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Fri Sep 16 22:52:02 2016 +0200 Use braces around statements diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx index fdbd5e7..6ff7575 100644 --- a/Source/cmCMakeHostSystemInformationCommand.cxx +++ b/Source/cmCMakeHostSystemInformationCommand.cxx @@ -42,9 +42,9 @@ bool cmCMakeHostSystemInformationCommand::InitialPass( result_list += ";"; } std::string value; -if (!this->GetValue(info, key, value)) +if (!this->GetValue(info, key, value)) { return false; - +} result_list += value; } diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 8356fc7..a13309d 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -600,8 +600,9 @@ bool cmFileCommand::HandleStringsCommand(std::vector const& args) // how many octets are there? unsigned int num_utf8_bytes = 0; for (unsigned int j = 0; num_utf8_bytes == 0 && j < 3; j++
[Cmake-commits] CMake branch, next, updated. v3.6.2-2096-gcafd74b
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via cafd74b307f291f13ac950a3cb671c758676f0ad (commit) via 73f648f167e9b11739c4dbbdbd5c024baf1e39ad (commit) from 0c73aea46ad9b453e69e0b9de331e1d28742a888 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cafd74b307f291f13ac950a3cb671c758676f0ad commit cafd74b307f291f13ac950a3cb671c758676f0ad Merge: 0c73aea 73f648f Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Thu Sep 15 17:59:57 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Sep 15 17:59:57 2016 -0400 Merge topic 'size-empty' into next 73f648f1 use empty method to check for emptyness https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73f648f167e9b11739c4dbbdbd5c024baf1e39ad commit 73f648f167e9b11739c4dbbdbd5c024baf1e39ad Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Thu Sep 15 23:59:29 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Thu Sep 15 23:59:29 2016 +0200 use empty method to check for emptyness diff --git a/Source/cmAddCompileOptionsCommand.cxx b/Source/cmAddCompileOptionsCommand.cxx index 2223cf4..cbba831 100644 --- a/Source/cmAddCompileOptionsCommand.cxx +++ b/Source/cmAddCompileOptionsCommand.cxx @@ -14,7 +14,7 @@ bool cmAddCompileOptionsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { return true; } diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index 9dc7c59..8e14966 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -18,7 +18,7 @@ bool cmAddCustomTargetCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmAddDefinitionsCommand.cxx b/Source/cmAddDefinitionsCommand.cxx index 2d0d026..5f2b32f 100644 --- a/Source/cmAddDefinitionsCommand.cxx +++ b/Source/cmAddDefinitionsCommand.cxx @@ -16,7 +16,7 @@ bool cmAddDefinitionsCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { // it is OK to have no arguments - if (args.size() < 1) { + if (args.empty()) { return true; } diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 4516ed2..5a40050 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -18,7 +18,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx index 63a9051..1a781cc 100644 --- a/Source/cmAddSubDirectoryCommand.cxx +++ b/Source/cmAddSubDirectoryCommand.cxx @@ -15,7 +15,7 @@ bool cmAddSubDirectoryCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx index 9830867..6146053 100644 --- a/Source/cmBuildCommand.cxx +++ b/Source/cmBuildCommand.cxx @@ -27,7 +27,7 @@ bool cmBuildCommand::InitialPass(std::vector const& args, bool cmBuildCommand::MainSignature(std::vector const& args) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("requires at least one argument naming a CMake variable"); return false; } diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx index 27234d7..3d02034 100644 --- a/Source/cmBuildNameCommand.cxx +++ b/Source/cmBuildNameCommand.cxx @@ -22,7 +22,7 @@ bool cmBuildNameCommand::InitialPass(std::vector const& args, "The build_name command should not be called; see CMP0036.")) { return true; } - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index 07e0885..03c4a37 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePoli
[Cmake-commits] CMake branch, next, updated. v3.6.2-1926-g997dd7f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 997dd7fe2e6cb1369d6c8435bf34fd25f51728d9 (commit) via 8154a4b097286c61d0a98703bd5662dd79bd9b97 (commit) from a7316d4696dc3e6b4d5fae8b09132f0821c2e810 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=997dd7fe2e6cb1369d6c8435bf34fd25f51728d9 commit 997dd7fe2e6cb1369d6c8435bf34fd25f51728d9 Merge: a7316d4 8154a4b Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Sep 11 14:32:15 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Sun Sep 11 14:32:15 2016 -0400 Merge topic 'clang-tidy' into next 8154a4b0 fixup! cmSystemTools: simplify boolean expressions https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8154a4b097286c61d0a98703bd5662dd79bd9b97 commit 8154a4b097286c61d0a98703bd5662dd79bd9b97 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sun Sep 11 20:31:43 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Sep 11 20:31:43 2016 +0200 fixup! cmSystemTools: simplify boolean expressions diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index ae0323b..7352217 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1766,7 +1766,7 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile) if (!GetFileTime(hFrom, , , )) { return false; } - return SetFileTime(hTo, , , ); + return SetFileTime(hTo, , , ) != 0; #else struct stat fromStat; if (stat(fromFile, ) < 0) { @@ -1824,7 +1824,7 @@ bool cmSystemTools::FileTimeSet(const char* fname, cmSystemToolsFileTime* t) return false; } return SetFileTime(h, >timeCreation, >timeLastAccess, - >timeLastWrite); + >timeLastWrite) != 0; #else return utime(fname, >timeBuf) >= 0; #endif --- Summary of changes: Source/cmSystemTools.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.6.2-1881-g59edc3f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 59edc3fb74ca1eb857601c63bb01c682c1a8466b (commit) via cc6b948e5ea86996fe65014ce8f97bf92b46e4c0 (commit) via 52052ef88b6f46a12c8430395ae8b419971fcb35 (commit) via 3b3622305bb950f16f238f030c8f32786ad3511a (commit) from 905f5f00754d5e3e632b829e4f4f2e4db6f64f52 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=59edc3fb74ca1eb857601c63bb01c682c1a8466b commit 59edc3fb74ca1eb857601c63bb01c682c1a8466b Merge: 905f5f0 cc6b948 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Thu Sep 8 17:55:06 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Sep 8 17:55:06 2016 -0400 Merge topic 'cmGeneratorTarget-cleanup' into next cc6b948e cmGeneratorTarget: factor out common part of AddSources commands 52052ef8 cmGeneratorTarget: use erase-unique instead of reinitialization 3b362230 cmGeneratorTarget: don't clear container in destructor https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc6b948e5ea86996fe65014ce8f97bf92b46e4c0 commit cc6b948e5ea86996fe65014ce8f97bf92b46e4c0 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Wed Sep 7 21:14:29 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Thu Sep 8 23:47:16 2016 +0200 cmGeneratorTarget: factor out common part of AddSources commands diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 4baec03..7dd8e7f 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -468,9 +468,8 @@ std::string cmGeneratorTarget::GetOutputName(const std::string& config, return i->second; } -void cmGeneratorTarget::AddSource(const std::string& src) +void cmGeneratorTarget::AddSourceCommon(const std::string& src) { - this->Target->AddSource(src); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); cmGeneratorExpression ge(lfbt); CM_AUTO_PTR cge = ge.Parse(src); @@ -480,19 +479,17 @@ void cmGeneratorTarget::AddSource(const std::string& src) this->LinkImplementationLanguageIsContextDependent = true; } +void cmGeneratorTarget::AddSource(const std::string& src) +{ + this->Target->AddSource(src); + this->AddSourceCommon(src); +} + void cmGeneratorTarget::AddTracedSources(std::vector const& srcs) { this->Target->AddTracedSources(srcs); if (!srcs.empty()) { -std::string srcFiles = cmJoin(srcs, ";"); -this->SourceFilesMap.clear(); -this->LinkImplementationLanguageIsContextDependent = true; -cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); -cmGeneratorExpression ge(lfbt); -CM_AUTO_PTR cge = ge.Parse(srcFiles); -cge->SetEvaluateForBuildsystem(true); -this->SourceEntries.push_back( - new cmGeneratorTarget::TargetPropertyEntry(cge)); +this->AddSourceCommon(cmJoin(srcs, ";")); } } diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 173f15d..715220e 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -540,6 +540,8 @@ public: std::string GetFortranModuleDirectory() const; private: + void AddSourceCommon(const std::string& src); + std::string CreateFortranModuleDirectory() const; mutable bool FortranModuleDirectoryCreated; mutable std::string FortranModuleDirectory; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52052ef88b6f46a12c8430395ae8b419971fcb35 commit 52052ef88b6f46a12c8430395ae8b419971fcb35 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Wed Sep 7 21:03:18 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Thu Sep 8 23:46:45 2016 +0200 cmGeneratorTarget: use erase-unique instead of reinitialization Just to make it easier to find places where containers are cleared in order to be recomputed. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 25917f8..4baec03 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -839,14 +839,10 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory( , result, excludeImported); } -std::set unique; -for (std::vector::iterator li = result.begin(); - li != result.end(); ++li) { - cmSystemTools::ConvertToUnixSlashes(*li); - unique.insert(*li); -} -result.clear(); -result.insert(result.end(), unique.begin(), unique.end()); +std::for_each(result.begin()
[Cmake-commits] CMake branch, next, updated. v3.6.2-1877-g905f5f0
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 905f5f00754d5e3e632b829e4f4f2e4db6f64f52 (commit) via befb6a645026bd7f64b6dc1dc1d370114f501375 (commit) via 3dde29bc72ad3b3f4cba6fc300df077fd4dc2a5c (commit) via 5d3b5bef11bc29bb00a14103433fea81e4dcc340 (commit) via ad42eb33b61ad262315bfa087dc7f4f0ddbca5fe (commit) from d803aae6f865545c4cc0702a52f73871aaf1de0e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=905f5f00754d5e3e632b829e4f4f2e4db6f64f52 commit 905f5f00754d5e3e632b829e4f4f2e4db6f64f52 Merge: d803aae befb6a6 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Thu Sep 8 17:43:58 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Sep 8 17:43:58 2016 -0400 Merge topic 'clang-tidy' into next befb6a64 cmDependsFortran: simplify boolean expression 3dde29bc cmSystemTools: simplify boolean expressions 5d3b5bef QCMakeCacheView: simplify boolean expression ad42eb33 QCMakeCacheView: no else after return https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=befb6a645026bd7f64b6dc1dc1d370114f501375 commit befb6a645026bd7f64b6dc1dc1d370114f501375 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Thu Sep 8 23:43:06 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Thu Sep 8 23:43:06 2016 +0200 cmDependsFortran: simplify boolean expression diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index b7e006d..eb4c1ec 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -712,10 +712,5 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, // Compare the remaining content. If no compiler id matched above, // including the case none was given, this will compare the whole // content. - if (!cmFortranStreamsDiffer(finModFile, finStampFile)) { -return false; - } - - // The modules are different. - return true; + return cmFortranStreamsDiffer(finModFile, finStampFile); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3dde29bc72ad3b3f4cba6fc300df077fd4dc2a5c commit 3dde29bc72ad3b3f4cba6fc300df077fd4dc2a5c Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Thu Sep 8 23:41:31 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Thu Sep 8 23:41:31 2016 +0200 cmSystemTools: simplify boolean expressions diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 7da9975..ae0323b 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1766,9 +1766,7 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile) if (!GetFileTime(hFrom, , , )) { return false; } - if (!SetFileTime(hTo, , , )) { -return false; - } + return SetFileTime(hTo, , , ); #else struct stat fromStat; if (stat(fromFile, ) < 0) { @@ -1778,11 +1776,8 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile) struct utimbuf buf; buf.actime = fromStat.st_atime; buf.modtime = fromStat.st_mtime; - if (utime(toFile, ) < 0) { -return false; - } + return utime(toFile, ) >= 0; #endif - return true; } cmSystemToolsFileTime* cmSystemTools::FileTimeNew() @@ -1828,16 +1823,11 @@ bool cmSystemTools::FileTimeSet(const char* fname, cmSystemToolsFileTime* t) if (!h) { return false; } - if (!SetFileTime(h, >timeCreation, >timeLastAccess, - >timeLastWrite)) { -return false; - } + return SetFileTime(h, >timeCreation, >timeLastAccess, + >timeLastWrite); #else - if (utime(fname, >timeBuf) < 0) { -return false; - } + return utime(fname, >timeBuf) >= 0; #endif - return true; } #ifdef _WIN32 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d3b5bef11bc29bb00a14103433fea81e4dcc340 commit 5d3b5bef11bc29bb00a14103433fea81e4dcc340 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Thu Sep 8 23:35:59 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Thu Sep 8 23:35:59 2016 +0200 QCMakeCacheView: simplify boolean expression diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index ec7918b..ed11f7b 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -95,10 +95,7 @@ protected: // if there are no children if (!m->hasChildren(idx)) { bool adv = m->data(idx, QCMakeCacheModel::AdvancedRole).toBool(); - if (!adv |
Re: [cmake-developers] [CMake] Setup/tear down steps for CTest
On Thu, Sep 8, 2016 at 5:52 PM, Brad King <brad.k...@kitware.com> wrote: > On 09/08/2016 10:15 AM, Craig Scott wrote: >> the current behaviour of DEPENDS. At the moment, if test B depends >> on test A, test B still executes if test A fails. >> It is unexpected because I'd initially have thought of DEPENDS as >> meaning I can't run test B if test A fails, after all, B depends >> on A which I'd interpret to mean if A fails, then something B requires >> isn't working. Conversely, this is also useful because until now, >> DEPENDS was the only way to get cleanup functionality to run after >> other tests, and if those other tests fail, we still want the >> cleanup to occur. > > At one time we only had serial testing so the order of tests was > fully controllable and based on the order of addition. There were > never any conditions for whether a test would run based on results > of other tests. Then when parallel testing was added we need a > way to restore *order* dependencies, so DEPENDS was added just > for that. Maybe a better name would have been RUN_AFTER. > >> adding a DEPENDS_ON_SUCCESS test property or something similar >> which would implement the perhaps more intuitive behaviour of not >> running dependent tests when a dependee fails. If that was done, >> then implementing the "don't run fixture tests if any fixture >> setup fails" logic would be trivial. > > The semantics of this will have to be carefully though out, in > particular with respect to enabling test dependencies. Right now > ctest arguments like -E can exclude tests. What if those are > dependencies of included tests? > > I think if we introduce the notion of tests requiring other tests > then a new model of test selection and enablement needs to be > designed. Some kind of test DAG could be defined with various > roots and subgraphs being selectable an causing all reachable > tests to be included. This could be expanded even further. If "tests requiring other tests" is generalized to "tests requiring X", wouldn't this allow incremental testing? Say you change one file in your project. You rebuild only the parts of the project that are affected by this change. Then you rerun only the tests that are affected by the change. This really has to be carefully thought out. Cheers, Daniel -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Developer tasks - Refactoring
On Wed, Feb 10, 2016 at 12:12 AM, Stephen Kellywrote: > 3) Compute cmGeneratorTarget state non-lazily in its constructor. > * Historically target state for generators was computed lazily because it > might need to be cleared and re-computed. That is no-longer true. SourceFilesMap is cleared in a call to AddSource. It is then recomputed the next time GetSourceFiles is called. > * For example, the LinkInformation is populated lazily in > cmGeneratorTarget::GetLinkInformation. > * Instead the LinkInformation could be populated in the cmGeneratorTarget > constructor for all known configurations. That is what generators will > request during generate-time anyway. > * Doing this will make it possible to split a cmComputedTarget out of > cmGeneratorTarget. I started splitting out a cmComputedTarget. It is initialized in its constructor for one single configuration. The entries of the ComputedTargets map are computed and recomputed lazily because of the reason mentioned above. Please review: https://github.com/purpleKarrot/CMake/commits/computed-target -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[Cmake-commits] CMake branch, next, updated. v3.6.1-1790-g8752d76
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 8752d765ae63edd5153a0547727989a4efe4d809 (commit) via 0039ffa2163665856be1e772146442f2c7418c6c (commit) from 425a1248b7c91f3bd1d2a4facbfca2b7889878a6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8752d765ae63edd5153a0547727989a4efe4d809 commit 8752d765ae63edd5153a0547727989a4efe4d809 Merge: 425a124 0039ffa Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Sep 5 17:18:34 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Sep 5 17:18:34 2016 -0400 Merge topic 'cm_nullptr' into next 0039ffa2 use CM_NULLPTR https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0039ffa2163665856be1e772146442f2c7418c6c commit 0039ffa2163665856be1e772146442f2c7418c6c Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Sep 5 23:18:05 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Mon Sep 5 23:18:05 2016 +0200 use CM_NULLPTR diff --git a/Source/cmFilePathUuid.h b/Source/cmFilePathUuid.h index 87cfcf8..b54dc47 100644 --- a/Source/cmFilePathUuid.h +++ b/Source/cmFilePathUuid.h @@ -52,8 +52,9 @@ public: * @arg outputPrefix optional string to prepend to the result * @arg outputSuffix optional string to append to the result */ - std::string get(const std::string& filePath, const char* outputPrefix = NULL, - const char* outputSuffix = NULL); + std::string get(const std::string& filePath, + const char* outputPrefix = CM_NULLPTR, + const char* outputSuffix = CM_NULLPTR); private: void initParentDirs(const std::string& currentSrcDir, diff --git a/Source/cmXMLParser.cxx b/Source/cmXMLParser.cxx index 7c53a3d..9878912 100644 --- a/Source/cmXMLParser.cxx +++ b/Source/cmXMLParser.cxx @@ -20,10 +20,10 @@ cmXMLParser::cmXMLParser() { - this->Parser = 0; + this->Parser = CM_NULLPTR; this->ParseError = 0; - this->ReportCallback = 0; - this->ReportCallbackData = 0; + this->ReportCallback = CM_NULLPTR; + this->ReportCallbackData = CM_NULLPTR; } cmXMLParser::~cmXMLParser() @@ -64,7 +64,7 @@ int cmXMLParser::InitializeParser() } // Create the expat XML parser. - this->Parser = XML_ParserCreate(0); + this->Parser = XML_ParserCreate(CM_NULLPTR); XML_SetElementHandler(static_cast(this->Parser), , ); XML_SetCharacterDataHandler(static_cast(this->Parser), @@ -108,7 +108,7 @@ int cmXMLParser::CleanupParser() // Clean up the parser. XML_ParserFree(static_cast(this->Parser)); - this->Parser = 0; + this->Parser = CM_NULLPTR; return result; } @@ -165,7 +165,7 @@ const char* cmXMLParser::FindAttribute(const char** atts, } } } - return 0; + return CM_NULLPTR; } void cmXMLParserStartElement(void* parser, const char* name, const char** atts) diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index 529c830..0bf0a7c 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -148,7 +148,8 @@ int main() it != end; ++it) { std::vector command; cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), command); -if (!cmSystemTools::RunSingleCommand(command, 0, 0, 0, +if (!cmSystemTools::RunSingleCommand(command, CM_NULLPTR, CM_NULLPTR, + CM_NULLPTR, it->at("directory").c_str())) { std::cout << "ERROR: Failed to run command \"" << command[0] << "\"" << std::endl; diff --git a/Tests/CMakeLib/testXMLSafe.cxx b/Tests/CMakeLib/testXMLSafe.cxx index 356880c..c4aaf17 100644 --- a/Tests/CMakeLib/testXMLSafe.cxx +++ b/Tests/CMakeLib/testXMLSafe.cxx @@ -27,7 +27,7 @@ static test_pair const pairs[] = { { "angles <>", "angles " }, { "ampersand &", "ampersand " }, { "bad-byte \x80", "bad-byte [NON-UTF-8-BYTE-0x80]" }, - { 0, 0 } + { CM_NULLPTR, CM_NULLPTR } }; int testXMLSafe(int /*unused*/, char* /*unused*/ []) --- Summary of changes: Source/cmFilePathUuid.h |5 +++-- Source/cmXMLParser.cxx | 12 ++-- Tests/CMakeLib/run_compile_commands.cxx |3 ++-
[Cmake-commits] CMake branch, next, updated. v3.6.1-1788-g425a124
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 425a1248b7c91f3bd1d2a4facbfca2b7889878a6 (commit) via 8d52b94262c0201b37aab554d306a037a48e0ca3 (commit) from cb33be0a1655e5b9bd8abd609ac3c463182ac586 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=425a1248b7c91f3bd1d2a4facbfca2b7889878a6 commit 425a1248b7c91f3bd1d2a4facbfca2b7889878a6 Merge: cb33be0 8d52b94 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Sep 5 16:35:49 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Sep 5 16:35:49 2016 -0400 Merge topic 'qtdialog-tidy' into next 8d52b942 fixup! QtDialog: fix clang-tidy warnings https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d52b94262c0201b37aab554d306a037a48e0ca3 commit 8d52b94262c0201b37aab554d306a037a48e0ca3 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Mon Sep 5 22:35:31 2016 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Mon Sep 5 22:35:31 2016 +0200 fixup! QtDialog: fix clang-tidy warnings diff --git a/Source/QtDialog/Compilers.h b/Source/QtDialog/Compilers.h index bdb1962..276e2a5 100644 --- a/Source/QtDialog/Compilers.h +++ b/Source/QtDialog/Compilers.h @@ -3,6 +3,8 @@ #ifndef COMPILERS_HPP #define COMPILERS_HPP +#include + #include #include @@ -11,7 +13,7 @@ class Compilers : public QWidget, public Ui::Compilers { Q_OBJECT public: - Compilers(QWidget* p = NULL) + Compilers(QWidget* p = CM_NULLPTR) : QWidget(p) { this->setupUi(this); diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index a818c6b..7eadb09 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -13,6 +13,8 @@ #ifndef QCMake_h #define QCMake_h +#include + #include "cmake.h" #ifdef _MSC_VER @@ -71,7 +73,7 @@ class QCMake : public QObject { Q_OBJECT public: - QCMake(QObject* p = 0); + QCMake(QObject* p = CM_NULLPTR); ~QCMake(); public slots: /// load the cache file in a directory diff --git a/Source/QtDialog/QCMakeWidgets.h b/Source/QtDialog/QCMakeWidgets.h index f1e87ce..0d95e63 100644 --- a/Source/QtDialog/QCMakeWidgets.h +++ b/Source/QtDialog/QCMakeWidgets.h @@ -13,6 +13,8 @@ #ifndef QCMakeWidgets_h #define QCMakeWidgets_h +#include + #include #include #include @@ -43,7 +45,7 @@ class QCMakePathEditor : public QCMakeFileEditor { Q_OBJECT public: - QCMakePathEditor(QWidget* p = NULL, const QString& var = QString()); + QCMakePathEditor(QWidget* p = CM_NULLPTR, const QString& var = QString()); void chooseFile(); }; @@ -52,7 +54,8 @@ class QCMakeFilePathEditor : public QCMakeFileEditor { Q_OBJECT public: - QCMakeFilePathEditor(QWidget* p = NULL, const QString& var = QString()); + QCMakeFilePathEditor(QWidget* p = CM_NULLPTR, + const QString& var = QString()); void chooseFile(); }; --- Summary of changes: Source/QtDialog/Compilers.h |4 +++- Source/QtDialog/QCMake.h|4 +++- Source/QtDialog/QCMakeWidgets.h |7 +-- 3 files changed, 11 insertions(+), 4 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits