Benjamin,
> Thank you for your quick answer. I had a quick glance - what I don't
> quite understand is how can I integrate this into my custom cmake
> script? I have a ADD_CUSTOM_COMMAND, and in the depends I need this list
> of dependent files (the generated files, not the xsd's themselves).
>
>
Is it possible to call variable macro names from within another macro? The
following is a simple (non-working) example of what I would like to do:
macro (do_something callback)
# Call the callback macro and pass a message argument
${callback}("Hello world
Kerry,
On Tuesday 14 April 2009 06:37:28 Kerry Bonin wrote:
> Short version: Is there a simple way to generate multiple separate
> installers from within one CMake project?
The short answer is that it is possible, but perhaps it is not "simple". This
task does take some digging into CPack, and
Brad,
On Wednesday 25 March 2009 07:38:41 Brad King wrote:
> Thanks for the example. There were two bugs canceling each other out for
> this use case. One was fixed in 2.6.3 which exposed the other. I've
> committed a fix and a test (the full commit log explains everything).
>
> I'll schedule t
My build system relies heavily on CMAKE_CURRENT_LIST_FILE. For instance, I
typically get a variable for the directory containing the current list file
as follows:
get_filename_component(scriptDir ${CMAKE_CURRENT_LIST_FILE} PATH)
This has worked in prior versions of CMake; however, it does not
James,
> Is it possible to have a script run after the STGZ install?
>
> I want to run install_name_tool on a mac after some libraries are installed
> in order to encode the installed path into the library names.
>
> I'll need to be able to pass the installation directory to the script.
You can c
On Wednesday 26 November 2008 10:25:28 Robert Dailey wrote:
> Well I could probably define _UNICODE on the command line, right? But if I
> do this it doesn't exactly undefine _MBCS does it?
I define _UNICODE and UNICODE via "add_definitions". As far as I can tell,
Visual Studio picks up these se
> Is there a way to disable running the preinstall target while running
> CPack?
>
> Unfortunately, the preinstall target takes a significant amount of time
> (very large project), and it gets run for each component when selecting
> specific components for packaging. In the case of my very large p
Is there a way to disable running the preinstall target while running CPack?
Unfortunately, the preinstall target takes a significant amount of time (very
large project), and it gets run for each component when selecting specific
components for packaging. In the case of my very large project co
My project has hundreds of individual install components. The various
components are needed for my CPack scripts; however most (all but 1)
components should not be installed as part of a normal "make install".
Unfortunately, "make install" installs all of the components.
Ideally, I would like
SirAnn,
Instead of add_definitions, you can simply append the desired flags to the
compiler flags for the specific configuration. For example:
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}
-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE")
In the case of _SCL_SECURE_NO_WARNINGS
Bill,
On Friday 23 May 2008 09:27:54 Bill Hoffman wrote:
> But that would only work if they are using the IDE, nmake and make
> builds would still not work. Another approach is to use a forwarding
> executable. Have a wrapper program that sets PATH as needed to run
> things, and then execs the p
David,
On Friday 23 May 2008 09:14:11 David Cole wrote:
> If you want to write reg values with cmake, you can execute cmake as a
> sub-process with -E command line args (for example, using
> EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} in your CMakeLists.txt file)
>
> Use the write_regv -E sub-co
Bill,
On Friday 23 May 2008 06:14:27 Bill Hoffman wrote:
> So, there is not much CMake can do for you. The only thing you can do
> on windows is make sure that .exe and .dll files are all in the same
> directory. Windows always looks first in the directory of the .exe for
> any .dll files it nee
Arjen,
On Thursday 22 May 2008 23:35:33 Arjen Markus wrote:
> Having CMake set the necessary registry entries would not help with
> binary distributions of your product. I do not whether that is relevant
> to you, but in general that would be a problem:
> - Your clients may have the libraries inst
HS,
On Thursday 22 May 2008 02:05:33 Hendrik Sattler wrote:
> KSpam schrieb:
> > Using this add-in would require that I create a corresponding .slnenv
> > file for each .sln file generated by CMake. In my case, the contents of
> > the .slnenv files can be the same (I
I have been searching for a convenient way to deal with PATH on Windows. Here
are my requirements:
1) Multiple third party libraries, each with their own unique dll directory
(i.e. no shared directory to dump dlls in)
2) Third party library locations can change (i.e. I want to upgrade lib FOO t
LeRetha,
I think you want to use the "-G" option with the cmake console application. I
am on Linux right now, so I do not know the exact name of the generator, but
it is likely "Visual Studio 8 2005 Win64". In other words, run the following
command from your desired build directory:
cmake -G
Eric,
On Friday 25 April 2008 11:27:54 Eric Torstenson wrote:
> So, I take it that this isn't possible? Is there a way to make a feature
> request?
What you are asking for is already possible, and very easy to accomplish in
CMake. Consider the following directory structure:
build/
linu
On Wednesday 02 April 2008 10:20:18 Bill Hoffman wrote:
> However, there are some variables that can help with this.
>
> CMAKE_BUILD_TYPE is only used by makefile generators and is the specific
> build for that tree.
>
> CMAKE_CONFIGURATION_TYPES is set to the list of active configurations
> (Debug
Bill.
On Thursday 27 March 2008 13:11:12 Bill Hoffman wrote:
> If you use the project command in each sub project cmake 2.6 will do the
> right thing and create sub-solutions that include all targets that they
> use in the larger project.
That's great news! I am looking forward to 2.6.
Thanks,
My company is using CMake to build a large number of projects (~300). The
developers have complaints regarding the size (and load-time, etc) of the
top-level solution file. I am attempting to address their concerns.
Take this hypothetical project hierarchy:
module-1/
sub-module-1/
On Wednesday 28 November 2007 15:25:33 Jesse Corrington wrote:
> Is it possible to add an option to the GUI that has a drop down list for
> choices. I didn't see anyway to do this with the OPTION command.
I agree that this would be a very nice feature to have! For instance, it
would be great to
Salvatore,
It sounds like your static libraries were meant strictly as "convenience"
libraries (i.e. libraries that are only used internal to the build system to
make building other libraries easier). In CMake, it is much easier to not
use convenience libraries. Instead, just add all of the s
Brandon,
> > Of course, if we could get braces into the mix, it would reduce to:
> >
> > variable_scope(scratch_preamble got_match not_trail empty)
> > {
> > # [...]
> > # my actual code, blah blah blah
> > # [...]
> > }
>
> W
Brandon,
You missed the part where Bill mentioned that variable_scope would take
multiple arguments. Your example:
> variable_scope_begin(scratch_preamble)
> variable_scope_begin(got_match)
> variable_scope_begin(not_trail)
> variable_scope_begin(empty)
> # [...]
> # my actual code, blah blah b
Bill,
> set(a "world")
> variable_scope_begin(a)
> set(a "hello")
> message(${a})
> variable_scope_end(a)
> message(${a})
This would be a workable solution for me. It would certainly be a step in the
right direction, especially if it is easy enough to implement. I was into
PERL years ago, so
Ken,
> But to the question at hand...adding scope to variables. Variables have
> scope right now of
>
> 1) the CMakeListfile they are defined in
> 2) any included files that are included after the variable is set
> 3) and subdirectories of the directory they were defined in and processed
> after t
On Friday 02 November 2007 09:54:51 Brandon Van Every wrote:
> Is it feasible to modify the CMake language to have lexical scoping?
I agree. The lack of variable scoping is currently my biggest annoyance with
custom macros. Additionally, I believe that custom macros are pretty much
required fo
Jesper,
On Thursday 01 November 2007 02:51:59 Jesper Eskilson wrote:
> As I said in a previous post, the project files are being reloaded, but
> not until *after* the build is complete. (Unless Visual Studio silently
> reloads projects during a building, but I seriously doubt that.)
If you run th
On Wednesday 31 October 2007 13:37:04 Jesper Eskilson wrote:
> Ouch. My cmake files are unreadable enough without an added 3 lines here
> and there checking if the cache entry needs to be replaced or not.
A custom macro or two could clean the files up quite nicely.
> BTW: Are there any plans of f
Joe,
You will receive a solution file in any directory that contains a PROJECT
command. Additionally, the solution file will contain all of the subprojects
in it. In your example, I would add PROJECT(MyTestProject) to
Test/CMakeLists.txt, and I would add PROJECT(Library) to
Test/Library/CMak
Mark,
What do you have CMAKE_INSTALL_PREFIX set to? My guess is that it defaults
to "C:\Program Files\${PROJECT_NAME}". I do not develop on Windows, so I
cannot say for sure. CMAKE_INSTALL_PREFIX is used to prefix the DESTINATION
unless DESTINATION is specified as a full path. Alternately,
Mark,
The build location for libraries can be configured with LIBRARY_OUTPUT_PATH,
and the build location for executables can be configured with
EXECUTABLE_OUTPUT_PATH. I use the following lines in my projects:
SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
SET(LIBRARY_OUTPUT_PATH "${CM
Bill,
Thanks for the clarification. This will simplify my build system a great
deal!
Justin
On Thursday 18 October 2007 12:23:49 Bill Hoffman wrote:
> The example is this:
> add_library(libB)
> add_library(libA)
> target_link_libraries(libA libB)
> add_executable(excC)
> target_link_librareis(
Bill,
> Yes, where you create libA, you add this:
>
> target_link_libraries(libA libB)
>
> CMake will automatically chain.
Has this feature recently changed? I thought that
adding "target_link_libraries(libA libB)" would explicitly link libB to libA.
Often when I am static linking, I do not w
This was an annoyance I had with Visual Studio as well, and I was able to work
around it fairly easily. I have CMAKE_CONFIGURATION_TYPES set when I am
building in Visual Studio. I expect that this would be similar for Xcode.
All I do is prepend "../" to the output name, and I set the OUTPUT_N
Joe,
Although I cannot help you with your specific question, I can tell you how I
have accomplished multiple builds in a single out-of-source tree. This same
process should translate to an in-source tree as well.
I create a build directory in the top-level of my project. To build, I use
the
Robert,
I used to have the same problem until I restructured my project. The trick is
NOT to list source files in the top-level CMakeLists.txt file.
For example, this will give you a list of intermediate targets (.o .i .s) in
the help:
#---
# Top-level CMakeLists.txt
#
ea? Make
> > will see the file and think that the target "test" is up to date.
> >
> > A proper gnu makefile would mark the test target as phony. Looking at
> > the gnu makefile generated by one of my projects, test is not marked as
> > phony.
> >
> >
I have a strange problem using CTest with Makefiles. If I run "make test",
ctest is never called. If I change the name of the target in the Makefile
from "test" to "test2" and run "make test2", then ctest is called properly.
After changing the target name, "make test" is still recognized as a
Brandon,
I will be happy to see your submission come to fruition. If and until that
happens, it is nice to have another option.
Justin
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake
Brandon,
Calm down. I found Juan's documentation quite useful.
What is the point of having a Wiki if not to document such things? Anyone can
figure out basic CMake usage from CMake docs. This is beyond the scope of
CMake docs; therefore, it belongs on the Wiki.
For the record, my projects b
Juan,
I find that very useful. Thanks!
Justin
On Thursday 13 September 2007 12:44:07 Juan Sanchez wrote:
> Here is my update to the FAQ:
>
> http://www.cmake.org/Wiki/CMake_FAQ#That_means_I_have_to_build_all_my_libra
>ry_objects_twice.2C_once_for_shared_and_once_for_static.__I_don.27t_like_tha
Matthieu,
Thanks for the info! I will forward this off to the Windows guys and ask them
to try it out. I am on vacation for the remainder of the week, so I will let
the list know how this fairs when I return.
Justin
On Wednesday 29 August 2007 01:14:20 Mathieu Malaterre wrote:
> I do not hav
tty sure that this is a Visual Studio issue.
> I agree that it is a pain but I think the solution outlined below is the
> only one.
>
> On 8/29/07, KSpam <[EMAIL PROTECTED]> wrote:
> > One major annoyance that users have with CMake integration in
> > VisualStudio is
> &
One major annoyance that users have with CMake integration in VisualStudio is
having to click "Yes" to reload the project files after CMake regenerates
them. There is no "Yes to All" option. With hundreds of projects, it takes
a while to click all of the "Yes" buttons.
Does anyone know if the
47 matches
Mail list logo