Re: [CMake] cmake + ninja how to use several CPU cores?

2019-07-29 Thread Dave Milter
On Mon, Jul 29, 2019 at 10:32 PM Brad King wrote: > > Even if we had that information we don't know what `main.cpp` includes > until after compiling it, by which point it is too late. It could have > `#include "anything.txt"` for example. CMake must add these pessimistic > dependencies to

Re: [CMake] cmake + ninja how to use several CPU cores?

2019-07-29 Thread Dave Milter
On Mon, Jul 29, 2019 at 8:24 PM Brad King wrote: > > CMake 3.9 made this much better than it used to be: > > https://gitlab.kitware.com/cmake/cmake/merge_requests/430 > > Since then all objects in a target can start compiling independently > so long as that target does not depend on any targets

Re: [CMake] cmake + ninja how to use several CPU cores?

2019-07-29 Thread Dave Milter
On Mon, Jul 29, 2019 at 1:48 PM Bruce Stephens wrote: > > I think it's reasonable for CMake/Ninja to require the headers be > generated, especially since main.cpp does include one of them (though > CMake/Ninja doesn't know that until later). lib/lib1.cpp is more > arguable, but I imagine there's

Re: [CMake] cmake + ninja how to use several CPU cores?

2019-07-28 Thread Dave Milter
Hi, On Mon, Jul 29, 2019 at 12:01 AM Alan W. Irwin wrote: > > On 2019-07-28 19:03+0300 Dave Milter wrote: > > To help answer your question, I see no fundamental issues with your code > above. > > If the latter is really true, that appears to me to be a CMake bug >

[CMake] cmake + ninja how to use several CPU cores?

2019-07-28 Thread Dave Milter
Hi, I heard that ninja has great feature it allows build continue without wainting full link. So if you have library Lib and executable App, source code of App may build in parallel with source code of Lib, and sync only link stage. While other build systems force build of Lib, and only then

Re: [CMake] coding style for modules

2018-01-05 Thread Dave Milter
On Fri, Jan 5, 2018 at 12:09 AM, Alexander Neundorf wrote:> >> b)Include this project as git submodule and use ExternalProject to >> invoke `cmake` and `cmake --build` > > This would be a clean solution if you want to build libfoo as part of yur > project. > Thank you

[CMake] coding style for modules

2018-01-03 Thread Dave Milter
Hello, If there is some libfoo that I want to use in my project, and this libfoo has it's own CMakeLists.txt I have 3 options to deal with such external dependency: a) Treat it like every other external dependency and write cmake code like FindLibFoo.cmake to find libfoo on file system.

[CMake] crosscompiling: what happened after change cmakelists.txt?

2011-01-12 Thread Dave Milter
Hi, when I run cmake like this: cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-sdk-gcc.cmake -DMY_TOOLCHAIN_PATH=$HOME/toolchains/sdk/ path/to/CMakeLists.txt with toolchain-sdk-gcc.cmake: SET(CMAKE_SYSTEM_NAME Linux) SET(CMAKE_SYSTEM_VERSION 1) SET(QT_QMAKE_EXECUTABLE ${MY_TOOLCHAIN_PATH}/bin/qmake)

[CMake] PROPERTIES RUNTIME_OUTPUT_DIRECTORY

2008-09-04 Thread Dave Milter
Hello. Recently I want to place all my exe files to one directory in build tree, so I used: SET(COMMON_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) SET_TARGET_PROPERTIES(myapp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${COMMON_RUNTIME_OUTPUT_DIRECTORY}) this works fine on my linux

[CMake] status of cmake add_test in current cvs?

