[CMake] Changing Project Name
Hi I have a project workspace helpers.dsw which I create through CMake. The CMakeLists.txt file for helpers contains commands add_subdirectory(vpcl) add_subdirectory(vthread) vpcl and vthread folders contain their respective CMakeLists.txt files.This setting adds the project named 'vpcl' and 'vthread' to vhelpers.dsw. Here the project name by default is taken to be the name of the subfolder vpcl or vthread. Is there a way in CMake by which the project name can be changed to something other than the subfolder name say vpcl_new.dsp and vthread_new.dsp? Thanks and Regards Anupam Malhotra The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Specifying Post-build step in CMakeLists.txt
http://www.cmake.org/HTML/Documentation.html search for: post_build On 08/02/2008, Malhotra, Anupam [EMAIL PROTECTED] wrote: Hi In Visual Studio project properties, we can specify the 'Post-build step' in Project settings. Can these settings be made in CMakeLists.txt? Thanks and Regards Anupam Malhotra The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Specifying Project Dependencies in CMakeLists.xt
I have a workspace in which there are 7 projects. If we open the Workspace, then we can specify the dependencies using the menu ‘Project’-’Dependencies…’.I want to specify these dependencies among the various projects in CMakeLists.txt. Can that be done? Yes it can be done with command ADD_DEPENDENCIES. Be sure to check the documentation of CMake before posting ;-) --Sylvain||*||* ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Specifying Post-build step in CMakeLists.txt
In Visual Studio project properties, we can specify the ‘Post-build step’ in Project settings. Can these settings be made in CMakeLists.txt? Yes it can be achieved with the command ADD_CUSTOM_COMMAND The full documentation of the commands can be found online here: http://www.cmake.org/HTML/Documentation.html --Sylvain ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Changing Project Name
Hello, Hi I have a project workspace helpers.dsw which I create through CMake. The CMakeLists.txt file for helpers contains commands add_subdirectory(vpcl) add_subdirectory(vthread) vpcl and vthread folders contain their respective CMakeLists.txt files.This setting adds the project named ‘vpcl’ and ’vthread’ to vhelpers.dsw. Here the project name by default is taken to be the name of the subfolder vpcl or vthread. Is there a way in CMake by which the project name can be changed to something other than the subfolder name say vpcl_new.dsp and vthread_new.dsp? Does the following example work ? in CMakeLists.txt of your vhelpers project: add_subdirectory(vthread) in CMakeLists.txt of your vthread project: PROJECT(vthread_new) --Sylvain ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Specifying Post-build step in CMakeLists.txt
Hi In Visual Studio project properties, we can specify the 'Post-build step' in Project settings. Can these settings be made in CMakeLists.txt? Thanks and Regards Anupam Malhotra The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Specifying Project Dependencies in CMakeLists.xt
Hi I have a workspace in which there are 7 projects. If we open the Workspace, then we can specify the dependencies using the menu 'Project'-'Dependencies...'.I want to specify these dependencies among the various projects in CMakeLists.txt. Can that be done? Thanks and Regards Anupam Malhotra The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Problem in ADD_CUSTOM_COMMAND
Hi I am using ADD_CUSTOM_COMMAND to copy a library after it is build. But the copy is giving an error. Below is the snippet from my CMakeLists.txt file. Please advise. ... ... ADD_LIBRARY(vpcl vpcl_dataconversion.c vpcl_datetime.c vpcl_string.c vpcl_sharedlib.c vpcl_platformabs.c vpcl_misc.c vpcl_memallocdbg.c vpcl_list.c vpcl_fileio.c vpcl_datetimeutil.c ) GET_TARGET_PROPERTY(vpcl_path vpcl LOCATION) MESSAGE (STATUS Value of vpcl path is ${vpcl_path}) SET(CMAKE_COMMAND copy \${vpcl_path}\ \${PROJECT_SOURCE_DIR}\) ADD_CUSTOM_COMMAND(TARGET vpcl POST_BUILD COMMAND ${CMAKE_COMMAND} VERBATIM) ... Thanks and Regards Anupam Malhotra The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] converting VS projects to CMake
Brandon Van Every wrote: Someone asked me the other day why CMake doesn't do this. I thought I gave him a reasonable answer, that it would be painful to do, and that CMake -- native is a much easier problem than native -- CMake. But I said I would ask here for other people's opinions on it. I have experience converting a large Autoconf + GMake project to CMake. At the time I used piles upon piles of regular expressions. I can think of more sophisticated ways to do the parsing and translation. But no matter what technology is chosen, it's a lot of work. I'm sure the same would be true for MSVC, plus MSVC changes its format every few years. Does MSVC pose any other special difficulties, other than sheer mind-numbingness of translation? Having written a naive ruby-script which does little more than just extract the source files for you, there a number of difficulties. For example: - Handling post/pre-build commands. - Handling file-specific options/settings. Getting to 95% is probably doable with a lot of (mind-numbing) work, getting to 100% is probably impossible. There is always another pathological case one wouldn't be able to handle. -- /Jesper ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] converting VS projects to CMake
On Feb 8, 2008 11:30 AM, Jesper Eskilson [EMAIL PROTECTED] wrote: Brandon Van Every wrote: Someone asked me the other day why CMake doesn't do this. I thought I gave him a reasonable answer, that it would be painful to do, and that CMake -- native is a much easier problem than native -- CMake. But I said I would ask here for other people's opinions on it. I have experience converting a large Autoconf + GMake project to CMake. At the time I used piles upon piles of regular expressions. I can think of more sophisticated ways to do the parsing and translation. But no matter what technology is chosen, it's a lot of work. I'm sure the same would be true for MSVC, plus MSVC changes its format every few years. Does MSVC pose any other special difficulties, other than sheer mind-numbingness of translation? Having written a naive ruby-script which does little more than just extract the source files for you, there a number of difficulties. For example: - Handling post/pre-build commands. - Handling file-specific options/settings. Getting to 95% is probably doable with a lot of (mind-numbing) work, getting to 100% is probably impossible. There is always another pathological case one wouldn't be able to handle. Recently I tried to tame an Autoconf + GMake build that had a 400MB monster of a source tree. I got close. I was able to conquer nearly all syntactic problems for that particular source pool, but I ran out of time to deal with the semantics. For instance, there was a lot of tweaky stuff done on the CC and CXX variables. This is contrary to the CMake model, where the compiler is frozen when you select a generator. There were some other semantic issues; Autoconf, GMake, and CMake have a lot of semantic similarities, but there are some differences that require extra work to redo. I'm sure it's similar with MSVC; in fact I wonder if it's a lot worse with MSVC. I believe that for large projects, the conversion strategy needs to assume that it'll be unable to automagically translate everything. It would be better to present a report of what's converted and what still needs to be converted. This would help greatly in estimating the manual labor of projects. I don't think I'd try to estimate a large conversion project again without such a tool. I have some interest in developing an open source framework for such a tool, maybe call it the BaseParse project or some such. I'm ambivalent about trying to develop fullblown translation tools for free. It's exceedingly labor intensive, which means it's exceedingly expensive, which means I gotta eat and I don't like working for months and months for free. But perhaps a common framework that deals with some really basic capabilities, that all consultants and would-be CMake initiates could start from, would be of value for spreading CMake. It would be very helpful if we could tell the world how easy or difficult their build conversions are likely to be. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] converting VS projects to CMake
A convertion tool to CMake is not doable for large projects, because large projects need a framework to be viable. So migrating to CMake implies making or migrating to a new framework. A conversion tool could provide you with working CMakeLists.txt but you will lack a framework around them. Even big projects have a kernel, so I think the best way to migrate to CMake is to convert the kernel projects and build a framework around them. Then migrate the libraries which use directly the kernel and so on. When you have your suited framework you can start to code some helper tools, but they have to stay simple since they also have to be maintained as the framework and CMake will be updated. Moreover, using a conversion tool means learn to use it which can be a big overhead for big projects since you have to fully understand: -how to use it correctly -what the conversion tool does -why it does it like this -why it does not do what you expect -what you need to do differently to suit your internal restriction -. All this to say that conversion tools for source files or other easy tasks are enough. --Sylvain ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] 4th Edition CMake book now in stock
Quoting Ken Martin [EMAIL PROTECTED]: This edition of the book is written around 2.6 isn't it? What does this mean (if anything) about the coming release of 2.6? It means 2.6 should go to beta as soon as we possibly can get it there :) We wanted 2.6 to be out when the books arrived. It is close. We just want to make sure the key features that impact scripts are there in 2.6 when it gets released (like functions return break etc). We are very close. Does the new edition of the book talk about functions, return, break, raise_scope, etc? -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] 4th Edition CMake book now in stock
Does the new edition of the book talk about functions, return, break, raise_scope, etc? Only on one the one page errata sheet that comes with it. The main additions are CPack, cross compiling, a couple more steps in the tutorials, and any updates to bring the book up to the state of CMake CVS as of a couple months ago. FWIW: raise_scope no longer exists, the set command now has this functionality using the PARENT_SCOPE modifier. Thanks Ken ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] converting VS projects to CMake
On Feb 8, 2008 1:14 PM, Sylvain Benner [EMAIL PROTECTED] wrote: A convertion tool to CMake is not doable for large projects, because large projects need a framework to be viable. So migrating to CMake implies making or migrating to a new framework. A conversion tool could provide you with working CMakeLists.txt but you will lack a framework around them. What do you mean by framework? To me this is just a word. I don't understand what you're saying a big project has to have. The project I worked on was monolithic. Not how I would have done it, but the project evolved historically and that's what it was. Moreover, using a conversion tool means learn to use it which can be a big overhead for big projects since you have to fully understand: -how to use it correctly -what the conversion tool does -why it does it like this -why it does not do what you expect -what you need to do differently to suit your internal restriction -. Big projects are work no matter what. What's your alternative, write everything from scratch so you don't have to learn anything? Makes no sense. I wrote a tool that was potentially capable of translating all the thousands of Makefile.in's in the source tree to CMakeList.txt. Some of them had non-trivial amounts of build targets in them that required elaborate re-chaining of dependencies. So what if they aren't perfect for your needs or you had to learn something about how Autoconf + GMake differs from CMake? You have to learn some CMake no matter what and the tools are doing 95% of the work for you. All this to say that conversion tools for source files or other easy tasks are enough. Ok, so you're on record as having your doubts and thinking this wouldn't work for you. I suppose that's a data point and dealing with skepticism is an issue. Anyone else feel more bullish about this? Otherwise I guess it's not an open source problem. More a case of if I want it done right, I'll have to do it myself. Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Treat wchar as built-in type in Cmake ?
I have a single Win32 project where I need to set the VSC++ value of Treat wchar as built-in type to No (to prevent link errors against the Xerces libraries) Is it possible to do this from within CMake ? It'd be a lot nicer than having to do it manually within VS. Google seems to imply that there's some cmake code that relates to this, but I'm not sure what I'd have to do in a cmakelist file to change the value. -- Regards Steve Collyer Netspinner Ltd ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Problem in ADD_CUSTOM_COMMAND
SET(CMAKE_COMMAND copy \${vpcl_path}\ \${PROJECT_SOURCE_DIR}\) ADD_CUSTOM_COMMAND(TARGET vpcl POST_BUILD COMMAND ${CMAKE_COMMAND} VERBATIM) I think you have forgot the ARGS argument Try this instead: ADD_CUSTOM_COMMAND(TARGET vpcl POST_BUILD COMMAND copy ARGS \${vpcl_path}\ \${PROJECT_SOURCE_DIR}\ VERBATIM) Then if it works try it with your intermediate CMAKE_COMMAND variable. --Sylvain ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] converting VS projects to CMake
Someone asked me the other day why CMake doesn't do this. I thought I gave him a reasonable answer, that it would be painful to do, and that CMake -- native is a much easier problem than native -- CMake. But I said I would ask here for other people's opinions on it. I have experience converting a large Autoconf + GMake project to CMake. At the time I used piles upon piles of regular expressions. I can think of more sophisticated ways to do the parsing and translation. But no matter what technology is chosen, it's a lot of work. I'm sure the same would be true for MSVC, plus MSVC changes its format every few years. Does MSVC pose any other special difficulties, other than sheer mind-numbingness of translation? Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] 4th Edition CMake book now in stock
This edition of the book is written around 2.6 isn't it? What does this mean (if anything) about the coming release of 2.6? It means 2.6 should go to beta as soon as we possibly can get it there :) We wanted 2.6 to be out when the books arrived. It is close. We just want to make sure the key features that impact scripts are there in 2.6 when it gets released (like functions return break etc). We are very close. Ken ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Treat wchar as built-in type in Cmake ?
Just add the corresponding command line option for the compiler: ADD_DEFINITIONS( /Zc:wchar_t-# Treat wchar_t as built-in type ) BTW: The command line switch for a specific option is usually mentioned in the comments for that option in Visual Studio. Stefan Stephen Collyer schrieb: I have a single Win32 project where I need to set the VSC++ value of Treat wchar as built-in type to No (to prevent link errors against the Xerces libraries) Is it possible to do this from within CMake ? It'd be a lot nicer than having to do it manually within VS. Google seems to imply that there's some cmake code that relates to this, but I'm not sure what I'd have to do in a cmakelist file to change the value. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Test for if a macro defined
Is there an expression similar to the one for variables to determine if a macro is defined? MACRO(TEST) MESSAGE(TEST is defined) ENDMACRO(TEST) IF(DEFINED TEST) TEST() ELSE(DEFINED TEST) MESSAGE(TEST is not defined) ENDIF(DEFINED TEST) James ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake