Re: [CMake] Different configurations with Visual Studio
Thanks, this works. Actually if(CMAKE_CONFIGURATION_TYPES) set(CMAKE_CONFIGURATION_TYPES Debug Release DebugMX31 ReleaseMX31) set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} CACHE STRING Reset the configurations to what we need FORCE) endif() also works for me. I've added it to the FAQ of the Wiki. But this is only half of what need. I actually need to make this generate settings for a different platform as well, I mean 'platform' in the Visual Studio sense, also called 'solution platform' in Visual Studios configuration manager, which is Win32 by default, but I need it for both Win32 and MX31. Can this be done with CMake? I'm afraid not, but if it is possible, how? In the project file it is written as something like Debug|MX31, but using that in CMake doesn't work. Mark 2010/6/28 Michael Wild them...@gmail.com On 28. Jun, 2010, at 15:17 , Mark Van Peteghem wrote: Hi, I am using CMake to generate Visual Studio project files, later also for CodeBlocks. It seems that CMake generates four different configurations for Visual Studio: Debug, Release, MinSizeRel and RelWithDebInfo. However, I need other configuations, Debug and Release, both for Win32 and MX3, in one project file. How do I change this? I tried this by changing *CMAKE_CONFIGURATION_TYPES *and CMAKE_BUILD_TYPES, e.g. SET(CMAKE_BUILD_TYPES Debug Release DebugMX31 ReleaseMX31) but I have the impression that these variables cannot be changed. -- Mark You have to change CMAKE_CONFIGURATION_TYPES in the cache. Here is some template I use: # Xcode generator is buggy (linker flags are not inherited from compile flags # and custom configurations don't work with shared libraries) if(NOT CMAKE_GENERATOR STREQUAL Xcode) set(CMAKE_C_FLAGS_SUPERDUPER --super --duper CACHE STRING Flags used by the compiler during super-duper builds) set(CMAKE_EXE_LINKER_FLAGS_SUPERDUPER --super --duper CACHE STRING Flags used by the linker for executables during super-duper builds) set(CMAKE_SHARED_LINKER_FLAGS_SUPERDUPER --super --duper CACHE STRING Flags used by the linker for shared libraries during super-duper builds) set(CMAKE_MODULE_LINKER_FLAGS_SUPERDUPER --super --duper CACHE STRING Flags used by the linker for loadable modules during super-duper builds) mark_as_advanced(CMAKE_C_FLAGS_COVERAGE CMAKE_EXE_LINKER_FLAGS_SUPERDUPER CMAKE_SHARED_LINKER_FLAGS_SUPERDUPER CMAKE_MODULE_LINKER_FLAGS_SUPERDUPER) # This variable is only set for multi-config IDE generators if(CMAKE_CONFIGURATION_TYPES) list(APPEND CMAKE_CONFIGURATION_TYPES SuperDuper) list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES) set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} CACHE STRING Semicolon separated list of supported configuration types [Debug|Release|MinSizeRel|RelWithDebInfo|SuperDuper] FORCE) endif() endif() HTH 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
[CMake] Exclude CMakeFiles path from GLOB_RECURSE
Hi, I'm currently trying to use the following line to include all source files into my build: file (GLOB_RECURSE Files_CPP *.cpp) add_executable(test ${Files_CPP} ) Everything runs fine while using an out-of-source build, but for in-source builds these lines include .cpp files from the CMakeFiles directory. Is there any way to exclude this directory within the file command? Best regards, Andreas _ http://redirect.gimas.net/?n=M1007xHM2 Räumen Sie Ihr Postfach auf - ganz einfach mit Hotmail!___ 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] Exclude CMakeFiles path from GLOB_RECURSE
On 1. Jul, 2010, at 9:45 , Diablo 666 wrote: Hi, I'm currently trying to use the following line to include all source files into my build: file (GLOB_RECURSE Files_CPP *.cpp) add_executable(test ${Files_CPP} ) Everything runs fine while using an out-of-source build, but for in-source builds these lines include .cpp files from the CMakeFiles directory. Is there any way to exclude this directory within the file command? Best regards, Andreas 1. Never use GLOB_RECURSE. It's evil. E.g. if you add or remove source files, CMake has no way of knowing that it should be re-run. Just list all the files in your CMakeLists.txt (or, if you think the list is excessively long, create a file called e.g. files.cmake, put the list in there and INCLUDE it in the CMakeLists.txt file. 2. Never do in-source builds. CMake creates many, many files, and you don't want to delete them all individually for a clean build. And there's no way to implement a safe make clean (e.g. your build system might be running a custom utility which generates files CMake knows nothing about). HTH 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] Exclude CMakeFiles path from GLOB_RECURSE
Hi, thanks for your reply. 1. Never use GLOB_RECURSE. It's evil. E.g. if you add or remove source files, CMake has no way of knowing that it should be re-run. I have tested rerunning cmake manually and it worked out well. (Testcase: I added a new .cpp file to the build) I either have to change the CMakeLists.txt or to rerun cmake manually. Seems to be the same effort for me. 2. Never do in-source builds. CMake creates many, many files, and you don't want to delete them all individually for a clean build. And there's no way to implement a safe make clean (e.g. your build system might be running a custom utility which generates files CMake knows nothing about). I know these problems. I will never do an in-source-build again :-) But unfortunately, I have to support in-source builds, too. Best regards, Andreas _ http://redirect.gimas.net/?n=M1007xHMTL4 Künftig E-Mails über Hotmail ohne Werbung versenden!___ 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] Exclude CMakeFiles path from GLOB_RECURSE
On 1. Jul, 2010, at 10:15 , Diablo 666 wrote: Hi, thanks for your reply. 1. Never use GLOB_RECURSE. It's evil. E.g. if you add or remove source files, CMake has no way of knowing that it should be re-run. I have tested rerunning cmake manually and it worked out well. (Testcase: I added a new .cpp file to the build) I either have to change the CMakeLists.txt or to rerun cmake manually. Seems to be the same effort for me. Thing is: will you never forget? And it prevents stray files from being picked up (as you experienced). Also, you get an immediate response if a file is missing, and not just when the compiler complains about a missing header or you get undefined references during the linking stage. If you insist on using GLOB_RECURSE, don't apply it to CMAKE_CURRENT_SOURCE_DIR, but use GLOB on the CMAKE_CURRENT_SOURCE_DIR and use GLOB_RECURSE on all the subdirectories individually, so you don't get CMake-generated stuff. Also, you could filter out all the items contained in the CMakeFiles directory: file(GLOB_RECURSE SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h) string(REGEX REPLACE CMakeFiles/[^;]+;? SRCS ${SRCS}) 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] Howto unset cache variable without UNSET()
Hi Fraser, It doesn't. Well, partly it does, but unfortunately setting FOO to an empty string doesn't make it undefined; i.e. if(DEFINED FOO) will be TRUE. I've decided to use 'if(${FOO} MATCHES ^$)' instead. Best regards, Marcel Loose. On Wed, 2010-06-30 at 10:57 +0100, Fraser Hutchison wrote: I think 'set(FOO CACHE INTERNAL Foo)' should do the trick. All the best, Fraser. On 30/06/2010 9:38 AM, Marcel Loose wrote: Hi all, Is there a way to unset a cache variable, i.e. make it undefined, *without* using unset(). My reason for asking is that my CMake scripts need to be backward compatible with every 2.6 version. Unfortunately, unset() was added in a patch release (2.6.3 if I recall correctly), so I cannot use it. The problem is that, though 'set(FOO)' will make FOO undefined, this doesn't seem to work for 'set(FOO CACHE INTERNAL Foo)'. Any ideas how to accomplish this? Best regards, Marcel Loose. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Exclude CMakeFiles path from GLOB_RECURSE
Thing is: will you never forget? And it prevents stray files from being picked up (as you experienced). Also, you get an immediate response if a file is missing, and not just when the compiler complains about a missing header or you get undefined references during the linking stage. Ok, that sounds reasoble. (This should especially convince some lazy people :-D ) Thanks a lot! _ http://redirect.gimas.net/?n=M1007xHM2 Räumen Sie Ihr Postfach auf - ganz einfach mit Hotmail!___ 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] Notes not showing up on CDash
I have been trying to upload files as notes for my builds using the ctest_submit(PARTS Notes) command. When i run the script it shows submissions successful but when i check the dashboard i cannot find any notes. What am i doing wrong ? Regards Johny ___ 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] Preserve tree structur for IDEs
Hi, I need CMake to create a Visual Studio solution for a project with several subdirectories but only one single library. How can I achieve project files that preserve this tree structure? Best regards, Andreas _ http://redirect.gimas.net/?n=M1007xIMFreunde3 Echte Freunde sagen's per Messenger!___ 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] Preserve tree structur for IDEs
2010/7/1 Diablo 666 thediablo...@hotmail.de: Hi, I need CMake to create a Visual Studio solution for a project with several subdirectories but only one single library. How can I achieve project files that preserve this tree structure? For grouping source in Visual Studio you may use source_group(name [REGULAR_EXPRESSION regex] [FILES src1 src2 ...]) concerning several subdir for one lib, you may have a single CMakeLists.txt the parent subdir which add_library from subdirs. Say you tree is : parent/subdir1 /subdir2 the parent/CMakeLists.txt may contains set(SRC_DIR1 subdir1/blah.cc subdir1/bouh.cc) set(SRC_DIR2 subdir2/how.cc subdir2/how.hh) add_library(whatever ${SRC_DIR1} ${SRC_DIR2}) You may add source group too: source_group(LookHere\\SDIR1 FILES ${SRC_DIR1}) source_group(LookHere\\SDIR2 FILES ${SRC_DIR2}) -- 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 -C
Hi good people, When I give an argument to -C, can this be used in the INSTALL commands? I have a generated file in buildtype/libmysqld.exp that I need in the installer, and I'm having a lot of problems figuring out how to do this properly. I have this line in a subdir CMakeLists.txt: INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/libmysqld.exp DESTINATION Embedded/DLL COMPONENT embedded) In the top level CMakeLists.txt, it says this: IF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE RelWithDebInfo) ENDIF() When I run cpack the ${CMAKE_BUILD_TYPE} is expanded to nothing. Is there a variable that contains the contents of the -C argument? Bo Thorsen. Monty Program AB. -- MariaDB: MySQL replacement Community developed. Feature enhanced. Backward compatible. ___ 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] Howto unset cache variable without UNSET()
Marcel, Maybe I missed it earlier ITT, but I don't understand why you can't just use if(FOO) instead? tyler On Thu, Jul 01, 2010 at 11:53:33AM +0200, Marcel Loose wrote: Hi Fraser, It doesn't. Well, partly it does, but unfortunately setting FOO to an empty string doesn't make it undefined; i.e. if(DEFINED FOO) will be TRUE. I've decided to use 'if(${FOO} MATCHES ^$)' instead. Best regards, Marcel Loose. On Wed, 2010-06-30 at 10:57 +0100, Fraser Hutchison wrote: I think 'set(FOO CACHE INTERNAL Foo)' should do the trick. All the best, Fraser. On 30/06/2010 9:38 AM, Marcel Loose wrote: Hi all, Is there a way to unset a cache variable, i.e. make it undefined, *without* using unset(). My reason for asking is that my CMake scripts need to be backward compatible with every 2.6 version. Unfortunately, unset() was added in a patch release (2.6.3 if I recall correctly), so I cannot use it. The problem is that, though 'set(FOO)' will make FOO undefined, this doesn't seem to work for 'set(FOO CACHE INTERNAL Foo)'. Any ideas how to accomplish this? Best regards, Marcel Loose. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ 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] cross compiling - platform files
In the CMake wiki (http://www.cmake.org/Wiki/CMake_Cross_Compiling) it says clearly that the platform module are included in the following order; Platform/${CMAKE_SYSTEM_NAME}.cmake (mandatory) Platform/${CMAKE_SYSTEM_NAME}-compiler.cmake (optional) Platform/${CMAKE_SYSTEM_NAME}-compiler-${CMAKE_SYSTEM_PROCESSOR}.cmake (optional) However, in my project it seems that They are included in the reverse order to that. At least, Generic-gcc-${CMAKE_SYSTEM_PROCESSOR}.cmake is included before Generic-gcc.cmake. Can someone kindly confirm. Is this a bug in cmake or an error in documentation? -- Cheers! Kishore ___ 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] PROJECT() command when cross compiling
It seems that the PROJECT() command does a fair bit behind the scenes and is not documented enough. It seems to reset several variable created before it was _first_ called. Since i use cmake from cross compilation, i have created Platform files for Generic-gcc.cmake and Generic-gcc-uc3b1256.cmake (for the processor that I use) 1) It seems that these files are invoked inside the PROJECT() command 2) The platform files set up some needed variables such as CMAKE_C_FLAGS 3) When the PROJECT() command finishes, the variable CMAKE_C_FLAGS is again empty. The above is only true on the first run of cmake and hence executing make rebuild_cache overcomes the issue. Bug? -- Cheers! Kishore ___ 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] PROJECT() command when cross compiling
On Thursday 01 July 2010, Kishore wrote: It seems that the PROJECT() command does a fair bit behind the scenes and is not documented enough. It seems to reset several variable created before it was _first_ called. Since i use cmake from cross compilation, i have created Platform files for Generic-gcc.cmake and Generic-gcc-uc3b1256.cmake (for the processor that I use) 1) It seems that these files are invoked inside the PROJECT() command 2) The platform files set up some needed variables such as CMAKE_C_FLAGS 3) When the PROJECT() command finishes, the variable CMAKE_C_FLAGS is again empty. project() automatically enable the languages, if no languages are given, it tries C and C++. While doing this, a whole bunch of variables are set. 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
[CMake] generating source files with ADD_CUSTOM_COMMAND
Hello I'm trying to generate source files .cxx and include them in ADD_LIBRARY to build a static library, according to http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_ the_build.3F # # Copy template source files to *.cxx and place them in the build dir # ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/name.cxx ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx COMMAND ${CMAKE_COMMAND} copy ${CMAKE_SOURCE_DIR}/systems/template_name.cpp ${CMAKE_CURRENT_BINARY_DIR}/name.cxx COMMAND ${CMAKE_COMMAND} copy ${CMAKE_SOURCE_DIR}/systems/template_widget.cpp ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx DEPENDS ${CMAKE_SOURCE_DIR}/template_name.cpp ${CMAKE_SOURCE_DIR}/systems/template_widget.cpp ) ADD_LIBRARY(mylib STATIC main.cpp parameters.hpp ${CMAKE_CURRENT_BINARY_DIR}/name.cxx ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx ) The vs2008 solution is generated with the Solution explorer showing the .cxx files, but they are actually nowhere to be found. Regards, ___ 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] generating source files with ADD_CUSTOM_COMMAND
I think you mean: ${CMAKE_COMMAND} -E copy src dst You forgot the -E. On Thu, Jul 1, 2010 at 2:38 PM, Hicham Mouline hic...@mouline.org wrote: Hello I'm trying to generate source files .cxx and include them in ADD_LIBRARY to build a static library, according to http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_ the_build.3F # # Copy template source files to *.cxx and place them in the build dir # ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/name.cxx ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx COMMAND ${CMAKE_COMMAND} copy ${CMAKE_SOURCE_DIR}/systems/template_name.cpp ${CMAKE_CURRENT_BINARY_DIR}/name.cxx COMMAND ${CMAKE_COMMAND} copy ${CMAKE_SOURCE_DIR}/systems/template_widget.cpp ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx DEPENDS ${CMAKE_SOURCE_DIR}/template_name.cpp ${CMAKE_SOURCE_DIR}/systems/template_widget.cpp ) ADD_LIBRARY(mylib STATIC main.cpp parameters.hpp ${CMAKE_CURRENT_BINARY_DIR}/name.cxx ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx ) The vs2008 solution is generated with the Solution explorer showing the .cxx files, but they are actually nowhere to be found. Regards, ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] PROJECT() command when cross compiling
On Friday 02 Jul 2010 12:07:07 am Alexander Neundorf wrote: On Thursday 01 July 2010, Kishore wrote: It seems that the PROJECT() command does a fair bit behind the scenes and is not documented enough. It seems to reset several variable created before it was first called. Since i use cmake from cross compilation, i have created Platform files for Generic-gcc.cmake and Generic-gcc-uc3b1256.cmake (for the processor that I use) 1) It seems that these files are invoked inside the PROJECT() command 2) The platform files set up some needed variables such as CMAKE_C_FLAGS 3) When the PROJECT() command finishes, the variable CMAKE_C_FLAGS is again empty. project() automatically enable the languages, if no languages are given, it tries C and C++. While doing this, a whole bunch of variables are set. Fair enough. But then it should take into account the values i have set for some of those variables in the platform modules. OTOH if it's wrong to be setting those variables in the platform files where else should they be set and what is the role of they platfrom modules? -- Cheers! Kishore ___ 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] generating source files with ADD_CUSTOM_COMMAND
From: David Cole [mailto:david.c...@kitware.com] Sent: 01 July 2010 19:58 To: Hicham Mouline Cc: cmake@cmake.org Subject: Re: [CMake] generating source files with ADD_CUSTOM_COMMAND I think you mean: ${CMAKE_COMMAND} -E copy src dst You forgot the -E. _ I'll try that. In the meantime, the wiki page http://www.cmake.org/Wiki/CMake_FAQ has 2 occurrences of {CMAKE_COMMAND} copy missing the -E Thanks, ___ 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] generating source files with ADD_CUSTOM_COMMAND
I added the -E, no difference. Shouldn't an error have been printed the first time round when I didn't have the -E. There was no error. I traced it and the ADD_CUSTOM_COMMAND was in the trace. Is this an indication that line is not executed at all? From: David Cole [mailto:david.c...@kitware.com] Sent: 01 July 2010 19:58 To: Hicham Mouline Cc: cmake@cmake.org Subject: Re: [CMake] generating source files with ADD_CUSTOM_COMMAND I think you mean: ${CMAKE_COMMAND} -E copy src dst You forgot the -E. On Thu, Jul 1, 2010 at 2:38 PM, Hicham Mouline hic...@mouline.org wrote: Hello I'm trying to generate source files .cxx and include them in ADD_LIBRARY to build a static library, according to http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_ the_build.3F # # Copy template source files to *.cxx and place them in the build dir # ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/name.cxx ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx COMMAND ${CMAKE_COMMAND} copy ${CMAKE_SOURCE_DIR}/systems/template_name.cpp ${CMAKE_CURRENT_BINARY_DIR}/name.cxx COMMAND ${CMAKE_COMMAND} copy ${CMAKE_SOURCE_DIR}/systems/template_widget.cpp ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx DEPENDS ${CMAKE_SOURCE_DIR}/template_name.cpp ${CMAKE_SOURCE_DIR}/systems/template_widget.cpp ) ___ 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] generating source files with ADD_CUSTOM_COMMAND
Did you build yet? Custom commands are executed at build time, not at cmake configure time. On Thu, Jul 1, 2010 at 3:21 PM, Hicham Mouline hic...@mouline.org wrote: I added the -E, no difference. Shouldn't an error have been printed the first time round when I didn't have the -E. There was no error. I traced it and the ADD_CUSTOM_COMMAND was in the trace. Is this an indication that line is not executed at all? *From:* David Cole [mailto:david.c...@kitware.com] *Sent:* 01 July 2010 19:58 *To:* Hicham Mouline *Cc:* cmake@cmake.org *Subject:* Re: [CMake] generating source files with ADD_CUSTOM_COMMAND I think you mean: ${CMAKE_COMMAND} -E copy src dst You forgot the -E. On Thu, Jul 1, 2010 at 2:38 PM, Hicham Mouline hic...@mouline.org wrote: Hello I'm trying to generate source files .cxx and include them in ADD_LIBRARY to build a static library, according to http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_ the_build.3F # # Copy template source files to *.cxx and place them in the build dir # ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/name.cxx ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx COMMAND ${CMAKE_COMMAND} copy ${CMAKE_SOURCE_DIR}/systems/template_name.cpp ${CMAKE_CURRENT_BINARY_DIR}/name.cxx COMMAND ${CMAKE_COMMAND} copy ${CMAKE_SOURCE_DIR}/systems/template_widget.cpp ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx DEPENDS ${CMAKE_SOURCE_DIR}/template_name.cpp ${CMAKE_SOURCE_DIR}/systems/template_widget.cpp ) ___ 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] generating source files with ADD_CUSTOM_COMMAND
That must be it, obvious indeed, Thank you, From: David Cole [mailto:david.c...@kitware.com] Sent: 01 July 2010 20:27 To: Hicham Mouline Cc: cmake@cmake.org Subject: Re: [CMake] generating source files with ADD_CUSTOM_COMMAND Did you build yet? Custom commands are executed at build time, not at cmake configure time. On Thu, Jul 1, 2010 at 3:21 PM, Hicham Mouline hic...@mouline.org wrote: I added the -E, no difference. Shouldn't an error have been printed the first time round when I didn't have the -E. There was no error. I traced it and the ADD_CUSTOM_COMMAND was in the trace. Is this an indication that line is not executed at all? From: David Cole [mailto:david.c...@kitware.com] Sent: 01 July 2010 19:58 To: Hicham Mouline Cc: cmake@cmake.org Subject: Re: [CMake] generating source files with ADD_CUSTOM_COMMAND I think you mean: ${CMAKE_COMMAND} -E copy src dst You forgot the -E. On Thu, Jul 1, 2010 at 2:38 PM, Hicham Mouline hic...@mouline.org wrote: Hello I'm trying to generate source files .cxx and include them in ADD_LIBRARY to build a static library, according to http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_ the_build.3F # # Copy template source files to *.cxx and place them in the build dir # ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/name.cxx ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx COMMAND ${CMAKE_COMMAND} copy ${CMAKE_SOURCE_DIR}/systems/template_name.cpp ${CMAKE_CURRENT_BINARY_DIR}/name.cxx COMMAND ${CMAKE_COMMAND} copy ${CMAKE_SOURCE_DIR}/systems/template_widget.cpp ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx DEPENDS ${CMAKE_SOURCE_DIR}/template_name.cpp ${CMAKE_SOURCE_DIR}/systems/template_widget.cpp ) ___ 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] Generating a combined x86 and x64 Visual Studio project
Greetings, I have recently created a CMake project that I use to generate Visual Studio solutions/projects and it works perfectly with one exception. After generating a Visual Studio 9 2008 Win64 solution, the solution contains only the x64 build specification. Is it possible to have CMake add the win32 build specification to the same solution or must one generate separate 32-bit and 64-bit solutions/projects in different directories? Thank you in advance for your help in this matter. Regards, Lee Adarr ___ 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] Generating a combined x86 and x64 Visual Studio project
I have recently created a CMake project that I use to generate Visual Studio solutions/projects and it works perfectly with one exception. After generating a Visual Studio 9 2008 Win64 solution, the solution contains only the x64 build specification. Is it possible to have CMake add the win32 build specification to the same solution or must one generate separate 32-bit and 64-bit solutions/projects in different directories? I believe generating the solutions out of source with different build folders is the only good way at the moment. John ___ 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] Generating a combined x86 and x64 Visual Studio project
On Thu, Jul 01, 2010 at 02:18:45PM -0500, Adarr, Lee wrote: After generating a Visual Studio 9 2008 Win64 solution, the solution contains only the x64 build specification. Is it possible to have CMake Yes, this is as designed. add the win32 build specification to the same solution or must one generate separate 32-bit and 64-bit solutions/projects in different directories? This is not currently possible. Here's a thread where this was discussed previously: http://www.cmake.org/pipermail/cmake/2009-June/029897.html tyler ___ 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] Generating a combined x86 and x64 Visual Studio project (Problem Solved)
Hi John, Thank you for your help. Hopefully this gets added to the thread properly. Thanks, Lee -Original Message- From: John Drescher [mailto:dresche...@gmail.com] Sent: Thursday, July 01, 2010 2:43 PM To: Adarr, Lee; CMake mailing list Subject: Re: [CMake] Generating a combined x86 and x64 Visual Studio project I have recently created a CMake project that I use to generate Visual Studio solutions/projects and it works perfectly with one exception. After generating a Visual Studio 9 2008 Win64 solution, the solution contains only the x64 build specification. Is it possible to have CMake add the win32 build specification to the same solution or must one generate separate 32-bit and 64-bit solutions/projects in different directories? I believe generating the solutions out of source with different build folders is the only good way at the moment. John ___ 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] Generating a combined x86 and x64 Visual Studio project (Problem Solved)
Hi Tyler, Thank you for your help on this. Sorry, I must have missed that one. I guess I need to take a break from this research. Thanks, Lee -Original Message- From: Tyler Roscoe [mailto:ty...@cryptio.net] Sent: Thursday, July 01, 2010 2:46 PM To: Adarr, Lee Cc: cmake@cmake.org Subject: Re: [CMake] Generating a combined x86 and x64 Visual Studio project On Thu, Jul 01, 2010 at 02:18:45PM -0500, Adarr, Lee wrote: After generating a Visual Studio 9 2008 Win64 solution, the solution contains only the x64 build specification. Is it possible to have CMake Yes, this is as designed. add the win32 build specification to the same solution or must one generate separate 32-bit and 64-bit solutions/projects in different directories? This is not currently possible. Here's a thread where this was discussed previously: http://www.cmake.org/pipermail/cmake/2009-June/029897.html tyler ___ 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] Detecting Xcode in CMake scripts
I currently have a project that I configure using CMake 2.8, and because of a problem with Xcode on the Macintosh I need to add some checks and adjust things in the CMake scripts to change the build configuration when Xcode is the intended build tool. I would like to restrict these changes specifically to Xcode so that when a different tools like make files are used the special changes are not needed. How could someone target specific build configuration settings to a development tool like Xcode? ___ 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] Detecting Xcode in CMake scripts
On 2. Jul, 2010, at 6:02 , Tron Thomas wrote: I currently have a project that I configure using CMake 2.8, and because of a problem with Xcode on the Macintosh I need to add some checks and adjust things in the CMake scripts to change the build configuration when Xcode is the intended build tool. I would like to restrict these changes specifically to Xcode so that when a different tools like make files are used the special changes are not needed. How could someone target specific build configuration settings to a development tool like Xcode? if(CMAKE_GENERATOR STREQUAL Xcode) ... endif() HTH 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
[Cmake-commits] CMake branch, next, updated. v2.8.2-172-g517f4c0
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 517f4c03f0757aff3e0289bc238986da9bdf33e0 (commit) via 142edf8ad4baccd991a6a8a3e5283d0b575acca2 (commit) via 6ebb4843a6414acc6118e916b973f591fe481c8b (commit) from 8ee7df8ca0a9b97cbb63107439bf81863921978e (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=517f4c03f0757aff3e0289bc238986da9bdf33e0 commit 517f4c03f0757aff3e0289bc238986da9bdf33e0 Merge: 8ee7df8 142edf8 Author: Zach Mullen zach.mul...@kitware.com Date: Thu Jul 1 14:11:13 2010 -0400 Merge branch 'improve-test-cost-sorting' into next http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=142edf8ad4baccd991a6a8a3e5283d0b575acca2 commit 142edf8ad4baccd991a6a8a3e5283d0b575acca2 Author: Zach Mullen zach.mul...@kitware.com Date: Thu Jul 1 14:10:49 2010 -0400 More robust cost-based scheduling impl diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 4d39367..2d3853b 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -18,6 +18,23 @@ #include stack #include float.h +class TestComparator +{ +public: + TestComparator(cmCTestMultiProcessHandler* handler) : Handler(handler) {} + ~TestComparator() {} + + // Sorts tests in descending order of cost + bool operator() (int index1, int index2) const +{ +return Handler-Properties[index1]-Cost + Handler-Properties[index2]-Cost; +} + +private: + cmCTestMultiProcessHandler* Handler; +}; + cmCTestMultiProcessHandler::cmCTestMultiProcessHandler() { this-ParallelLevel = 1; @@ -154,15 +171,8 @@ void cmCTestMultiProcessHandler::UnlockResources(int index) void cmCTestMultiProcessHandler::EraseTest(int test) { this-Tests.erase(test); - for(TestCostMap::iterator i = this-TestCosts.begin(); - i != this-TestCosts.end(); ++i) -{ -if(i-second.find(test) != i-second.end()) - { - i-second.erase(test); - return; - } -} + this-SortedTests.erase( +std::find(this-SortedTests.begin(), this-SortedTests.end(), test)); } //- @@ -244,41 +254,36 @@ void cmCTestMultiProcessHandler::StartNextTests() return; } - for(TestCostMap::reverse_iterator i = this-TestCosts.rbegin(); - i != this-TestCosts.rend(); ++i) + TestList copy = this-SortedTests; + for(TestList::iterator test = copy.begin(); test != copy.end(); ++test) { -TestSet tests = i-second; //copy the test set -for(TestSet::iterator test = tests.begin(); -test != tests.end(); ++test) +//in case this test has already been started due to dependency +if(this-TestRunningMap[*test] || this-TestFinishMap[*test]) { - //in case this test has already been started due to dependency - if(this-TestRunningMap[*test] || this-TestFinishMap[*test]) -{ -continue; -} - size_t processors = GetProcessorsUsed(*test); - if(processors numToStart) -{ -return; -} - if(this-StartTest(*test)) -{ -if(this-StopTimePassed) - { - return; - } -numToStart -= processors; -} - else -{ -cmCTestLog(this-CTest, HANDLER_VERBOSE_OUTPUT, std::endl -Test did not start waiting on depends to finish: -*test \n); -} - if(numToStart == 0) + continue; + } +size_t processors = GetProcessorsUsed(*test); +if(processors numToStart) + { + return; + } +if(this-StartTest(*test)) + { + if(this-StopTimePassed) { return; } + numToStart -= processors; + } +else + { + cmCTestLog(this-CTest, HANDLER_VERBOSE_OUTPUT, std::endl + Test did not start waiting on depends to finish: + *test \n); + } +if(numToStart == 0) + { + return; } } } @@ -468,27 +473,22 @@ void cmCTestMultiProcessHandler::CreateTestCostList() for(TestMap::iterator i = this-Tests.begin(); i != this-Tests.end(); ++i) { -//We only want to schedule them by cost in a parallel situation -if(this-ParallelLevel 1) - { - std::string name = this-Properties[i-first]-Name; - if(std::find(this-LastTestsFailed.begin(), this-LastTestsFailed.end(), - name) != this-LastTestsFailed.end()) -{ -this-TestCosts[FLT_MAX].insert(i-first); -} - else -{ -
[Cmake-commits] CMake branch, master, updated. v2.8.2-27-g9f3524f
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 9f3524f4696f394e04077aed93b482ed72cda4ca (commit) from 6ebb4843a6414acc6118e916b973f591fe481c8b (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=9f3524f4696f394e04077aed93b482ed72cda4ca commit 9f3524f4696f394e04077aed93b482ed72cda4ca Author: KWSys Robot kwro...@kitware.com Date: Fri Jul 2 00:01:06 2010 -0400 KWSys Nightly Date Stamp diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index b1fe226..52a4b4a 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2010) SET(KWSYS_DATE_STAMP_MONTH 07) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 01) +SET(KWSYS_DATE_STAMP_DAY 02) --- Summary of changes: Source/kwsys/kwsysDateStamp.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