We've been using CMake for a couple of years for C++ application
building. We effectively set up our CMake project structure once, and
mostly only change it to add new source files, etc.
Currently, all C++ source is checked out of our SVN repository into one
large tree. This tree actually contai
gt;
> Kris
>
>
>
> *From:* CMake [mailto:cmake-boun...@cmake.org] *On Behalf Of *Chris
> Johnson
> *Sent:* 27 December 2016 23:27
> *To:* cmake@cmake.org
> *Subject:* [CMake] Install destination problem
>
>
>
> In all of my CMakeLists.txt files,
In all of my CMakeLists.txt files, I include a settings file, like so:
include(global_settings.cmake)
Inside global_settings.cmake, I have a line like this:
set( CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install )
When I run "make install" on my development system, the files are correctly
instal
I find the implementation of the file() command? Could I
possibly customize that implementation?
Thanks much!
..chris
On Tue, Jun 9, 2015 at 2:00 PM, Bill Hoffman
wrote:
> On 6/9/2015 1:56 PM, Chris Johnson wrote:
>
>>
>> We do use a globally included set of CMake rules in all of our
About a year ago we converted our build system, which used a huge pile of
custom Makefile code, to use CMake. It has been working well for us.
But now, the boss (who dabbles at the command line) and a couple of the
developers are asking for a "feature" which went away with that
conversion. Namel
Ah, I found the problem. I had the output file listed in the custom
command's DEPEND clause.
Thank you very much for all the help!
On Fri, Jan 30, 2015 at 11:07 AM, Chris Johnson wrote:
> I'm trying to use the method outlined in your #2, with the list of files.
> But I get cir
ab the list of files, as J Decker
> suggests. The downside, as with any list of source files, is that CMake
> will not know that it needs to re-run when you simply add a new file which
> matches the glob. If you list the files explicitly, you have to edit the
> CMakeList to add the
add_library()
>
> Other commands modify the buildsystem (e.g. add_definitions(),
> target_link_libraries(), or setting properties such as COMPILE_OPTIONS),
> but they don't really add "commands" to it.
>
> Petr
>
>
> On Fri, Jan 30, 2015 at 3:27 PM, Chris Johnson
>
ll(),
> add_custom_command()).
>
> So there are no CMake commands executed after configure time. The value
> specified in a COMMAND argument of add_custom_command() executes at build
> time (driven by the build system), but the add_custom_command() itself
> executes at CMake time.
>
&g
> COMMAND myprog ${file}.in ${file}.out
>
> DEPENDS ${file}.in myprog.cpp
>
> )
>
> endforeach()
>
>
>
> For portability, you might want to use ‘${CMAKE_COMMAND} –E
> copy_if_different’ in place of ‘/bin/cp’ and CMAKE_CURRENT_BINARY_DIR
I am looking for suggestions on how to solve the following problem. I
need a solution which is easy to understand and safe from future
maintenance errors.
There is a project directory with one C++ program and a large number of
"input" data files.
The C++ program needs to be compiled, and then r
A common and useful method for avoiding name conflicts and keeping files
well-organized is to place them in a subdirectory unique to the library.
For example, the libraries for Graphviz and Postgres often install their
API header files in directories named /include/graphviz and
/include/libpq. So
build tree out-of-source,
both compiles share the same CMakeCache.txt and CMakeFiles/*.
This is not a case of "parallel" makes (-j N) started from one directory.
Thanks,
..chris
On Wed, Dec 24, 2014 at 10:22 AM, Rolf Eike Beer wrote:
> Am Mittwoch, 24. Dezember 2014, 10:17:07 sch
One of my co-workers likes to start multiple makes in various parts of his
project source tree. Under our old Makefile-based, build-in-source system,
this worked fine. Under our new CMake-based, out-of-source build system,
this causes problems, since any make might cause CMake to rebuild its
inter
Has anyone out there used CMake to build a PHP Phar file, and more
interestingly, used CMake to install a PHP project which uses Composer for
dependency management?
If so, could you share some information about what your custom commands and
custom targets must look like to get this to work?
Thank
s checked before the
actual link.
On Tue, Dec 9, 2014 at 10:25 AM, Bill Hoffman
wrote:
> On 12/9/2014 9:45 AM, Chris Johnson wrote:
>
>> Well of course it had to not be all that simple. My first attempt to
>> create a simple (2 header files in library) example failed to fail in
&
take a while.
..chris
On Mon, Dec 8, 2014 at 8:06 PM, Bill Hoffman
wrote:
> On 12/8/2014 1:53 PM, Chris Johnson wrote:
>
>> When I change a header file for a library, and then do a "make" in the
>> build directory, only source (C++) files which directly include tha
Thanks for the reply and good advice, Alan. Will do.
..chris
On Mon, Dec 8, 2014 at 2:58 PM, Alan W. Irwin
wrote:
> On 2014-12-08 12:53-0600 Chris Johnson wrote:
>
> When I change a header file for a library, and then do a "make" in the
>> build directory, only
When I change a header file for a library, and then do a "make" in the
build directory, only source (C++) files which directly include that header
get rebuilt, but those which use it indirectly do not. But when I link to
the library, the other files do get rebuilt.
Example:
lib/mod.cpp
lib/mod2.
This looks like a bug to me. I have a very simple test case where
CMAKE_INSTALL_PREFIX is set correctly if I do so after the project()
statement, and fails to be set correctly if I do it before the project()
statement.
On Fri, Dec 5, 2014 at 2:06 PM, Chris Johnson wrote:
> Strangely, runn
it's in the cache so cmake-gui can edit it...
>
> (if project() does something with cmake_isnstall_prefix might also be a
> bug)
>
> On Thu, Dec 4, 2014 at 7:27 PM, Chris Johnson wrote:
>
>> I have a global include file used by all of the CMakeLists.txt files in
>> my proje
I have a global include file used by all of the CMakeLists.txt files in my
project. In it, I set the value of CMAKE_INSTALL_PREFIX, as well as a
number of other variables and functions.
In my CMakeLists.txt file, I had this:
cmake_minimum_require(VERSION 2.8.4)
include(global.inc)
project(whateve
aving to jump through hoops to support that paradigm is kind of strange.
Thanks,
..chris
On Wed, Dec 3, 2014 at 10:56 AM, Bill Hoffman
wrote:
> On 12/2/2014 5:19 PM, Chris Johnson wrote:
>
>> The target_link_libraries() directive is adequate for this job when the
>> header file
ars to automatically add the necessary source directories of the
mentioned libraries to the include paths.
On Tue, Dec 2, 2014 at 4:00 PM, Chris Johnson wrote:
> Yes, by adding another directory between my top-level ./src/ directory and
> ./mylib, I can cause the example to fail.
rams which depend upon
them?
On Tue, Dec 2, 2014 at 3:53 PM, Chris Johnson wrote:
> Well, this fixed my example. But my real project still fails the same
> way. It is, of course, much more complex and the library directories are
> often several layers down in subdirectory trees. :-(
>
&g
Well, this fixed my example. But my real project still fails the same
way. It is, of course, much more complex and the library directories are
often several layers down in subdirectory trees. :-(
On Tue, Dec 2, 2014 at 2:05 PM, Chris Johnson wrote:
> I'm using Make as my build tool.
l source is not part of the default include
path, correct?
Thanks,
..chris
On Tue, Dec 2, 2014 at 1:10 PM, Bill Hoffman
wrote:
> On 12/2/2014 1:04 PM, Chris Johnson wrote:
>
>> Adding this directive does not seem to change the results at all,
>> actually. Am I missing somethin
Adding this directive does not seem to change the results at all,
actually. Am I missing something?
Thanks,
..chris
On Tue, Dec 2, 2014 at 11:33 AM, Bill Hoffman
wrote:
> This should work:
>
> include_directories(${CMAKE_SOURCE_DIR}/src)
>
>
--
Powered by www.kitware.com
Please keep messag
Just for completeness.
File prog/prog.cpp:
#include "mylib/myfunc.h"
int
main(int argc, char** argv)
{
return myfunc();
}
File mylib/myfunc.h:
int myfunc();
And file mylib/myfunc.cpp:
#include "myfunc.h"
int
myfunc()
{
return 1;
}
--
Powered by www.kitware.com
Please keep messages on
Ah, and I royally typo'd:
prog.cpp includes the header via:
#include "mylib/myfunc.h"
(not just "myfunc.h")
On Tue, Dec 2, 2014 at 11:01 AM, Chris Johnson wrote:
> Background: I'm converting an existing project from a custom build
> process which uses BS
Background: I'm converting an existing project from a custom build process
which uses BSD Make to CMake. The source for the project is contained in
about 600 directories, and has about a dozen libraries and maybe a hundred
executables. The old build system (make) has to continue working until th
:30 PM, Stephen Kelly wrote:
> Chris Johnson wrote:
>
> > * I do not want to use the add_library(component1 OBJECT
> > ${component1_sources}) and add_library(toplevel
> > $ ... ) syntax if it can be avoided.
>
> Is the constraint that you want a top-level somethi
ax +49 6151 155-139
>
> johannes.mueller-roe...@igd.fraunhofer.de | www.igd.fraunhofer.de
>
>
>
> *From:* Mueller-Roemer, Johannes Sebastian
> *Sent:* Wednesday, November 26, 2014 13:50
> *To:* 'Chris Johnson'; cmake@cmake.org
> *Subject:* RE: [CMake] Creating a libr
This CMake wiki page (
http://www.cmake.org/Wiki/CMake/Tutorials/Object_Library) claims one can
create a library from subdirectories containing libraries, which is exactly
what I want to do. However, it doesn't seem to work. Here's my SSCCE (
http://sscce.org) "toy" example file structure:
.
|--
34 matches
Mail list logo