2008-07-30 Thread Dave Milter
During build some executable testA was created, later it was added to list of tests via ADD_TEST. When I used last stable cmake with VS, I have to alawys use hacks like: GET_TARGET_PROPERTY(test_app_path test_app LOCATION) STRING(REGEX REPLACE \\$\\(.*\\) \${CTEST_CONFIGURATION_TYPE}

[CMake] ctest: how to skip tests?

2008-07-02 Thread Dave Milter
Hi. I have project with usage of cmake and ctest. Now I need to add tests, that may have sense or not have sense to run on certain machine. For example, if we have installed MySql and libmysql there is sense to test part of code working with mysql, but no sense to check parts that working with

Re: [CMake] ctest: how to skip tests?

2008-07-02 Thread Dave Milter
On 7/2/08, Andreas Schneider [EMAIL PROTECTED] wrote: Dave Milter wrote: I have project with usage of cmake and ctest. Now I need to add tests, that may have sense or not have sense to run on certain machine. For example, if we have installed MySql and libmysql there is sense

[CMake] build type per target?

2008-06-15 Thread Dave Milter
In my project I have plugin for qt designer, it should be build in release mode, because of in other case qt designer will not load and use it. From other hand I need this code as static library, and use build type the same as my main application uses. So it looks like add_library(some_name

[CMake] get things back: add_definitions

2008-06-11 Thread Dave Milter
Hello. I try to turn on usage of precompiled headers in my project on linux, I grab PCHSupport_26.cmake from http://public.kitware.com/Bug/view.php?id=1260 here, and take precompile example from qt: examples/qmake/precompile. I create CMakeLists.txt like this: ADD_EXECUTABLE(precompile ...

Re: [CMake] add_custom_command: regenerate all on modifcation?

2008-06-03 Thread Dave Milter
On 6/3/08, Brad King [EMAIL PROTECTED] wrote: Bill Hoffman wrote: Dave Milter wrote: cmake version 2.4-patch 8 and it not regenerates ui_foo.hpp after uncomment foo2.cpp, so it is regression, or previous (good for me behaviour) cause many bugs? It is not a bug. It was a bug fix. If you

Re: [CMake] add_custom_command: regenerate all on modifcation?

2008-06-03 Thread Dave Milter
On 6/3/08, Brad King [EMAIL PROTECTED] wrote: Dave Milter wrote: On 6/3/08, Brad King [EMAIL PROTECTED] wrote: If you can please try CMake HEAD from CVS to make sure it solves your problem. We'll include the fix in a 2.6 patch release. I tried, not sure how to see global

Re: [CMake] add_custom_command: regenerate all on modifcation?

2008-06-02 Thread Dave Milter
Recently I try not cvs version with examples that I sent with previous email: $ cmake --version cmake version 2.4-patch 8 and it not regenerates ui_foo.hpp after uncomment foo2.cpp, so it is regression, or previous (good for me behaviour) cause many bugs?

Re: [CMake] add_custom_command: regenerate all on modifcation?

2008-06-01 Thread Dave Milter
On 6/1/08, Bill Hoffman [EMAIL PROTECTED] wrote: Dave Milter wrote: \ I look at generated by cmake makefiles, and all generated files depend on CMakeLists.txt Please create a small example that shows your problem. I hope this mailing list accept attachments. Look

Re: [CMake] add_custom_command: regenerate all on modifcation?

2008-05-31 Thread Dave Milter
On 5/30/08, Alan W. Irwin [EMAIL PROTECTED] wrote: On 2008-05-30 12:50+0400 Dave Milter wrote: The problem become arris on big project. It used qt, and when I add new file, it regenerate all stuff, like moc files, ui_*.h files and so on, this lead to rebuild corresponding C++ files

Re: [CMake] add_custom_command: regenerate all on modifcation?

2008-05-31 Thread Dave Milter
On 6/1/08, Alan W. Irwin [EMAIL PROTECTED] wrote: On 2008-05-31 12:55+0400 Dave Milter wrote: Sorry, I completely not understand you, I don't see why I need test source file dependencies, I want test what I test: cmake files changes. In that case, my guess is CMake is taking

[CMake] add_custom_command: regenerate all on modifcation?

2008-05-30 Thread Dave Milter
The problem become arris on big project. It used qt, and when I add new file, it regenerate all stuff, like moc files, ui_*.h files and so on, this lead to rebuild corresponding C++ files, and this is too long for me, and I also do not see, why this should be so? So I create smple test project to

[CMake] percent of coverage

2008-03-29 Thread Dave Milter
Hello. I try to create simple project with cmake, and then using ctest to calculate test coverage. Project consists of foo.c foo.h main.c test_foo.c main application consists of foo and main, test consists of test_foo and foo. After I run: ctest -VV -D ExperimentalStart -D ExperimentalTest -D

[CMake] cross compiler flags

2007-11-19 Thread Dave Milter
Usually, I use such construction to set cmake flags: SET(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG} -Wall but when I use -DCMAKE_TOOLCHAIN_FILE option this construction for some reason does not work, actually, if I run make VERBOSE=1 compiler comand does not contain flags at all, except -c -o

Re: [CMake] cross compiler flags

2007-11-19 Thread Dave Milter
/07, Alexander Neundorf [EMAIL PROTECTED] wrote: On Monday 19 November 2007, Dave Milter wrote: Usually, I use such construction to set cmake flags: SET(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG} -Wall but when I use -DCMAKE_TOOLCHAIN_FILE option this construction for some reason does