Re: [CMake] How to submit patches?
Am Montag, 6. Februar 2012, 19:12:27 schrieb Michael Pechner: > Is this the correct forum? cmake-develop...@cmake.org would be the right place. Or open a bug report at http://cmake.org/Bug and attach it there. > What format do you want the patch in? git format-patch > My changes are in 2.8.4. Will that be acceptable? > Or do you require I move my changes to 2.8.7 then generate the patch? Current git master is the place to go ;) Eike signature.asc Description: This is a digitally signed message part. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Default Generator to use
Hello Friends, How do I specify the default generator that CMAKE should use when invoked without the "-G" option? I am on Windows. I saw an old thread on this. But I am not sure if any support was added later on. Is there a REGISTRY entry in Windows that we can set to make so that CMAKE can check it? Thanks, Best Regards, Sarnath ::DISCLAIMER:: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. --- -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] How to submit patches?
Is this the correct forum? What format do you want the patch in? My changes are in 2.8.4. Will that be acceptable? Or do you require I move my changes to 2.8.7 then generate the patch? -- Michael Pechner NE6RD - Amateur Extra mi...@mikey.com -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] [EXTERNAL] Bug fix requests for the *next* release of CMake...
Replies requested. Short replies only. Read on. Just a short reply with bug numbers or links to the bugs is all we need here. ... http://public.kitware.com/Bug/view.php?id=7867 (have CTest report compiler type/version) David -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Making a variable a dependency...
On 02/06/2012 10:56 PM, Alexander Neundorf wrote: > On Saturday 04 February 2012, Oliver Smith wrote: >> My CMakeLists uses the Subversion repository information in a couple of >> places (it configures a file revision.h and it uses it for the CPack >> package name). >> >> The problem is that this variable is cached and retained until the cache >> is rebuilt, instead of being calculated or evaluated per make. So if I >> do a build, then do an svn update and pull some changes, it will build a >> new executable but it will stamp it with the revision number from when >> CMake last regenerated the make files... >> >> Is there a way to mark a variable as volatile or something so that CMake >> will always recalculate it and check if it has changed? > > Would it be acceptable if cmake would rerun after every build ? > You could enforce that e.g. with a add_custom_command( POST_BUILD ... ) which > could e.g. touch CMakeCache.txt or something. > > Better ideas ? Delay the generation of the revision.h header until build phase via a custom command; look at the following exemplary project: # CMakeLists.txt: CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) PROJECT(P C) SET(CMAKE_VERBOSE_MAKEFILE ON) ADD_CUSTOM_COMMAND(OUTPUT dummy revision.h COMMAND ${CMAKE_COMMAND} -DBD=${CMAKE_BINARY_DIR} -DWC=${CMAKE_SOURCE_DIR} -P ${CMAKE_SOURCE_DIR}/revision.cmake) FILE(WRITE ${CMAKE_BINARY_DIR}/main.c "#include #include \"revision.h\" int main(void) { printf(\"%d\\n\",REVISION); return 0; } ") ADD_EXECUTABLE(main main.c revision.h) # revision.cmake: FIND_PACKAGE(Subversion) Subversion_WC_INFO(${WC}@HEAD P) FILE(WRITE ${BD}/revision.h.in "#define REVISION @P_WC_REVISION@\n") CONFIGURE_FILE(${BD}/revision.h.in ${BD}/revision.h @ONLY) A "make" run rebuilds the main target whenever the repository's head revision has changed - possibly inappropriate for actual usage, just for demonstration purposes; adapt the revision.cmake script to suit the needs. BTW, can anybody confirm that the above-noted example doesn't work if the order of "dummy" and "revision.h" in the custom command is reversed? AFAICS, revision.h is removed after being generated in this case, so the subsequent compilation fails. Regards, Michael -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] COMPILE_FLAGS property that appends instead of replaces
Thanks. This seems to work: set_property( TARGET foo APPEND_STRING PROPERTY COMPILE_FLAGS "/ZI " ) set_property( TARGET foo APPEND_STRING PROPERTY COMPILE_FLAGS "/W4 " ) Just make sure you have a space at the end of each one, so that when the strings are appended, there is a space between each compiler flag. - Robert Dailey On Mon, Feb 6, 2012 at 4:13 PM, wrote: > *I believe that is the defined behavior. Usually, people would use > add_definitions() to add the flags before creating the target. If you have > one target per subdirectory, you don’t have to worry about removing them > afterwards:* > > * * > > *CMakeLists.txt:* > > * add_definitions(/foo)* > > * * > > * add_subdirectory(baz)* > > * add_subdirectory(qux)* > > * * > > *baz/CMakeLists.txt* > > * add_definitions(/bar)* > > * add_executable(baz baz.cpp)* > > * * > > *qux/CMakeLists.txt* > > * add_executable(qux qux.cpp)* > > * * > > * * > > *baz gets the compiler flags “/foo /bar”, qux only gets “/foo”.* > > * * > > * * > > * * > > *As an aside, I ran into a similar issue, but with Linker Flags in the > cache. To overcome that, I wrote a few functions to encapsulate the > writing of flags and handle checking for duplicates. You could certainly > do something similar with properties:* > > * * > > ** > > *## Cache Set Helper Functions* > > ** > > *function(AppendIfMissing _outVar _inVar _value)* > > * string(REGEX REPLACE " " ";" _inList "${${_inVar}}")* > > * list(FIND _inList "${_value}" _pos)* > > * * > > * if(${_pos} EQUAL -1)* > > *set(${_outVar} "${${_inVar}} ${_value}" PARENT_SCOPE)* > > * else()* > > *set(${_outVar} "${${_inVar}}" PARENT_SCOPE)* > > * endif()* > > *endfunction(AppendIfMissing)* > > * * > > *function(CheckAndAppendCacheForce _varName _value _type )* > > * AppendIfMissing(_outvar ${_varName} ${_value})* > > * * > > * foreach(_arg IN LISTS ARGN)* > > *set(_desc "${_desc} ${_arg}")* > > * endforeach()* > > * * > > * set(${_varName} "${_outvar}" CACHE ${_type} "${_desc}" FORCE)* > > *endfunction(CheckAndAppendCacheForce)* > > * * > > *function(CheckAndAppendCache _varName _value _type )* > > * AppendIfMissing(_outvar ${_varName} ${_value})* > > * * > > * foreach(_arg IN LISTS ARGN)* > > *set(_desc "${_desc} ${_arg}")* > > * endforeach()* > > * * > > * set(${_varName} "${_outvar}" CACHE ${_type} "${_desc}")* > > *endfunction(CheckAndAppendCache)* > > * * > > * * > > *Aaron Meadows* > > * * > > *From:* cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] *On > Behalf Of *Robert Dailey > *Sent:* Monday, February 06, 2012 3:58 PM > *To:* CMake ML > *Subject:* [CMake] COMPILE_FLAGS property that appends instead of replaces > > > ** ** > > I would like to set the COMPILE_FLAGS property multiple times on the same > target through set_target_properties(), however only the last call seems to > persist. Previous flags set get overridden. Is this the correct behavior? > If so, is there a way to make this property append instead of replace on > the same target? > > > ** ** > > - > > Robert Dailey > > This email was sent to you by Thomson Reuters, the global news and > information company. Any views expressed in this message are those of the > individual sender, except where the sender specifically states them to be > the views of Thomson Reuters. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] COMPILE_FLAGS property that appends instead of replaces
I believe that is the defined behavior. Usually, people would use add_definitions() to add the flags before creating the target. If you have one target per subdirectory, you don't have to worry about removing them afterwards: CMakeLists.txt: add_definitions(/foo) add_subdirectory(baz) add_subdirectory(qux) baz/CMakeLists.txt add_definitions(/bar) add_executable(baz baz.cpp) qux/CMakeLists.txt add_executable(qux qux.cpp) baz gets the compiler flags "/foo /bar", qux only gets "/foo". As an aside, I ran into a similar issue, but with Linker Flags in the cache. To overcome that, I wrote a few functions to encapsulate the writing of flags and handle checking for duplicates. You could certainly do something similar with properties: ## Cache Set Helper Functions function(AppendIfMissing _outVar _inVar _value) string(REGEX REPLACE " " ";" _inList "${${_inVar}}") list(FIND _inList "${_value}" _pos) if(${_pos} EQUAL -1) set(${_outVar} "${${_inVar}} ${_value}" PARENT_SCOPE) else() set(${_outVar} "${${_inVar}}" PARENT_SCOPE) endif() endfunction(AppendIfMissing) function(CheckAndAppendCacheForce _varName _value _type ) AppendIfMissing(_outvar ${_varName} ${_value}) foreach(_arg IN LISTS ARGN) set(_desc "${_desc} ${_arg}") endforeach() set(${_varName} "${_outvar}" CACHE ${_type} "${_desc}" FORCE) endfunction(CheckAndAppendCacheForce) function(CheckAndAppendCache _varName _value _type ) AppendIfMissing(_outvar ${_varName} ${_value}) foreach(_arg IN LISTS ARGN) set(_desc "${_desc} ${_arg}") endforeach() set(${_varName} "${_outvar}" CACHE ${_type} "${_desc}") endfunction(CheckAndAppendCache) Aaron Meadows From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Robert Dailey Sent: Monday, February 06, 2012 3:58 PM To: CMake ML Subject: [CMake] COMPILE_FLAGS property that appends instead of replaces I would like to set the COMPILE_FLAGS property multiple times on the same target through set_target_properties(), however only the last call seems to persist. Previous flags set get overridden. Is this the correct behavior? If so, is there a way to make this property append instead of replace on the same target? - Robert Dailey This email was sent to you by Thomson Reuters, the global news and information company. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] COMPILE_FLAGS property that appends instead of replaces
I would like to set the COMPILE_FLAGS property multiple times on the same target through set_target_properties(), however only the last call seems to persist. Previous flags set get overridden. Is this the correct behavior? If so, is there a way to make this property append instead of replace on the same target? - Robert Dailey -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Making a variable a dependency...
On Saturday 04 February 2012, Oliver Smith wrote: > My CMakeLists uses the Subversion repository information in a couple of > places (it configures a file revision.h and it uses it for the CPack > package name). > > The problem is that this variable is cached and retained until the cache > is rebuilt, instead of being calculated or evaluated per make. So if I > do a build, then do an svn update and pull some changes, it will build a > new executable but it will stamp it with the revision number from when > CMake last regenerated the make files... > > Is there a way to mark a variable as volatile or something so that CMake > will always recalculate it and check if it has changed? Would it be acceptable if cmake would rerun after every build ? You could enforce that e.g. with a add_custom_command( POST_BUILD ... ) which could e.g. touch CMakeCache.txt or something. Better ideas ? Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Program Database for Edit & Continue support
If you supply add_definitions(/ZI) it will override the /Zi default and provide you with the edit and continue setting. I verified the behavior with this cmakelists.txt: With /ZI: cmake_minimum_required (VERSION 2.8) project(TestProj CXX) file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp "int main(int argc, char** argc) { return 0; }") add_definitions(/ZI) add_executable(TestExe main.cpp) Without /ZI: cmake_minimum_required (VERSION 2.8) project(TestProj CXX) file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp "int main(int argc, char** argc) { return 0; }") add_executable(TestExe main.cpp) Here is the relevant difference in the generated TestExe.vcxproj: 87c87 < EditAndContinue --- > ProgramDatabase Aaron Meadows From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Robert Dailey Sent: Monday, February 06, 2012 3:20 PM To: CMake ML Subject: [CMake] Program Database for Edit & Continue support In Visual Studio 2008, CMake generates projects to use the /Zi option, which is just "Program Database" in visual studio. The /ZI option enables "Program Database with Edit & Continue", allowing the edit & continue functionality to be used. Is there a built in feature to change the debug information format in generated VS projects? - Robert Dailey This email was sent to you by Thomson Reuters, the global news and information company. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Program Database for Edit & Continue support
In Visual Studio 2008, CMake generates projects to use the /Zi option, which is just "Program Database" in visual studio. The /ZI option enables "Program Database with Edit & Continue", allowing the edit & continue functionality to be used. Is there a built in feature to change the debug information format in generated VS projects? - Robert Dailey -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPACK generated DEB package can not create directories
2012/2/6 Ralf Lange : > The CMake version is 2.8.2. > The system is Debian 6.0.4 (squeez). > The kernel is 2.6.32-5-amd64. > The Desktop is Gnome 2.30.2. Could you try, cmake 2.8.7 (may be this fix http://www.cmake.org/Bug/view.php?id=10325 could solve your problem) and/or run cpack in fakeroot like: $ cd /home/ralf/Animation-Dev/qStopMotion/qstopmotion-buil-makefile $ fakeroot cpack -G DEB Then retry the installation. > CPack generates the deb package. Than I open the package using GDebi > Packet Installer. The installer ask for the superuser password and ends > without installation. The error message is: > dpkg: Error processing > of > /home/ralf/Animation-Dev/qStopMotion/qstopmotion-buil-makefile/qstopmotion-0.9.10-Linux.deb > (--install): > /usr/share/qstopmotion/graphics/qstopmotion_logo_transparent_75.png.dpkg-new > can not be created (...): File or Directory not found. is the "qstopmotion" this project: http://www.qstopmotion.org/english/download_sources.html If yes did you made some change or could I theoretically try to reproduce the issue using the source I can find on this site? > When I create all the directories on the command line bevor I start the > installer, than it works. could you put the result of: dpkg-deb --contents .deb in a text file and send it to me? -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPACK generated DEB package can not create directories
The CMake version is 2.8.2. The system is Debian 6.0.4 (squeez). The kernel is 2.6.32-5-amd64. The Desktop is Gnome 2.30.2. CPack generates the deb package. Than I open the package using GDebi Packet Installer. The installer ask for the superuser password and ends without installation. The error message is: dpkg: Error processing of /home/ralf/Animation-Dev/qStopMotion/qstopmotion-buil-makefile/qstopmotion-0.9.10-Linux.deb (--install): /usr/share/qstopmotion/graphics/qstopmotion_logo_transparent_75.png.dpkg-new can not be created (...): File or Directory not found. (this is a translation, I use a german language system) When I create all the directories on the command line bevor I start the installer, than it works. Thanks. Ralf Am Montag, den 06.02.2012, 12:14 +0100 schrieb Eric Noulard: > 2012/2/6 Ralf Lange : > > Hi, > > I use CPACK to generate RPM and DEB packages for my software. The RPM > > package wirks fine but the DEB package can not create the neccessary > > directories in the usr/lib directory. When I create the direcories by hand, > > it works. > > Who can help to fix this problem? > > May be I can, but you'll have to give more details: > > 1) Which version of CMake/CPack are you using? > > 2) What do you mean by "can not create the neccessary directories in > the usr/lib directory"? > a) you cannot create the .deb --> what kind of error do you get from > cpack? > a) you can create the .deb but cannot install it --> what kind of > error do you get from dpkg? > > 3) Would you be able to create a small project which reproduce the problem? > -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] add_test( WORKING_DIRECTORY ) does not actua
Hi there The following message in cmTest.cxx doesn't seem to be accurate for Visual Studio 9. 200 cm->DefineProperty 201 ("WORKING_DIRECTORY", cmProperty::TEST, 202 "The directory from which the test executable will be called.", 203 "If this is not set it is called from the directory the test executable " 204 "is located in."); The test process is actually run from ${PROJECT_BINARY_DIR} I create the test project with the following: SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/../targets" CACHE PATH "Single Directory for all Executables.") add_executable(${mod_name} ${src_files} ${inc_files}) add_test(NAME ${mod_name} COMMAND ${mod_name} --log_file=${mod_name}.xml) The above --log_file parameter tells the exe (a Boost Test exe) to create ${mod_name}.xml in the current directory. I would be happy to use add_test(WORKING_DIRECTORY) but I can't figure out how to construct the path. Has anyone managed to piece these two together in a simple way? Thanks in advance! -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPACK generated DEB package can not create directories
On Mon, Feb 6, 2012 at 5:44 AM, Ralf Lange wrote: > Hi, > I use CPACK to generate RPM and DEB packages for my software. The RPM > package wirks fine but the DEB package can not create the neccessary > directories in the usr/lib directory. When I create the direcories by hand, > it works. > Who can help to fix this problem? > > Thanks > Ralf > > > > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake sudo? ;-) -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CPACK generated DEB package can not create directories
2012/2/6 Ralf Lange : > Hi, > I use CPACK to generate RPM and DEB packages for my software. The RPM > package wirks fine but the DEB package can not create the neccessary > directories in the usr/lib directory. When I create the direcories by hand, > it works. > Who can help to fix this problem? May be I can, but you'll have to give more details: 1) Which version of CMake/CPack are you using? 2) What do you mean by "can not create the neccessary directories in the usr/lib directory"? a) you cannot create the .deb --> what kind of error do you get from cpack? a) you can create the .deb but cannot install it --> what kind of error do you get from dpkg? 3) Would you be able to create a small project which reproduce the problem? -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] CPACK generated DEB package can not create directories
Hi, I use CPACK to generate RPM and DEB packages for my software. The RPM package wirks fine but the DEB package can not create the neccessary directories in the usr/lib directory. When I create the direcories by hand, it works. Who can help to fix this problem? Thanks Ralf -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake