[cmake-developers] [PATCH] [RFC] handle c dependicies for files with utf-8 BOM
Hi, here is description of the problem: http://www.cmake.org/pipermail/cmake/2013-October/056008.html in short, cmake not handle dependencies of c/c++ source file from c/c++ header file, if source file has utf-8 BOM. So, if for example in your team used Visual Studio with preference to save files in utf-8 (Qt 5 now works only with UTF-8), and linux+cmake+gcc, then someday you see that you change header files, but corresponded c++ source file was not recompiled. Here (in attachment) is possible solution of this problem (it passes all tests, except two, but they fails and without this patch). -- /Evgeniy From 66a1f409f287af53725c513627da1940afb06465 Mon Sep 17 00:00:00 2001 From: Evgeniy A. Dushistov dushis...@mail.ru Date: Mon, 14 Oct 2013 11:56:50 +0400 Subject: [PATCH] handle c dependicies for files with utf-8 BOM --- Source/cmDependsC.cxx | 8 1 file changed, 8 insertions(+) diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index a252a1a..1d05797 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -249,6 +249,14 @@ bool cmDependsC::WriteDependencies(const std::setstd::string sources, std::ifstream fin(fullName.c_str()); if(fin) { + static const unsigned char UTF8_BOM[3] = {0xEF, 0xBB, 0xBF}; + unsigned char bom[3]; + fin.read(reinterpret_castchar *(bom), sizeof(bom)); + if ((fin !(bom[0] == UTF8_BOM[0] bom[1] == UTF8_BOM[1] bom[2] == UTF8_BOM[2])) || !fin) + { + fin.clear(); + fin.seekg(0, std::ios::beg); + } // Add this file as a dependency. dependencies.insert(fullName); -- 1.8.1.5 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] [RFC] handle c dependicies for files with utf-8 BOM
On 10/14/2013 10:47 AM, clin...@elemtech.com wrote: The patch appears to not handle empty files or files with less than 3 characters. Does it need to? [snip] - Reply message - From: Evgeniy Dushistov dushis...@mail.ru Here (in attachment) is possible solution of this problem (it passes all tests, except two, but they fails and without this patch). Incidentally I was just recently working on a fix to read CMake source files with a leading BOM. See below for a draft function to read a BOM. This is just work-in-progress, but it could be reviewed and ported to C++ streams. -Brad #include stdio.h enum cmBOM_e { cmBOM_None, cmBOM_UTF8, cmBOM_UTF16BE, cmBOM_UTF16LE, cmBOM_UTF32BE, cmBOM_UTF32LE }; typedef enum cmBOM_e cmBOM; static cmBOM cmBOM_Read(FILE* f) { unsigned char b[2]; if(fread(b, 1, 2, f) == 2) { if(b[0] == 0xEF b[1] == 0xBB) { if(fread(b, 1, 1, f) == 1 b[0] == 0xBF) { return cmBOM_UTF8; } } else if(b[0] == 0xFE b[1] == 0xFF) { return cmBOM_UTF16BE; } else if(b[0] == 0 b[1] == 0) { if(fread(b, 1, 2, f) == 2 b[0] == 0xFE b[1] == 0xFF) { return cmBOM_UTF32BE; } } else if(b[0] == 0xFF b[1] == 0xFE) { fpos_t p; fgetpos(f, p); if(fread(b, 1, 2, f) == 2 b[0] == 0 b[1] == 0) { return cmBOM_UTF32LE; } fsetpos(f, p); return cmBOM_UTF16LE; } } rewind(f); return cmBOM_None; } -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Converting CMake documentation to reStructuredText and Sphinx
On 10/13/2013 4:36 PM, Eric Noulard wrote: I have preliminary question though, since those change makes it possible to write documentation without touching the code are you planning to add missing --help- to ctest ? Did you plan something along that line? Yes, but the main issue is that the documentation for CTest variables does not exist anywhere in the source right now. After the transition to the new doc system it will be straightforward to add those docs. Actually in the new system the --help-* options will just process the .rst files in various combinations for display. For example, cmake --help-commands just prints manual/cmake-commands.7.rst which has a section for CTest commands. Then we need only to expose the same set of --help-* options through the ctest command. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Roadmap to CMake 3.0
On 10/13/2013 6:03 AM, Alexander Neundorf wrote: * New quoting syntax: Lua-style long-brackets. Quoting opens with [ followed by zero or more = followed by [ and closes with ] followed by the same number of = followed by ]. What's the purpose of the = between the square brackets ? One can choose a unique number of = to match an opening and closing bracket so that the closing bracket is known not to appear in the enclosed content. This avoids the need for any escaping even when closing brackets other lengths appear in the content. * Drop implementation of compatibility modes with CMake versions prior to 2.4.0 which is now over 7 years old. Yes, sounds old enough. Yes, and 2.4.0 will still be supported. It is only even older versions for which support will be dropped. I'd like to remove the --find-package mode, which was my attempt to make cmake packages easier to use by non-cmake projects. The idea was that you can use cmake --find-package JPEG similar to pkg-config, i.e. call it from handwritten makefiles or autoconf, and it prints the include dirs, link dirs and libs to link to stdout so they are handed as options to the compiler. To do that, it is/was relying on a set of standard variables (Foo_LIBRARIES, Foo_INCLUDE_DIRS and some slight variations) being set by Find-modules/Config files. Since it was recently decided that it is fine to recommend using imported target names directly and not to set the standard variables anymore, I don't see how I could improve this in the future. So instead I'd like to remove it instead of keeping a somewhat broken, sometimes working feature around. which is not used widely. Can't the --find-package mode evaluate the locations of targets named in the _LIBRARIES variables? In general it will have to evaluate full generator expressions too. I thought the idea of --find-package was to do all the transformations that CMake would do before putting the targets on the command line and then hand the result back. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Roadmap to CMake 3.0
On Mon, Oct 14, 2013 at 5:05 PM, Brad King brad.k...@kitware.com wrote: On 10/13/2013 6:03 AM, Alexander Neundorf wrote: * New quoting syntax: Lua-style long-brackets. Quoting opens with [ followed by zero or more = followed by [ and closes with ] followed by the same number of = followed by ]. What's the purpose of the = between the square brackets ? One can choose a unique number of = to match an opening and closing bracket so that the closing bracket is known not to appear in the enclosed content. This avoids the need for any escaping even when closing brackets other lengths appear in the content. This is commonly known as here document http://en.wikipedia.org/wiki/Here_document -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] find PATHS issues on Windows when Linux OS files are accessible
On 10/13/2013 7:46 PM, Alan W. Irwin wrote: bash.exe-3.1$ ls z:/usr/bin/lua z:/usr/bin/lua [snip] -- LUA_EXECUTABLE = /usr/bin/lua This is an obviously incorrect result since /usr/bin/lua does not exist from the Windows system perspective, i.e., It does exist when z: is the current working drive. This is considered a feature by some users. We've fielded bug reports in the past about it *not* working. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Perforce Patch for CTest
I'm developing the test, working against Perforce's free 20 user server. What's the procedure build and run the test from a CMake source build? Thanks! PEdro On Thu, Oct 10, 2013 at 1:40 PM, Pedro Navarro pnava...@netflix.com wrote: I saw that and I thought that was meant for Eike. Ok I'll work on the test cases and I'll see what I can do about the nightly dashboard submissions. Pedro On Thu, Oct 10, 2013 at 1:14 PM, Brad King brad.k...@kitware.com wrote: On 10/10/2013 04:01 PM, Pedro Navarro wrote: Hi guys, just checking: am I expected to do anything else with the P4 patch or is it now in your hands and will eventually be integrated? As requested here: http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/8085/focus=8098 the patch needs to include a new Tests/CTestUpdateP4.cmake.in and related changes to add the test case. Also since none of the upstream nightly test machines has Perforce installed we'll need you to run a nightly CMake dashboard submission on a machine that does. Without this testing we cannot maintain the P4 support. Thanks, -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Perforce Patch for CTest
On 10/14/2013 2:41 PM, Pedro Navarro wrote: I'm developing the test, working against Perforce's free 20 user server. What's the procedure build and run the test from a CMake source build? In the build tree run bin/ctest -R CTest.UpdateP4 assuming you've modified Tests/CMakeLists.txt appropriately to add the test. Thanks, -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0014482]: Dependency on missing ZERO_CHECK target
The following issue has been SUBMITTED. == http://www.cmake.org/Bug/view.php?id=14482 == Reported By:David Golub Assigned To: == Project:CMake Issue ID: 14482 Category: CMake Reproducibility:always Severity: major Priority: normal Status: new == Date Submitted: 2013-10-14 17:00 EDT Last Modified: 2013-10-14 17:00 EDT == Summary:Dependency on missing ZERO_CHECK target Description: If you set CMAKE_SUPPRESS_REGENERATION and then use the INCLUDE_EXTERNAL_MSPROJECT command to add an external project into the generated solution, CMake will add the GUID for the non-existent ZERO_CHECK target as a dependency of the external project. This will cause the project to fail to build when MSBuild is invoked directly from the command line but not when the solution is built in Visual Studio. == Issue History Date ModifiedUsername FieldChange == 2013-10-14 17:00 David GolubNew Issue == -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0014483]: RPATH_CHANGE can't update binaries installed with 0444 permissions
The following issue has been SUBMITTED. == http://www.cmake.org/Bug/view.php?id=14483 == Reported By:Rob Stewart Assigned To: == Project:CMake Issue ID: 14483 Category: CMake Reproducibility:always Severity: major Priority: normal Status: new == Date Submitted: 2013-10-14 17:02 EDT Last Modified: 2013-10-14 17:02 EDT == Summary:RPATH_CHANGE can't update binaries installed with 0444 permissions Description: My INSTALL() command specifies OWNER_READ GROUP_READ and WORLD_READ only. By the time Cmake arranges for the RPATH/RUNPATH to be updated, the file has 0444 permissions. Since it isn't writable, Error opening file for update results. (FYI, I'm using the UNIX Makefiles generator.) It seems that the RUNPATH should be updated before INSTALL() does its work or else the update code needs to make the file writable, update the RUNPATH, and then restore the original permissions. == Issue History Date ModifiedUsername FieldChange == 2013-10-14 17:02 Rob StewartNew Issue == -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH] KWSys: Include backtrace-related headers on FreeBSD.
This was probably broken for a long while, but the problem was not apparent because the check for execinfo.h would fail by default because -I/usr/local/include was not being passed to the compiler when making the checks for the header's existence. Now that very recent FreeBSD versions (ie. 10-CURRENT) have NetBSD's libexecinfo in base (and it is thus installed into /usr), the backtrace-related checks would pass, but the required headers were not being included in SystemInformation.cxx. --- Source/kwsys/SystemInformation.cxx | 9 + 1 file changed, 9 insertions(+) diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index 7c31f3a..2672730 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -88,6 +88,15 @@ typedef int siginfo_t; # include ifaddrs.h # define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN # endif +# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE) +# include execinfo.h +# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE) +#include cxxabi.h +# endif +# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP) +#include dlfcn.h +# endif +# endif #endif #if defined(__OpenBSD__) || defined(__NetBSD__) -- 1.8.4 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[CMake] CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX Value Changed in 2.8.11
Hi Guys, I'm v.v., a developer using cmake to generate our project, Recently we updated our cmake from 2.8.8 to 2.8.11 on Mac, immediately I found a difference between the latest and previous version, I see CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX is changed from true to false, but I didn't change my compiler at all, I am using XCode4.5 and select com.apple.compilers.llvm.clang.1_0 as CMAKE_XCODE_ATTRIBUTE_GCC_VERSION in toolchain file, So my question here is: Is this a correct behaviour for latest 2.8.11 that CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX is false? BTW, I read all of documents from 2.8.8 to 2.8.11 about this variable, but seems no explicit description about this change, Do you have any ideas? Thanks in advance! V.V. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] ARGC != list(LENGTH ARGV) and ARGV0 != list(GET ARGV 0)
CMake will not expand a string into a list when passed as arguments. It would do when using a variable: While this is true, it's also not the whole truth (and I guess is that this is bothering Clark). Consider the following two function calls: foo1(a;b;c) foo2(a;b c) Of course cmake recognises foo1 as having one parameter, and foo2 as having 2 parameters. And if you do use names arguments in your function, or access the function arguments by their positional arguments, it works as expected: function(foo2) message(Arg0: ${arg0}) # Arg0: a;b message(${ARGC} arguments.) # 2 Arguments. endfunction() If, however you try to access the argument list as a whole, you fall in the list of lists trap. CMake can not have lists as elements of other lists. Trying to use the ARGV or ARGN lists in the above example will not achieve what you are trying to do, because when cmake assembles the list of arguments, the (for lack of a better word) list property is lost: set(mylist) list(ADD mylist a;b) list(LENGTH mylist n) message( length is ${n}) # length is 2 Cheers, Johannes -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] CMake -E tar reponse files
Does cmake -E tar support response files or perhaps some other way to read a list of input files from a file? I think I'm running into command line length limits on windows with about 34266 characters. execute_process() just reports The parameter is incorrect. Nils -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] cmakeConfigureFile libfoo.pc.in Question
Greetings, I have a projest (normally built with autotools ) with libfoo.pc.in. suppose libfoo.pc.in looks like this:- #- prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@/foo2 Name: libfoo Description:a library about swine foods Version: @VERSION@ Libs: -L${libdir} -Wl,-rpath,${exec_prefix}/lib -lfoo Cflags: -I${includedir} #--- I want to replace all the variables with the @@ and generate the libfoo.pc and install this at installation time to ~/prefix/lib/pkgconfig Is this simply a case of running configure_file like so:- #-- configure_file(${CMAKE_SOURCE_DIR}/libfoo.pc.in ${CMAKE_BINARY_DIR}/libfoo.pc @ONLY) install(file ${CMAKE_BINARY_DIR}/libfoo.pc DESTINATION lib/pkgconfig ) #- and will the required variables be substitued ? or is there more to it. (in-other-words will I have to set varibles such as these (or somesuch ) set(libdir ${CMAKE_INSTALL_PREFIX}/lib ) set(includedir ${CMAKE_INSTALL_PREFIX}/include ) set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin ) ??? Thanks in advance sincerely luxInteg -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Ninja CMake 2.8.12: source generated with configure_file
Hello, Since I upgraded to CMake 2.8.12 I have this message for some of my configure_file generated sources: ninja: warning: multiple rules generate _cmakeRelease\tests\GeneratedSources\versioninfo.rc. builds involving this target will not be correct; continuing anyway Any idea how I could fix that ? Thanks, Gregoire -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Ninja CMake 2.8.12: source generated with configure_file
On Mon, Oct 14, 2013 at 2:56 PM, Gregoire Aujay gau...@movea.com wrote: Hello, Hi, ** ** Since I upgraded to CMake 2.8.12 I have this message for some of my configure_file generated sources: ** ** ninja: warning: multiple rules generate _cmakeRelease\tests\GeneratedSources\versioninfo.rc. builds involving this target will not be correct; continuing anyway ** ** ** Any idea how I could fix that ? Could you provide a small CMakeLists.txt producing this error, please? -Nico -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to write a correct wrapper of MESSAGE()?
On 2013-10-09 07:44, Johannes Zarl wrote: I guess you search for something like this: function(info) set(msg) foreach(i RANGE ${ARGC}) set(msg ${msg}${ARGV${i}}) endforeach() message(STATUS [info] ${msg}) endfunction() message(Foo:bar;baz space FOO) info(Foo:bar;baz space FOO) message(two words) info(two words) which yields the following output: Foo:bar;baz spaceFOO -- [info] Foo:bar;baz spaceFOO twowords -- [info] twowords The IN LISTS signature of foreach seems to do additional list splitting, leading to (foo;bar baz) appearing as 3 elements. Accessing the ARGV array by the positional indices (e.g. ${ARGV0}) prevents the splitting. Really? That... is surprising. I thought the whole point of 'IN LISTS' was to take a variable that already contains a list and NOT do additional splitting (the way 'foreach(NAME ${LIST})' would)... -- Matthew -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Correct way to make an arbitrary file trigger a reconfigure...
Anyone? From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Malfettone, Kris Sent: Thursday, October 03, 2013 8:43 AM To: cmake@cmake.org Subject: [CMake] Correct way to make an arbitrary file trigger a reconfigure... Hi, I am trying to make cmake reconfigure whenever a certain file is touched. This is because the file ends up listing out a set of directories that need to be built during the build. Currently I do a trick where I use configure file to write out a file that will never be used but causes the input file to trigger reconfigures. For example: configure_file( file_i_care_about.txt ${CMAKE_CURRENT_BINARY_DIR}/tmp_file_that_isn't_used.txt ) Is there another recommended way or is this the best approach. I have tried searching for this but haven't found anything on it yet. -Kris IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses. IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Correct way to make an arbitrary file trigger a reconfigure...
Hi Kris, I have done that by following: 1) use Ninja Generator; 2) include empty rerun.cmake file, I put this file into binary dir, so I need a patch; 3) add a patch to Ninja Generator to correctly write dependencies for build.ninja from included cmake files, if cmake file is in the binary directory; 4) add a custom commands that check the new files and touching rerun.cmake file; 5) once rerun.cmake file is touched ninja will rerun cmake; Best regards, Sergey — Sent from Mailbox for iPhone On Tue, Oct 15, 2013 at 7:02 AM, Malfettone, Kris kris.malfett...@sig.com wrote: Anyone? From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Malfettone, Kris Sent: Thursday, October 03, 2013 8:43 AM To: cmake@cmake.org Subject: [CMake] Correct way to make an arbitrary file trigger a reconfigure... Hi, I am trying to make cmake reconfigure whenever a certain file is touched. This is because the file ends up listing out a set of directories that need to be built during the build. Currently I do a trick where I use configure file to write out a file that will never be used but causes the input file to trigger reconfigures. For example: configure_file( file_i_care_about.txt ${CMAKE_CURRENT_BINARY_DIR}/tmp_file_that_isn't_used.txt ) Is there another recommended way or is this the best approach. I have tried searching for this but haven't found anything on it yet. -Kris IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses. IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[Cmake-commits] CMake branch, next, updated. v2.8.12-3948-g44f9a11
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 44f9a1146e8eda190332ed1901b521b14ae65dd5 (commit) via eec7834ed8952198191c3314c626fe7ae905f2fa (commit) from f65ae3f3e1364ad7927cc18221464d04ef72f345 (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 - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44f9a1146e8eda190332ed1901b521b14ae65dd5 commit 44f9a1146e8eda190332ed1901b521b14ae65dd5 Merge: f65ae3f eec7834 Author: Brad King brad.k...@kitware.com AuthorDate: Mon Oct 14 11:23:58 2013 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Mon Oct 14 11:23:58 2013 -0400 Merge topic 'doc-list-append-nothing' into next eec7834 list: Fix docs for APPEND to show that elements are optional http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eec7834ed8952198191c3314c626fe7ae905f2fa commit eec7834ed8952198191c3314c626fe7ae905f2fa Author: Роман Донченко d...@corrigendum.ru AuthorDate: Sat Oct 12 01:58:22 2013 +0400 Commit: Brad King brad.k...@kitware.com CommitDate: Mon Oct 14 11:16:59 2013 -0400 list: Fix docs for APPEND to show that elements are optional list(APPEND) has been able to append nothing since commit a06dcdba (Allow LIST(APPEND) command to append nothing, 2008-01-16) but the documentation still used to imply that at least one argument is required. diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h index f20aa8a..5523633 100644 --- a/Source/cmListCommand.h +++ b/Source/cmListCommand.h @@ -63,7 +63,7 @@ public: list(LENGTH list output variable)\n list(GET list element index [element index ...]\n output variable)\n -list(APPEND list element [element ...])\n +list(APPEND list [element ...])\n list(FIND list value output variable)\n list(INSERT list element_index element [element ...])\n list(REMOVE_ITEM list value [value ...])\n --- Summary of changes: Source/cmListCommand.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v2.8.12-3950-g879cdda
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 879cdda6ee26269be4ed01a8fa17709cd67758f7 (commit) via df46250b0a47687c40698621299d9be8ef5d75f6 (commit) from 44f9a1146e8eda190332ed1901b521b14ae65dd5 (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 - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=879cdda6ee26269be4ed01a8fa17709cd67758f7 commit 879cdda6ee26269be4ed01a8fa17709cd67758f7 Merge: 44f9a11 df46250 Author: Stephen Kelly steve...@gmail.com AuthorDate: Mon Oct 14 19:15:29 2013 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Mon Oct 14 19:15:29 2013 -0400 Merge topic 'INTERFACE_LIBRARY-build-targets' into next df46250 Fix excluded configurations from running the InterfaceBuildTargets test. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df46250b0a47687c40698621299d9be8ef5d75f6 commit df46250b0a47687c40698621299d9be8ef5d75f6 Author: Stephen Kelly steve...@gmail.com AuthorDate: Tue Oct 15 01:14:35 2013 +0200 Commit: Stephen Kelly steve...@gmail.com CommitDate: Tue Oct 15 01:14:35 2013 +0200 Fix excluded configurations from running the InterfaceBuildTargets test. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c2abf60..70c7021 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -261,7 +261,9 @@ if(BUILD_TESTING) PASS_REGULAR_EXPRESSION (file is not of required architecture|does not match cputype|not the architecture being linked)) endif() - if(CMAKE_GENERATOR MATCHES Make AND NOT BORLAND) + if(CMAKE_TEST_GENERATOR MATCHES Make + AND NOT CMAKE_TEST_GENERATOR MATCHES BORLAND + AND NOT CMAKE_TEST_GENERATOR MATCHES Watcom WMake) add_test(InterfaceBuildTargets ${CMAKE_CTEST_COMMAND} --build-and-test ${CMake_SOURCE_DIR}/Tests/InterfaceBuildTargets --- Summary of changes: Tests/CMakeLists.txt |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v2.8.12-3952-g34bd932
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 34bd932e8e8114509a8b34b0c2e619134ef06057 (commit) via a6c9d9328e7ddff8022fe486bd1cc59806b0c1d6 (commit) from 879cdda6ee26269be4ed01a8fa17709cd67758f7 (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 - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34bd932e8e8114509a8b34b0c2e619134ef06057 commit 34bd932e8e8114509a8b34b0c2e619134ef06057 Merge: 879cdda a6c9d93 Author: Stephen Kelly steve...@gmail.com AuthorDate: Mon Oct 14 19:16:10 2013 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Mon Oct 14 19:16:10 2013 -0400 Merge topic 'INTERFACE_LIBRARY-build-targets' into next a6c9d93 Create make rules for INTERFACE_LIBRARY targets. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6c9d9328e7ddff8022fe486bd1cc59806b0c1d6 commit a6c9d9328e7ddff8022fe486bd1cc59806b0c1d6 Author: Stephen Kelly steve...@gmail.com AuthorDate: Wed Aug 21 22:00:48 2013 +0200 Commit: Stephen Kelly steve...@gmail.com CommitDate: Tue Oct 15 01:15:47 2013 +0200 Create make rules for INTERFACE_LIBRARY targets. The result is that the depends of the target are created. So, add_library(somelib foo.cpp) add_library(anotherlib EXCLUDE_FROM_ALL foo.cpp) add_library(extra EXCLUDE_FROM_ALL foo.cpp) target_link_libraries(anotherlib extra) add_library(iface INTERFACE) target_link_libraries(iface INTERFACE anotherlib) Executing 'make iface' will result in the anotherlib and extra targets being made. Adding a regular executable to the INTERFACE of an INTERFACE_LIBRARY will not result in the executable being built with 'make iface' because of the logic in cmComputeTargetDepends::AddTargetDepend. So far, this is implemented only for the Makefile generator. Other generators will follow if this feature is possible for them. diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 0829add..7fd4754 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -208,7 +208,15 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index) std::setcmStdString emitted; { std::vectorstd::string tlibs; - depender-GetDirectLinkLibraries(0, tlibs, depender); + if (depender-GetType() == cmTarget::INTERFACE_LIBRARY) +{ +// For INTERFACE_LIBRARY depend on the interface instead. +depender-GetInterfaceLinkLibraries(0, tlibs, depender); +} + else +{ +depender-GetDirectLinkLibraries(0, tlibs, depender); +} // A target should not depend on itself. emitted.insert(depender-GetName()); for(std::vectorstd::string::const_iterator lib = tlibs.begin(); diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 9e23ae9..6713995 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -439,6 +439,7 @@ cmGlobalUnixMakefileGenerator3 (l-second.GetType() == cmTarget::SHARED_LIBRARY) || (l-second.GetType() == cmTarget::MODULE_LIBRARY) || (l-second.GetType() == cmTarget::OBJECT_LIBRARY) || + (l-second.GetType() == cmTarget::INTERFACE_LIBRARY) || (l-second.GetType() == cmTarget::UTILITY)) { // Add this to the list of depends rules in this directory. @@ -616,6 +617,7 @@ cmGlobalUnixMakefileGenerator3 (t-second.GetType() == cmTarget::SHARED_LIBRARY) || (t-second.GetType() == cmTarget::MODULE_LIBRARY) || (t-second.GetType() == cmTarget::OBJECT_LIBRARY) || + (t-second.GetType() == cmTarget::INTERFACE_LIBRARY) || (t-second.GetType() == cmTarget::UTILITY))) { // Add a rule to build the target by name. @@ -637,6 +639,10 @@ cmGlobalUnixMakefileGenerator3 t-second.GetName(), depends, commands, true); +if (t-second.GetType() == cmTarget::INTERFACE_LIBRARY) + { + continue; + } // Add a fast rule to build the target std::string localName = lg-GetRelativeTargetDirectory(t-second); std::string makefileName; @@ -703,6 +709,7 @@ cmGlobalUnixMakefileGenerator3 || (t-second.GetType() == cmTarget::SHARED_LIBRARY) || (t-second.GetType() == cmTarget::MODULE_LIBRARY) || (t-second.GetType() == cmTarget::OBJECT_LIBRARY) +|| (t-second.GetType() == cmTarget::INTERFACE_LIBRARY) || (t-second.GetType() == cmTarget::UTILITY))) { std::string makefileName;
[Cmake-commits] CMake branch, master, updated. v2.8.12-187-gbedb7bc
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, master has been updated via bedb7bc526bb461982b3baa04f48240843bd8d20 (commit) from d37c934f17912b372ca8591fcb233d09a2149c42 (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 - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bedb7bc526bb461982b3baa04f48240843bd8d20 commit bedb7bc526bb461982b3baa04f48240843bd8d20 Author: Kitware Robot kwro...@kitware.com AuthorDate: Tue Oct 15 00:01:08 2013 -0400 Commit: Kitware Robot kwro...@kitware.com CommitDate: Tue Oct 15 00:01:08 2013 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 65e6159..0d10c10 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ set(CMake_VERSION_MAJOR 2) set(CMake_VERSION_MINOR 8) set(CMake_VERSION_PATCH 12) -set(CMake_VERSION_TWEAK 20131014) +set(CMake_VERSION_TWEAK 20131015) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits