Re: [CMake] How to determine the current target?

2009-04-09 Thread Jeremy Cowgar
Alexander Neundorf wrote: No, that's wrong in principle. In the cmake files there is no current target, they describe all targets. If you want to do something when some target is built, you have to do this via dependencies, either via add_custom_command() or add_custom_target(). Hm, the r

[CMake] How to determine the current target?

2009-04-09 Thread Jeremy Cowgar
When I type: $ make abc_xyz I'd like to be able to do some tests against that value, "abc_xyz". How can I do that? For instance: IF( ${CURRENT_MAKE_TARGET} MATCHES "abc_xyz" ) MESSAGE( "Hello World!" ) ENDIF() but I don't know what the var name is and I seem to be missing it in the docs.

Re: [CMake] CPack, Null Soft and Component

2009-04-09 Thread Jeremy Cowgar
I read share\cmake-2.6\Modules\CPack.cmake and I found the reference to CPACK_ADD_COMPONENT ... Changing my code to that has enabled components. It seems the wiki is out of date? Thanks for your help. Jeremy ___ Powered by www.kitware.com Visit oth

Re: [CMake] CPack, Null Soft and Component

2009-04-09 Thread Jeremy Cowgar
David Cole wrote: I also added a link to that wiki page on the main CMake Wiki page here: http://www.cmake.org/Wiki/CMake#Tutorials David, Is this still true: "Also, as of the time of this writing, the extensions to CPack required to build component-based installers are only available via

[CMake] CPack, Null Soft and Component

2009-04-09 Thread Jeremy Cowgar
I was hoping that the COMPONENT parameter to INSTALL would cause the Null Soft installer to have optional items that can be installed. For instance, I have in my CMakeLists.txt file: INSTALL( DIRECTORY source DESTINATION "./" FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DIREC

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
Bill Hoffman wrote: Yes, that is the only way to make it work right now. It would be nice to be able to add an arbitrary file that cmake would re-run when it changes. Please create a feature request for this. However, for now configure_file input is the only way to get your files in the list

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
Bill Hoffman wrote: This is what you left out ** We have to make sure cmake re-runs when input files to this change, the only way to do that is to use them as an input to cmake # now make parser.e an input to cmake, so that cmake will # re-run when

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
Bill Hoffman wrote: So, you are saying that "${CMAKE_BINARY_DIR}/interpreter/int.cmake" changes and cmake does not re-run? Can you look in CMakeFiles/Makefile.cmake? Should be in your binary tree, and it should have int.cmake as a CMAKE_MAKEFILE_DEPENDS. If you do a make VERBOSE=1 it should

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
Bill Hoffman wrote: If the included file is newer than the last run of cmake, cmake will re-run during make. In your code, it looks like you write two different files: "${CMAKE_SOURCE_DIR}/int.ex" and "${CMAKE_SOURCE_DIR}/interpreter/int.cmake" I don't get it... I don't write int.ex, that

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
Bill Hoffman wrote: The file that is produced by the execute_process needs to be the one that is included by cmake. The idea was: if( file.cmake does not exist or it is older than eu core files) generate file.cmake include(file.cmake) Bill, the problem is this section: SET( EU_CORE_UPD

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
Bill Hoffman wrote: The file that is produced by the execute_process needs to be the one that is included by cmake. The idea was: if( file.cmake does not exist or it is older than eu core files) generate file.cmake include(file.cmake) It is included... It's included after the EXECUTE_PR

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
Bill Hoffman wrote: Jeremy Cowgar wrote: INCLUDE( "${CMAKE_BINARY_DIR}/interpreter/int.cmake" ) So, you are saying that "${CMAKE_BINARY_DIR}/interpreter/int.cmake" changes and cmake does not re-run? Can you look in CMakeFiles/Makefile.cmake? Should be in your binary

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
James Bigler wrote: On Wed, Apr 8, 2009 at 1:41 PM, Jeremy Cowgar wrote: Bill Hoffman wrote: I like this solution as well, as you don't have to be running cmake from cmake. It does mean that you have to be able to run the parser at first cmake time. Ok, I have

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
Bill Hoffman wrote: I like this solution as well, as you don't have to be running cmake from cmake. It does mean that you have to be able to run the parser at first cmake time. Ok, I have this implemented now, however, it seems that the checks for IS_NEWER and the execute_command does not r

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
Bill Hoffman wrote: One more option would be to run the parser every time cmake is run. If you had an option to the parser that just spit out the list of files you needed to compile, and it ran relatively fast, you could do this: # only run if parser.e is newer than source.cmake if(parser.e

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
Bill Hoffman wrote: So, you create a custom command that runs your parser and creates a full CMakeLists.txt file to build the output of the parser. Then run ctest --build-and-test on that directory to build the parser output. What is the output of the parser? Is it a program or a library, o

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
James Bigler wrote: By including progname.mak during configure, you tell CMake to reconfigure whenever that file changes. If a user changes parser.e, you will generate all your sources, plus the source list. Running cmake again will cause you to reconfigure. I was hoping to not have to run

Re: [CMake] Generating Source Files

2009-04-08 Thread Jeremy Cowgar
Jeremy Cowgar wrote: Bill Hoffman wrote: Jeremy Cowgar wrote: I am confused on how that would help me. The ADD_CUSTOM_COMMAND generates many source files, and it has dependencies, so it does not have to generate source files many times, but sometimes it does. When it does, I need the FILE

Re: [CMake] Generating Source Files

2009-04-04 Thread Jeremy Cowgar
Bill Hoffman wrote: Jeremy Cowgar wrote: I am confused on how that would help me. The ADD_CUSTOM_COMMAND generates many source files, and it has dependencies, so it does not have to generate source files many times, but sometimes it does. When it does, I need the FILE( GLOB .. ) to execute

Re: [CMake] Generating Source Files

2009-04-04 Thread Jeremy Cowgar
I am confused on how that would help me. The ADD_CUSTOM_COMMAND generates many source files, and it has dependencies, so it does not have to generate source files many times, but sometimes it does. When it does, I need the FILE( GLOB .. ) to execute after that custom command is run so that the

Re: [CMake] Generating Source Files

2009-04-04 Thread Jeremy Cowgar
Can I trigger the FILE( GLOB .. ) to run right before the executable is built? Or cause the ADD_CUSTOM_COMMAND to execute the FILE( GLOB ... ) after it's done? This has to be able to be solved somehow... Jeremy Jeremy Cowgar wrote: Hello, I use CMake with quite a few simple pro

Re: [CMake] Generating Source Files

2009-04-03 Thread Jeremy Cowgar
Tyler Roscoe wrote: On Fri, Apr 03, 2009 at 03:48:54PM -0400, Jeremy Cowgar wrote: The problem with this is, it seems that FILE( GLOB .. ) is running before the custom command, thus, the first time I try to build, I get all sorts of linking problems because EU_INTERPRETER_SOURCES is empty

[CMake] Generating Source Files

2009-04-03 Thread Jeremy Cowgar
and things link properly. How can I handle this situation? Thank you, Jeremy Cowgar ___ 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 chec