[cmake-developers] [CMake 0013037]: Support #[ \t]*cmakedefine
The following issue has been SUBMITTED. == http://cmake.org/Bug/view.php?id=13037 == Reported By:Mathieu Malaterre Assigned To: == Project:CMake Issue ID: 13037 Category: CMake Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2012-03-12 07:10 EDT Last Modified: 2012-03-12 07:10 EDT == Summary:Support #[ \t]*cmakedefine Description: It would be nice if cmake would support space and/or tab in between # sign and cmakedefine keyword to get a nice indentation #if BLA # cmakedefine BAR #else # cmakedefine FOO #endif == Issue History Date ModifiedUsername FieldChange == 2012-03-12 07:10 Mathieu MalaterreNew 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
Re: [cmake-developers] Ninja windows
On 3/11/2012 5:31 PM, Peter Kümmel wrote: Thanks David, then I pull rebased in future. Take a look at the branch.name.rebase config option documented by git help config. And how could I rebase the already pushed branch? This is possible but requires a fairly deep understanding of how Git works. Before we merge the topic to 'master' we can look at removing those extra merges. -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] Fwd: Preferred variable retrieval within Cpack generator.
Forgot to cc the list. -- Forwarded message -- From: Eric Noulard eric.noul...@gmail.com Date: 2012/3/10 Subject: Re: [cmake-developers] Preferred variable retrieval within Cpack generator. To: Schwartz, Philip Marc (RIS-BCT) philip.schwa...@lexisnexis.com 2012/3/10 Schwartz, Philip Marc (RIS-BCT) philip.schwa...@lexisnexis.com: What is the preferred method of variable retrieval and/pr parameter passing in the cpack generator structure. I have seen a mixture of passing values into functions and also using GetOption to obtain the wanted value. Usually using GetOption means that we want to give user some control so that this CPACK_xxx value may be set in CMakeLists.txt, CPack project config file or CPack command line arg. GetOption is not used to pass value from cmCPackGenerator class to its daughter classes. I am currently looking at adding new functionality to allow for better control of package naming when working with generation of packages. This will include using a variable template for creation of the naming schema to be used. Currently I am allowing the package specific generator to build a map of the parameters for naming and pass the map into the function GetComponentPackageFileName. This will allow for the specific generator to control the values, but I am not sure if it is more efficient to use GetOption directly in the function. If the feature may be shared by all generators then it ought to be defined in the cmCPackGenerator base class. (let's call it generic CPack generator) If some data are processed by the generic CPack generator and then used by some daughter classes then you can add a protected field member. This is the case for cmCPackGenerator::Components, or even cmCPackGenerator::files. What are the thoughts of the other developers working on CMake and CPack? I'm not sure I did catch all the implication of I am allowing the package specific generator to build a map of the parameters for naming and pass the map into the function GetComponentPackageFileName may you can provide us with a first patch? Attached to http://public.kitware.com/Bug/view.php?id=12997. Then we (at least I) may see more clearly what you mean? -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Preferred variable retrieval within Cpack generator.
2012/3/12 Schwartz, Philip Marc (RIS-BCT) philip.schwa...@lexisnexis.com: Usually using GetOption means that we want to give user some control so that this CPACK_xxx value may be set in CMakeLists.txt, CPack project config file or CPack command line arg. GetOption is not used to pass value from cmCPackGenerator class to its daughter classes. It is looking like this will be the preferred option as I want to be able to define this for all classes that inherit from cmCPackGenerator allowing the variables to be set for all generators that might use them. The important question is would this option be settable by user in the CMake script? If yes then you soud use GetOption. If the feature may be shared by all generators then it ought to be defined in the cmCPackGenerator base class. (let's call it generic CPack generator) If some data are processed by the generic CPack generator and then used by some daughter classes then you can add a protected field member. This is the case for cmCPackGenerator::Components, or even cmCPackGenerator::files. I don't think I am creating anything that will require this. The focus is around changing how the name is handled, not adding further variables in the generator to the mix. Ok. I'm not sure I did catch all the implication of I am allowing the package specific generator to build a map of the parameters for naming and pass the map into the function GetComponentPackageFileName Be for deciding on using GetOption to allow the variables to be set by a cmake file directly in the cmCPackGenerator class, I was doing this work in the subclass for the type specific generator and creating a std::mapstd::string, std::string that contained a value map. This was a bad way of doing it and reason for the first email and after reading the email has been changed. I go on vacation on Friday and I am out for a week. I am hoping to have the first version of the patch out in the bug before then. OK then. I'll go answer on the tracker as well. -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0013039]: Support for the Raptor2 RDF syntax library (FindRaptor2.cmake attached)
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=13039 == Reported By:Daniel R. Gomez Assigned To: == Project:CMake Issue ID: 13039 Category: CMake Reproducibility:N/A Severity: feature Priority: normal Status: new == Date Submitted: 2012-03-12 17:21 EDT Last Modified: 2012-03-12 17:21 EDT == Summary:Support for the Raptor2 RDF syntax library (FindRaptor2.cmake attached) Description: I would like to contribute the attached file, which implements support for FIND_PACKAGE(Raptor2). == Issue History Date ModifiedUsername FieldChange == 2012-03-12 17:21 Daniel R. GomezNew Issue 2012-03-12 17:21 Daniel R. GomezFile Added: FindRaptor2.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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[CMake] Q: cmExportFileGenerator::GenerateImportedFileCheckLoop
Hi there, CMake 2.8.7 recently added a new behavior when reading export files: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2be068c I perfectly understand the goal here, I think this is a great user functionality. However this breaks the old behavior of cmake being tolerant with missing files. This is particularly difficult to handle for large package such as VTK. Currently in debian we split the VTK package into sub-packages: * C++ dev, * Qt dev, * TCL, * Java and * Python bindings. Since there is a single export file, we are now forced to install all those sub-packages while in the past we could bypass any cmake internals checks and only install -say- C++-dev package. Would it make sense to conditionally remove this automatic check ? Something like: diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index c4f5dfb..6eaf4d5 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -384,7 +384,7 @@ cmExportFileGenerator::GenerateImportedFileCheckLoop(std::ostream os) os # Loop over all imported files and verify that they actually exist\n FOREACH(target ${_IMPORT_CHECK_TARGETS} )\n FOREACH(file ${_IMPORT_CHECK_FILES_FOR_${target}} )\n -IF(NOT EXISTS \${file}\ )\n +IF(NOT CMAKE_SKIP_IMPORT_CHECK_FILES AND NOT EXISTS \${file}\ )\n MESSAGE(FATAL_ERROR \The imported target \\\${target}\\\ references the file\n \\\${file}n Thanks for comments, -- Mathieu -- 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] Order of compilation of Java files
Andreas, Do you mind sharing a CMakeLists.txt for one of your Java projects? Thank You. -- Artur Kedzierski -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Andreas Pakulat Sent: Thursday, March 08, 2012 8:33 To: cmake@cmake.org Subject: Re: [CMake] Order of compilation of Java files On 08.03.12 06:39:37, Kedzierski, Artur CIV NSWC Corona, PA13 wrote: I am trying to use CMake for a small Java project that's part of a bigger C++ project. I have a Java project that looks like that: project(MyProject Java) include_directories(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/MyProject.dir) add_library(MyProject file1.java file2.java file3.java ) It works on Linux. However, when I tried it on Windows, I've ran into two problems: 1) The resulting *.class files were placed in ${CMAKE_CURRENT_BINARY_DIR}. As a work around, I changed include_directories to be: include_directories(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/MyProject.dir ${CMAKE_CURRENT_BINARY_DIR}) Is there a way to specify where the *.class file will be generated? 2) Unlike on Linux, the java files are not compiled in a listed order. I have dependencies where one file2.java depends on file1.class so it doesn't compile. How can I tell it to compile the *.java files in specific order? Is there a way for CMake to automatically determine the dependencies? I've looked at using CMake to build some Java files (in an otherwise C++/C project) some time ago and the result was that Java-support simply does not fit with CMake's language and functions - at least not in the way include_directories() and co are currently implemented for Java. So I've simply opted for custom-command's and targets to compile Java. Andreas -- 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 smime.p7s Description: S/MIME cryptographic signature -- 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] Triggers for isysroot
On Mar 11, 2012, Michael Wild them...@gmail.com wrote: I think it depends on what you set it to. If it's the default SDK, it doesn't get included. It could also be that the CMAKE_OSX_DEPLOYMENT_TARGET variable plays into this. Sadly, my Mac died quiet some time ago, so I can't check right now... Michael Thank you for the reply. I'm off to wipe and reinstall because there have been three xcodes and three os versions in as many months. I have to get a baseline. But on this topic, I'm hypothesizing that there are well defined cases, when compiling for one architecture, that the sysroot path will get added. I think the sysroot path is attached somehow to -arch x86_64, but I'm just not up to reading the source today. I was hoping this would be an easy answer. The failure I'm trying to simplify to a reproducible case has only two CXX_FLAGS out of twenty that I can't locate their origin. -arch x86_64 -isysroot /some/path/to/an/sdk In the failing software, there is no CMAKE_OSX_DEPLOYMENT_TARGET specified to be used or set in the command, but I will look harder in case I missed it. Thanks for your suggestion. -- 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] Defer compiler to different file in Visual Studio
Hello, I'm currently evaluating Lazy C++ [1], which generates both header and source files. I'm using add_custom_command() to invoke the generator on *.lzz file, and for each .lzz file it generates one .hpp file and one .cpp file. What I'm missing is the ability to compile the file I'm currently editing from within Visual Studio. With .cpp files it's possible to compile just one file, e.g. by right-clicking it in the Solution Explorer, then selecting Compile. Or even better, bind it to a hotkey. So what I'd like to do is for each lzz file, set the compile command to compile the corresponding cpp file. I can't imagine it being that hard, since one would merely have to change the file extension in the command line from cpp to lzz. Any ideas? I'm not sure though, this might be more of a Visual Studio-specific question than a CMake-specific one. Thanks, Andreas [1] http://www.lazycplusplus.com/index.html -- 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] Q: cmExportFileGenerator::GenerateImportedFileCheckLoop
On Monday 12 March 2012, Mathieu Malaterre wrote: Hi there, CMake 2.8.7 recently added a new behavior when reading export files: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2be068c I perfectly understand the goal here, I think this is a great user functionality. However this breaks the old behavior of cmake being tolerant with missing files. This is particularly difficult to handle for large package such as VTK. Currently in debian we split the VTK package into sub-packages: * C++ dev, * Qt dev, * TCL, * Java and * Python bindings. Since there is a single export file, we are now forced to install all those sub-packages while in the past we could bypass any cmake internals checks and only install -say- C++-dev package. Here's my opinion on this: I understand the issue, but basically this is the purpose of the patch, to make an exports file fail if the files it describes are not actually present. I mean, if the debian packages did that, then the installed exports files were basically broken, since they created imported targets referencing non-existant files, so you would get link errors at build time. I think the proper way to make this work is to split the exports-file into multiple files. 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] Defer compiler to different file in Visual Studio
On 3/12/2012 3:28 PM, Andreas Haferburg wrote: Hello, I'm currently evaluating Lazy C++ [1], which generates both header and source files. I'm using add_custom_command() to invoke the generator on *.lzz file, and for each .lzz file it generates one .hpp file and one .cpp file. What I'm missing is the ability to compile the file I'm currently editing from within Visual Studio. With .cpp files it's possible to compile just one file, e.g. by right-clicking it in the Solution Explorer, then selecting Compile. Or even better, bind it to a hotkey. So what I'd like to do is for each lzz file, set the compile command to compile the corresponding cpp file. I can't imagine it being that hard, since one would merely have to change the file extension in the command line from cpp to lzz. Any ideas? I'm not sure though, this might be more of a Visual Studio-specific question than a CMake-specific one. Lzz is not a compiler, but rather a code generator. I would set things up so that you do something like this: create_lzz_source_list(MY_CPP_HH_SOURCES foo.lzz bar.lzz car.zzz) add_library(mylib ${MY_CPP_HH_SOURCES}) # create_lzz_sources would be a function that creates a bunch of custom commands that run lzz on each lzz input file and create a .cpp and .hh file. So, there should be a custom command for each .cpp and .hh file. You should be able to click on one of those can select compile, and it will run that file. This is the exact type of thing that is done for the VTK code wrapper code. -Bill -- 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] Defer compiler to different file in Visual Studio
On 12-Mar-12 9:36 PM, Bill Hoffman wrote: On 3/12/2012 3:28 PM, Andreas Haferburg wrote: Hello, I'm currently evaluating Lazy C++ [1], which generates both header and source files. I'm using add_custom_command() to invoke the generator on *.lzz file, and for each .lzz file it generates one .hpp file and one .cpp file. What I'm missing is the ability to compile the file I'm currently editing from within Visual Studio. With .cpp files it's possible to compile just one file, e.g. by right-clicking it in the Solution Explorer, then selecting Compile. Or even better, bind it to a hotkey. So what I'd like to do is for each lzz file, set the compile command to compile the corresponding cpp file. I can't imagine it being that hard, since one would merely have to change the file extension in the command line from cpp to lzz. Any ideas? I'm not sure though, this might be more of a Visual Studio-specific question than a CMake-specific one. Lzz is not a compiler, but rather a code generator. I would set things up so that you do something like this: create_lzz_source_list(MY_CPP_HH_SOURCES foo.lzz bar.lzz car.zzz) add_library(mylib ${MY_CPP_HH_SOURCES}) # create_lzz_sources would be a function that creates a bunch of custom commands that run lzz on each lzz input file and create a .cpp and .hh file. So, there should be a custom command for each .cpp and .hh file. You should be able to click on one of those can select compile, and it will run that file. This is the exact type of thing that is done for the VTK code wrapper code. Yea, that's pretty much what I've got so far. And yes, I realize that's the way it's *supposed* to be set up. ;) I've posted my CMakeLists.txt here if you want to have a look: http://stackoverflow.com/a/9669388/872616 The only time I would really like to have anything to do with generated files is if something goes wrong with the generation, but not during normal development. I'd like to set up the tool chain such that I only have to touch the .lzz files, and the .hpp/.cpp would be completely hidden away in the build dir. Just as normally you wouldn't want to have anything to do with .obj files, you know? Cheers Andreas -- 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] Defer compiler to different file in Visual Studio
On 3/12/2012 5:00 PM, Andreas Haferburg wrote: Yea, that's pretty much what I've got so far. And yes, I realize that's the way it's *supposed* to be set up. ;) I've posted my CMakeLists.txt here if you want to have a look: http://stackoverflow.com/a/9669388/872616 The only time I would really like to have anything to do with generated files is if something goes wrong with the generation, but not during normal development. I'd like to set up the tool chain such that I only have to touch the .lzz files, and the .hpp/.cpp would be completely hidden away in the build dir. Just as normally you wouldn't want to have anything to do with .obj files, you know? I don't think you can do that. However, you can make it a little nicer with this change: MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${filename} From Note that MAIN_DEPENDENCY is completely optional and is used as a suggestion to visual studio about where to hang the custom command. In makefile terms this creates a new target in the following form: cmake --help-command add_custom_command OUTPUT: MAIN_DEPENDENCY DEPENDS COMMAND However, when you right click on A.lzz and it will run lzz, and not the full compiler cycle. You will have to right click on the generated .cpp file to run the actual compiler. There is no way to collapse that into one step. -Bill -- 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] SWIG python3
Hi, I'm trying basic examples for using SWIG to generate python extensions for c++: cmake_minimum_required(VERSION 2.8) FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) FIND_PACKAGE(PythonLibs) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) SET(CMAKE_SWIG_FLAGS ) SET_SOURCE_FILES_PROPERTIES(number.i PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(number.i PROPERTIES SWIG_FLAGS -includeall) SWIG_ADD_MODULE(number python number.i number.hpp number.cpp) SWIG_LINK_LIBRARIES(number ${PYTHON_LIBRARIES}) This CMakeLists.txt is working fine, but only for python2, when I try to import it in python3, I'll receive the following error: Traceback (most recent call last): File stdin, line 1, in module File number.py, line 26, in module _number = swig_import_helper() File number.py, line 22, in swig_import_helper _mod = imp.load_module('_number', fp, pathname, description) ImportError: dynamic module does not define init function (PyInit__number) Could someone help me out here? Thanks, Matthias 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
Re: [CMake] SWIG python3
Ok the error is related to my arch linux. Cmake can't find python 3.2 because the lib is named libpython3.2mu. Does anybody know about this and perhaps has a solution? On Mon, 2012-03-12 at 22:52 +0100, Matthias Fulz wrote: Hi, I'm trying basic examples for using SWIG to generate python extensions for c++: cmake_minimum_required(VERSION 2.8) FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) FIND_PACKAGE(PythonLibs) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) SET(CMAKE_SWIG_FLAGS ) SET_SOURCE_FILES_PROPERTIES(number.i PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(number.i PROPERTIES SWIG_FLAGS -includeall) SWIG_ADD_MODULE(number python number.i number.hpp number.cpp) SWIG_LINK_LIBRARIES(number ${PYTHON_LIBRARIES}) This CMakeLists.txt is working fine, but only for python2, when I try to import it in python3, I'll receive the following error: Traceback (most recent call last): File stdin, line 1, in module File number.py, line 26, in module _number = swig_import_helper() File number.py, line 22, in swig_import_helper _mod = imp.load_module('_number', fp, pathname, description) ImportError: dynamic module does not define init function (PyInit__number) Could someone help me out here? Thanks, Matthias -- 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 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
Re: [CMake] Defer compiler to different file in Visual Studio
Bill, thank you for your replies. I'll be writing a macro for Visual Studio then which finds the corresponding cpp file and compiles it. Cheers Andreas On 12-Mar-12 10:26 PM, Bill Hoffman wrote: On 3/12/2012 5:00 PM, Andreas Haferburg wrote: Yea, that's pretty much what I've got so far. And yes, I realize that's the way it's *supposed* to be set up. ;) I've posted my CMakeLists.txt here if you want to have a look: http://stackoverflow.com/a/9669388/872616 The only time I would really like to have anything to do with generated files is if something goes wrong with the generation, but not during normal development. I'd like to set up the tool chain such that I only have to touch the .lzz files, and the .hpp/.cpp would be completely hidden away in the build dir. Just as normally you wouldn't want to have anything to do with .obj files, you know? I don't think you can do that. However, you can make it a little nicer with this change: MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${filename} From Note that MAIN_DEPENDENCY is completely optional and is used as a suggestion to visual studio about where to hang the custom command. In makefile terms this creates a new target in the following form: cmake --help-command add_custom_command OUTPUT: MAIN_DEPENDENCY DEPENDS COMMAND However, when you right click on A.lzz and it will run lzz, and not the full compiler cycle. You will have to right click on the generated .cpp file to run the actual compiler. There is no way to collapse that into one step. -Bill -- 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 -- Scopis GmbH Blücherstr. 22 / Aufg. 3 10961 Berlin Germany E-Mail: ahaferb...@scopis.com Tel.: +49 (30) 39 82 05 98 Fax.: +49 (30) 39 82 05 99 Internet: www.scopis.com HRB 128315 Berlin Charlottenburg USt-IdNr.: DE272721463 Steuernummer: 29/014/02034 Geschäftsführer: Bartosz Kosmecki Diese E-mail, einschließlich der Anhänge, ist ausschließlich für den oben genannten Adressaten bestimmt und beinhaltet vertrauliche und/oder gesetzlich geschützte Informationen. Jedem anderen Empfänger ist die Vervielfältigung, Weitergabe oder Veröffentlichung untersagt. Falls Sie diese Mitteilung irrtümlicherweise erhalten haben, bitten wir um sofortige Information an den Absender und Vernichtung der E-mail. This e-mail, including the attachments, is for the exclusive use of the above-named addresses and contains confidential information and/or information protected by law. Any other recipient is prohibited from duplicating, passing on to third parties, or publishing this information. If by error you are the recipient of this communication please inform the sender immediately and permanently delete this e-mail. -- 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] Operator Precedence
On 03/12/2012 07:32 PM, Robert Dailey wrote: What is the precedence for logical operators (specifically in IF conditions)? Consider: STREQUAL, AND, OR (plus any others) Documentation of IF(): ...there is a traditional order of precedence. Parenthetical expressions are evaluated first followed by unary operators such as EXISTS, COMMAND, and DEFINED. Then any EQUAL, LESS, GREATER, STRLESS, STRGREATER, STREQUAL, MATCHES will be evaluated. Then NOT operators and finally AND, OR operators will be evaluated. Documentation of WHILE(): The condition is evaluated using the same logic as the if command. 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] CMake Linking Error
On 03/08/2012 05:40 PM, buzz clay wrote: Hi, I have not been able to find the answer to my current problem so I thought I'd try a new post. Before diving into the details, please be aware that the code I am writing compiles/runs perfectly with a personal Makefile I wrote. My code is written in C++ and has many different class definitions. To run different simulations some classes may or may not have actual objects created. However, there are other portions of the code that specifically reference functions from nearly all classes (although this code might not actually be used because the object was never created). The linking errors that I am facing arise when I do not make an object of a given class. Other parts of the code need to be aware that the class exists, even if an object was never made. Although this seems like it would be a result of not including the appropriate header files, I assure you they are correct! For some reason, if I do not make an object of a given class cmake ignores the class and when it comes time to link everything together I get the following error: Linking CXX executable collision Output/libOutput.a(Output.cpp.o): In function `Output::Output(std::vectorBall*, std::allocatorBall* *, std::vectorCollisionObject*, std::allocatorCollisionObject* *)': Output.cpp:(.text+0x379): undefined reference to `SWall::getY2()' Output.cpp:(.text+0x391): undefined reference to `SWall::getX2()' Output.cpp:(.text+0x3a9): undefined reference to `SWall::getY1()' Output.cpp:(.text+0x3c1): undefined reference to `SWall::getX1()' collect2: ld returned 1 exit status make[2]: *** [collision] Error 1 make[1]: *** [CMakeFiles/collision.dir/all] Error 2 make: *** [all] Error 2 PLEASE NOTE: If in my main.cpp file I simply create an SWall object and never use it, the errors go away and everything works perfectly. I simply do not understand why cmake would care whether or not I actually make an object of a given class! The following is my CMakeLists.txt file in the highest level directory: cmake_minimum_required(VERSION 2.8) project(collision CXX) add_subdirectory(Extraneous) add_subdirectory(Output) add_subdirectory(Simulation) add_subdirectory(CollisionObject) add_definitions(-ansi -Wall -O2) add_executable(collision test.cpp) target_link_libraries(collision Simulation) target_link_libraries(collision PriorityQueue) target_link_libraries(collision Event) target_link_libraries(collision Ball) target_link_libraries(collision SWall) target_link_libraries(collision Circle) target_link_libraries(collision Output) target_link_libraries(collision SimpleMath) INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/collision DESTINATION ${CMAKE_SOURCE_DIR}) All of the lower level directories simply had add_library(libname libname.cpp) in the CMakeLists.txt file. [...] I.e., they don't have TARGET_LINK_LIBRARIES() commands? If so, CMake can't know that Output must be linked against SWall, and in your final link command line, the former appears behind the latter -- un- defined references. Express all your targets' immediate dependencies via TARGET_LINK_LIBRARIES(), and drop the mediate ones if there are any; CMake figures them out by itself. 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] Order of compilation of Java files
On 12.03.12 08:42:44, Kedzierski, Artur CIV NSWC Corona, PA13 wrote: Andreas, Do you mind sharing a CMakeLists.txt for one of your Java projects? Thank You. Sorry, thats not possible since its closed source. Andreas -- 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.7-3157-g0ac1b0b
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 0ac1b0beaaed6eb468d84d95ae3880709e98cdfd (commit) via 55b2aa884cdb3df9a32152ee1df60e708d2c5ec9 (commit) via eb33000d75e0e41a2412db9a75597dbee6bfdad6 (commit) via 42a81e7119fab94afcb0c87f93c314af1689e1f7 (commit) from a948b62ff8c0f72f89f2638222986d782cba47f1 (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=0ac1b0beaaed6eb468d84d95ae3880709e98cdfd commit 0ac1b0beaaed6eb468d84d95ae3880709e98cdfd Merge: a948b62 55b2aa8 Author: Brad King brad.k...@kitware.com AuthorDate: Mon Mar 12 09:40:42 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Mon Mar 12 09:40:42 2012 -0400 Merge topic 'test-RunCMake' into next 55b2aa8 Use generalized RunCMake test infrastrucure for build_command test eb33000 Use generalized RunCMake test infrastrucure for find_package test 42a81e7 Add stronger infrastructure for CMake-only tests http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=55b2aa884cdb3df9a32152ee1df60e708d2c5ec9 commit 55b2aa884cdb3df9a32152ee1df60e708d2c5ec9 Author: Brad King brad.k...@kitware.com AuthorDate: Fri Mar 9 16:47:19 2012 -0500 Commit: Brad King brad.k...@kitware.com CommitDate: Mon Mar 12 09:33:21 2012 -0400 Use generalized RunCMake test infrastrucure for build_command test The CMakeCommands.build_command test performs output/error checking so move it over to RunCMake to re-use the generalized infrastrucure. This is the only test left using Tests/CMakeCommands/CMakeLists.txt so remove it. diff --git a/Tests/CMakeCommands/CMakeLists.txt b/Tests/CMakeCommands/CMakeLists.txt deleted file mode 100644 index e9e4020..000 --- a/Tests/CMakeCommands/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -macro(add_CMakeCommands_test test) - add_test(CMakeCommands.${test} ${CMAKE_CMAKE_COMMAND} --DCMake_SOURCE_DIR=${CMake_SOURCE_DIR} # TODO: Remove --Ddir=${CMAKE_CURRENT_BINARY_DIR}/${test} --Dgen=${CMAKE_TEST_GENERATOR} --P ${CMAKE_CURRENT_SOURCE_DIR}/${test}/test.cmake -) -endmacro() - -add_CMakeCommands_test(build_command) diff --git a/Tests/CMakeCommands/build_command/test.cmake b/Tests/CMakeCommands/build_command/test.cmake deleted file mode 100644 index 55d9359..000 --- a/Tests/CMakeCommands/build_command/test.cmake +++ /dev/null @@ -1,86 +0,0 @@ -if(NOT DEFINED CMake_SOURCE_DIR) - message(FATAL_ERROR CMake_SOURCE_DIR not defined) -endif() - -if(NOT DEFINED dir) - message(FATAL_ERROR dir not defined) -endif() - -if(NOT DEFINED gen) - message(FATAL_ERROR gen not defined) -endif() - -message(STATUS CTEST_FULL_OUTPUT (Avoid ctest truncation of output)) - -# Run cmake: -# -function(run_cmake build_dir extra_args expected_result expected_output expected_error) - message(STATUS run_cmake build_dir='${build_dir}' extra_args='${extra_args}') - - # Ensure build_dir exists: - # - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${build_dir}) - - # Run cmake: - # - execute_process(COMMAND ${CMAKE_COMMAND} -${extra_args} --G ${gen} ${CMake_SOURCE_DIR}/Tests/CMakeCommands/build_command -RESULT_VARIABLE result -OUTPUT_VARIABLE stdout -ERROR_VARIABLE stderr -WORKING_DIRECTORY ${build_dir} -) - - message(STATUS result='${result}') - message(STATUS stdout='${stdout}') - message(STATUS stderr='${stderr}') - message(STATUS ) - - # Verify result and output match expectations: - # - if(0 STREQUAL ${expected_result}) -if(NOT ${result} STREQUAL 0) - message(FATAL_ERROR -error: result='${result}' is non-zero and different than expected_result='${expected_result}') -endif() - else() -if(${result} STREQUAL 0) - message(FATAL_ERROR -error: result='${result}' is zero and different than expected_result='${expected_result}') -endif() - endif() - - foreach(e ${expected_output}) -if(NOT stdout MATCHES ${e}) - message(FATAL_ERROR -error: stdout does not match expected_output item e='${e}') -else() - message(STATUS info: stdout matches '${e}') -endif() - endforeach() - - foreach(e ${expected_error}) -if(NOT stderr MATCHES ${e}) - message(FATAL_ERROR -error: stderr does not match expected_error item e='${e}') -else() - message(STATUS info: stderr matches '${e}') -endif() - endforeach() - - message(STATUS result, stdout and stderr match all expectations: test passes) - message(STATUS ) -endfunction() - - -# Expect this case to succeed: -run_cmake(${dir}/b1 0 - Build files have been written to: -
[Cmake-commits] CMake branch, next, updated. v2.8.7-3159-g7ff1fba
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 7ff1fbaafefc4c9caa1f09baa2f580cb4950d439 (commit) via 54604ee7e997c950519623375812eb0470b8ef25 (commit) from 0ac1b0beaaed6eb468d84d95ae3880709e98cdfd (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=7ff1fbaafefc4c9caa1f09baa2f580cb4950d439 commit 7ff1fbaafefc4c9caa1f09baa2f580cb4950d439 Merge: 0ac1b0b 54604ee Author: Brad King brad.k...@kitware.com AuthorDate: Mon Mar 12 11:55:48 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Mon Mar 12 11:55:48 2012 -0400 Merge topic 'doc-Fortran-mod-dir-issue-13034' into next 54604ee Document Fortran_MODULE_DIRECTORY as OUTPUT only (#13034) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54604ee7e997c950519623375812eb0470b8ef25 commit 54604ee7e997c950519623375812eb0470b8ef25 Author: Brad King brad.k...@kitware.com AuthorDate: Mon Mar 12 11:54:54 2012 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Mon Mar 12 11:54:54 2012 -0400 Document Fortran_MODULE_DIRECTORY as OUTPUT only (#13034) CMake does not automatically pass the Fortran module output directory location to the module search path. Add a note to the documentation that the location must also be specified by INCLUDE_DIRECTORIES. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 43f2068..ffdb363 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -982,7 +982,12 @@ void cmTarget::DefineProperties(cmake *cm) When this property is not set the modules will be placed in the build directory corresponding to the target's source directory. If the variable CMAKE_Fortran_MODULE_DIRECTORY is set when a target - is created its value is used to initialize this property.); + is created its value is used to initialize this property. + \n + Note that some compilers will automatically search the module output + directory for modules USEd during compilation but others will not. + If your sources USE modules their location must be specified by + INCLUDE_DIRECTORIES regardless of this property.); cm-DefineProperty (GNUtoMS, cmProperty::TARGET, --- Summary of changes: Source/cmTarget.cxx |7 ++- 1 files changed, 6 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, master, updated. v2.8.7-638-g738d94f
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 738d94f57e46b0668961f93012f8382062f5c1af (commit) from 3551844a81c362333f374723a046d6cbf110d2cc (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=738d94f57e46b0668961f93012f8382062f5c1af commit 738d94f57e46b0668961f93012f8382062f5c1af Author: KWSys Robot kwro...@kitware.com AuthorDate: Tue Mar 13 00:01:06 2012 -0400 Commit: KWSys Robot kwro...@kitware.com CommitDate: Tue Mar 13 00:05:06 2012 -0400 KWSys Nightly Date Stamp diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index 8ac9c83..449317c 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2012) SET(KWSYS_DATE_STAMP_MONTH 03) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 12) +SET(KWSYS_DATE_STAMP_DAY 13) --- 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