to use this with ExternalProject_Add - I want
CMake to automatically download and update the git repository and try
to rebuild it again when there are changes, if possible.
What would be the best way to go about doing this? I am using CMake 3.4.0
Thanks,
Nicholas Braden
--
Powered by www.kitware.com
Have you tried installing the required parts locally (e.g. in your
home directory) and just telling CMake to look there instead of the
default system locations?
On Sun, Nov 15, 2015 at 9:52 AM, Cedric Doucet wrote:
>
> Thank you Gregor!
>
> As I feared, this solution does
Instead of using FOO_INCLUDE_DIR, I believe you should use
target_include_directories() with the INTERFACE or PUBLIC options -
this will export the include directories properly and they will be
used when someone target_link_library()s your exported target.
What's the word "clone" doing in there? That should be a URL, not
command parameters.
On Tue, Dec 15, 2015 at 2:01 AM, Owen Hogarth II wrote:
> I have been reading this:
> https://cmake.org/cmake/help/v3.0/module/ExternalProject.html
>
> trying to add sdl external project
gt; the end of the cmakelists.txt files
>
> TARGET_INCLUDE_DIRECTORIES(mylib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/headers)
>
> so that I can just #include "mylib" instead of the path to the file. With
> this setup, I can't do target_include_directories from the
> external_pro
Although not ideal, you could alias the targets to the names they
would have when imported with find_package() by using
add_library(ALIAS), and then use if(TARGET) to conditionally call
find_package(). This also is a step toward supporting using the
library via add_subdirectory(), if that ever
CMP0063 was not added until CMake 3.3, so requesting 3.1 as the
minimum does not make sense.
https://cmake.org/cmake/help/latest/policy/CMP0063.html
On Sat, Jun 18, 2016 at 6:03 AM, Alexander Shukaev
wrote:
> On 06/18/2016 12:18 PM, Nils Gladitz wrote:
>>
>> On
Are you trying to use an existing CMakeLists.txt, or are you trying to
create your own? CMake doesn't just work on source files alone.
On Wed, Jun 22, 2016 at 7:30 PM, Crest Christopher
wrote:
> Hi, I'm hoping I can get some help on how to compile a repository from
>
> which file you have downloaded or project you want to compile?
>
> I think this would make it much easier for readers to help.
>
> Best regards,
>
> Martin
>
> Nicholas Braden
> Wednesday, June 22, 2016 8:50 PM
> Are you trying to use an existing CMakeLists.txt,
s missing dependencies ?
>
> Nicholas Braden
> Thursday, June 23, 2016 1:08 AM
> It looks like the instructions are there in the README. I tried
> building on my system but I'm missing some dependencies (e.g. at some
> point it finds my Python 3 installation and tries to run some code b
If Project B depends on Project A, you should probably be using the
ExternalProject module with a superproject structure that builds both
projects in the proper order.
https://cmake.org/cmake/help/latest/module/ExternalProject.html
Trying to manually call CMake is not really a good idea IMO -
it compiled ?
>
> Nicholas Braden
> Thursday, June 23, 2016 1:15 AM
> Yes, many projects do not include their dependencies and require you
> to obtain them yourself. In this case it looks like you need the
> Python sipconfig module installed.
>
> On Thu, Jun 23, 2016 at 12:10 AM,
This was asked recently - have a look at the CXX_EXTENSIONS property:
https://cmake.org/cmake/help/latest/prop_tgt/CXX_EXTENSIONS.html
Previous discussion:
http://public.kitware.com/pipermail/cmake/2016-June/063691.html
On Thu, Jun 23, 2016 at 7:27 AM, James Swift wrote:
>
Doesn't biicode already fill this role? Biicode seems to work well
enough for me, anyway.
On Mon, Jan 11, 2016 at 5:42 AM, Cristian Adam wrote:
> Ruslan Baratov via CMake writes:
>
>>
>> Hi,
>>
>> I'm developing a project that is a kind of wrapper of
>>
com> wrote:
> On Mon, Jan 11, 2016 at 2:33 PM, Nicholas Braden
> <nicholas11bra...@gmail.com> wrote:
>>
>> Doesn't biicode already fill this role? Biicode seems to work well
>> enough for me, anyway.
>>
>
> Biicode is dead.
>
> There is a compariso
Why would you like to have names other than origin? I am struggling to
think of a use case for this, seeing as you never directly interact
with the cloned repository. I don't even think it's safe to assume
that a git repository is involved at all, for all you know it could be
changed to just
I often find it more convenient to call add_library() and
add_executable() first, apply properties to them etc., and then later
add the sources to them with target_sources() (usually in other CMake
files via add_subdirectory). Obviously, all my targets will eventually
have sources added.
However,
You will need to look at their building documentation to find how to
set those preferences when building with CMake.
On Sat, Feb 6, 2016 at 11:47 PM, vadtec wrote:
> I'm using ExternalProject to build external dependencies. curl provides a
> cmake build process, but I cannot
Have you tried setting the toolset? The -T parameter can set the
toolset. This sets the platform toolset property that you would
normally set in Visual Studio. if Visual Studio lets you select the
llvm platform toolset, so will CMake.
On Fri, Jan 29, 2016 at 12:04 PM, Yi-Hong Lyu
Yes, an existing build saves all the information it needs in the build
cache. Once you have created a build, you never need to specify the
source directory again.
On Thu, Feb 25, 2016 at 9:13 AM, Vania Joloboff wrote:
> Hi,
>
> The cmake documentation says there are two
I'm not sure how you would download a directory without it being in
some sort of archive. If you just want to use an existing directory,
use the SOURCE_DIR option instead.
On Fri, Feb 26, 2016 at 8:37 AM, Cedric Doucet wrote:
>
> Hello,
>
> I would like to know if it's
ers,
>
> Cédric
>
>
>
>
> - Mail original -
>> De: "Nicholas Braden" <nicholas11bra...@gmail.com>
>> À: "Cedric Doucet" <cedric.dou...@inria.fr>
>> Cc: cmake@cmake.org
>> Envoyé: Vendredi 26 Février 2016 15:56:02
>
http://www.iro.umontreal.ca/~lecuyer/myftp/streams00/c++/
> I know how to do it with FILE(DOWNLOAD ...) but I would like to know if there
> is a way to do it with ExternalProject_Add.
>
> Cédric
>
>
>
> - Mail original -
>> De: "Nicholas Braden&q
here is an undocumented option -B to do this ?
>
> Vania
>
>
> On 02/25/2016 04:16 PM, Nicholas Braden wrote:
>>
>> Yes, an existing build saves all the information it needs in the build
>> cache. Once you have created a build, you never need to specify the
>>
piler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> External - CMAKE_COMPILER_IS_GNUCXX: 1
> External - CMAKE_CXX_COMPILER_ID: GNU
> External - CMAKE_CXX_FLAGS: -march=native
> -- Configuring done
>
ExternalProject makes no assumptions about what is being built. It
could just be a collection of executables, or maybe nothing is built
at all. It is up to the project being built to provide facilities for
accessing its targets in a platform-independent way. For example, the
external project can
Where/how is that variable normally set? External projects have no
awareness of the project they are in, they just run CMake as usual the
same way you would. If the variable is normally set by CMake itself,
make sure that your containing project and the external project both
find the same
Have you tried using the PRIVATE keyword when linking to A?
https://cmake.org/cmake/help/latest/command/target_link_libraries.html#libraries-for-a-target-and-or-its-dependents
On Fri, Jan 22, 2016 at 9:14 AM, Jack Stalnaker wrote:
> Is there any way to exclude a dependency
Thank you for your suggestion Nicholas, I have never used
> ExternalProject_Add before and can't find a related example to my project.
> Would you know an example that uses it?
>
> On Tue, Mar 8, 2016 at 10:38 AM, Nicholas Braden <
> nicholas11bra...@gmail.com&g
hich I really want to be "independent" if the user
> wants.
>
> On Tue, Mar 8, 2016 at 5:13 PM, Nicholas Braden <
> nicholas11bra...@gmail.com> wrote:
>
>> Example simple usages from my personal projects:
>>
>> https://github.com/LB--/events/blob/499ba78b923b4
I'm not sure which discussion you're referring to, so forgive me if
this was already mentioned - but are you using a superproject to
ensure that dependencies are built and installed before your own
project? That is, all dependencies as well as your own project are
built via ExternalProject_Add and
Previously there was a discussion about only Chrome:
http://public.kitware.com/pipermail/cmake/2016-April/063192.html
Good to know Firefox is affected too. For now I don't think anyone
actually knows whether the file in question is truly dangerous or not,
so use at your own risk. From what I've
I've run into a bit of an issue with the find_package interface. Let's
say I want to use a library libsemver:
find_package(semver REQUIRED)
Now, I want my code to work even when libsemver releases new versions
with breaking API changes, and I happen to know they follow the
semantic versioning
Projects - maybe you
could get it to work that way, but it'd be ugly)
On Wed, Apr 6, 2016 at 6:28 AM, Eric Wing <ewmail...@gmail.com> wrote:
> On 4/4/16, Nicholas Braden <nicholas11bra...@gmail.com> wrote:
>> I haven't tested this myself, but instead of using a glob, you could
To solve the dependency order problem, generally you would make a
superbuild which builds your dependencies and also your own project
via ExternalProject, using the DEPENDS option to guarantee build
order. This way all your dependencies are fully built and installed
before it even gets to
The command line is the first point where variables can be defined
(all code runs after this), so I am not sure where you expect
pre-existing values to come from in order for a += or -= to make
sense. Could you give an example of when you would find them useful? I
think maybe I am not
Ah, I understand now - I have a habit of forgetting that you can
configure existing CMake builds by repeatedly invoking cmake. I don't
know if such a feature exists but it definitely sounds useful.
On Sat, Mar 19, 2016 at 12:03 PM, René J. V. <rjvber...@gmail.com> wrote:
> Nicholas Bra
Aron Bloom <sc...@towel42.com> wrote:
> Ok.. Do you have an example somewhere ?
>
> -Original Message-
> From: Nicholas Braden [mailto:nicholas11bra...@gmail.com]
> Sent: Wednesday, March 23, 2016 6:11 PM
> To: Scott Aron Bloom
> Cc: Alan W. Irwin; cmake@cmake.org
Both projects should be built via ExternalProject within a
superproject, this way you can use the DEPENDS arguments to guarantee
build order.
On Wed, Mar 23, 2016 at 8:08 PM, Scott Aron Bloom wrote:
> Do you have apointer to an example of using the external_project.
>
> I have
Jakob, I don't think there is any confusion about what REQUIRED means.
Whether or not REQUIRED is provided, the list of OPTIONAL_COMPONENTS
should not be required under any circumstances. The example error
message seems pretty clear to me that the expected behavior and actual
behavior are
IIRC, the project() command can be called once per directory. So you
can have each directory be a separate project via add_subdirectory().
I just tried it out and it seems to create a solution (*.sln) for each
project().
I can't answer the other questions, sorry.
On Tue, Mar 8, 2016 at 10:03
Have you looked into ExternalProject_Add? It allows just using a local path
instead of downloading a remote repository:
https://cmake.org/cmake/help/latest/module/ExternalProject.html
On Tue, Mar 8, 2016 at 12:12 PM, Muhammad Osama wrote:
> Hi Jan,
>
> Thank you for your
If you are using the add_subdirectory approach, I believe you should
not be using find_package and instead you just need to use
target_link_libraries to have everything handled for you. Another
approach would be making a superproject that builds your dependencies
and your own project via
I haven't tested this myself, but instead of using a glob, you could
have a build step that generates a CMake script file with the list of
generated files in it (e.g. via execute_process to run another CMake
script whose only job is to generate the CMake script inception-style)
and just include
If the new C++ components are built optionally, I would use
enable_language(CXX):
https://cmake.org/cmake/help/latest/command/enable_language.html
Otherwise, if the project will always need C++ support from now on,
amend the project() statement. In this case it doesn't matter whether
you add CXX
I found several different versions of basically the same code in many
projects, but it looks like openbabel is what you are trying to
compile:
https://github.com/baoilleach/openbabel-svn-mirror/blob/master/cmake/modules/MacroEnsureVersion.cmake
Do you have this file in /cmake/modules/ ?
It looks
I don't think CMake can yet detect features of the standard library
implementation, only features of the language. One compiler may
support more features than another compiler which supports more of the
standard library, and in some cases the same compiler can support two
or more different
rt Mentzer
<stuart_ment...@objexx.com> wrote:
> On 7/21/2016 6:15 AM, Nicholas Braden wrote:
>>
>> I'm having a weird issue that is driving me crazy. I've attached a
>> minimal test case - it downloads and builds Freetype 2.6.4 as static
>> and then configures a pr
I noticed it is possible to create empty libraries like this:
add_library(header-only "header.hpp")
set_property(TARGET header-only PROPERTY LINKER_LANGUAGE CXX)
On my machine, MinGW spits out an empty 8-byte libheader-only.a, and
Visual Studio works too but outputs nothing. Is this even
>From what I understand, interface libraries just don't have sources or
build results. INTERFACE IMPORTED would then mean there is no compiled
binary to be linked against, just as INTERFACE alone means there are
no sources to create said binary from. At least, that is my
understanding.
> My
.. confusing? Based on the description of what an
> /imported target/ is, I would think that it is the same thing that
> add_library(foo <STATIC|SHARED> IMPORTED) produces?
>
>
>
> On Tue, Jul 5, 2016 at 4:09 PM, Nicholas Braden <nicholas11bra...@gmail.com>
> wrote:
>
If find_project is not enough, and ExternalProject's only problem is
build duplication, then I think it makes sense to consider a
CMake-based dependency manager such as hunter:
https://github.com/ruslo/hunter
On Thu, Jun 30, 2016 at 3:59 AM, Sven Baars wrote:
> This is a reply
Yes, the behavior is documented in several places, the most prominent
being here:
https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#transitive-usage-requirements
On Mon, Aug 15, 2016 at 9:22 PM, Ivan Shapovalov wrote:
> On 2016-08-15 at 21:46 -0400,
n Tue, Aug 16, 2016 at 7:44 PM, Ivan Shapovalov <inte...@intelfx.name> wrote:
> TBH, I do not see the "PRIVATE dependencies are made PUBLIC for the
> purposes of linking when the dependent is static library" there.
>
> --
> Ivan Shapovalov / intelfx /
>
>
> O
Usually there would be variables like A_ROOT which allow the
FindA.cmake module being used by B to correctly find everything. If
there isn't, you'd have to write your own FindA.cmake module in either
case. If you can't modify B, you could use the patch step of the
external project to replace the
Yes, that is what I do in my superbuilds. Generally I make is such that my
project could be built without the superbuild, and the superbuild is just a
convenience.
On Sat, Jan 21, 2017 at 12:17 PM, Saad Khattak wrote:
> >> One possibility is the often mentioned superbuild
You'll also want to build your own project with ExternalProject, and use
the DEPENDS option to control build order. This ensures that all
dependencies are fully installed before your own project is even
configured. The project with all the ExternalProject calls is typically
called a superbuild,
5 PM, Ivan Shapovalov <inte...@intelfx.name>
> wrote:
>>
>> On 2016-08-17 at 05:19 -0500, Nicholas Braden wrote:
>> > Huh, this is weird. It seems to be an issue with the export/import
>> > mechanism. If you make a project where everything is in the same
>&
Have you tried set_property(TARGET cpp-netlib_pic PROPERTY
POSITION_INDEPENDENT_CODE ON)? I think you must specify the value ON
for it to work.
On Sun, Aug 28, 2016 at 4:28 PM, Steve Lorimer wrote:
> I'm trying to create a static library with -fPIC specified.
>
>
Are you sure about this UTF16 requirement? I have many projects
ranging from Visual Studio 2008 to 2015 that use .rc files and all of
them are ANSI/UTF8.
On Mon, Aug 29, 2016 at 2:43 AM, tonka tonka wrote:
> Hey,
>
> I have a little problem with files which has to be UTF 16
Have you tried changing the = to a space, as with the other parameters?
On Mon, Aug 29, 2016 at 10:52 AM, Michael Jackson
wrote:
> I have the following CMake file:
>
> set(QHull_GIT_REPO "git://github.com/qhull/qhull")
> set(QHull_GIT_TAG "")
> set(QHull_INSTALL_NAME
> --
> Michael A. Jackson
> BlueQuartz Software, LLC
> [e]: mike.jack...@bluequartz.net
>
>
> Nicholas Braden wrote:
>>
>> Have you tried changing the = to a space, as with the other parameters?
>>
>> On Mon, Aug 29, 2016 at 10:52 AM, Michael Jackson
>&
The way to solve this is to use a superbuild project layout - you use
ExternalProject_Add to build your dependencies AND your own project, using
the DEPENDS option to control build order. Thus by the time it gets around
to configuring your project, the dependencies have already been built and
63 matches
Mail list logo