Hi cmake-users,
I have the following setup:
CMAKE: 3.0.2
Visual Studio 2010
In one of my cmake files, I’m trying to create a preprocessor definition based
on the TARGET_FILE_DIR of a different target … so I’m trying this:
target_compile_definitions(my_target_B PUBLIC
ubdirectory (maybe public/) and calling
> `add_subdirectory(public)` from my top-level file?
> I've tried this a couple of ways, but so far haven't got it working.
> Am I on the right sort of approach, or have I wandered far from the beaten
> track?
> Thanks again for your help,
>
> On Jan 26, 2017, at 1:23 AM, David Jobet wrote:
>
> Hello,
>
> suppose I want to use protobuf and integrate it in my project with
> externalproject_add. (actually, I just have precompiled binaries and libs +
> header files, I don't have the full sources)
> Once the
> On Jan 24, 2017, at 11:22 PM, doug livesey wrote:
>
> Is there any way that I can make the files webpack compiles into dependencies
> for the Webpack task? So that any changes to those are picked up for
> recompilation?
> No worries if not, I just thought it would be
add_custom_command is the probably the right thing…but it needs to be triggered
by a dependency relationship. You will specify public/bundle.js as the OUTPUT
parameter of the add_custom_command and then some other target or install
command needs to have that file listed in its sources, and then
> On Jan 26, 2017, at 1:23 PM, Gonzalo Garramuño wrote:
>
> I currently own an Ubuntu Xenial 14.04.1 LTS box in which I do all my work.
> I distribute a binary image viewer. However, recently one of my users
> tried to run the viewer on a CentOS 7 distro and found out
> On Jan 26, 2017, at 1:45 PM, Gonzalo Garramuño <ggarr...@gmail.com> wrote:
>
>
>
> El 26/01/2017 a las 18:35, Michael Ellery escribió:
>> In what way is the stdlib incompatible? Does it have bugs, or is this more a
>> matter of cpp standard support?
> I
I think my initial reaction to installing a source (cxx) file is that you
should install a static library instead (.a) - which is basically what you are
suggesting. Just define a new static library target that includes the cxx file
and install it…should work fine. If there are headers needed to
This kinda’ sounds like you are doing an in-source build. Are you certain that
your currrent/working directory is different from your source tree root when
you run cmake? The typical way of doing this is just to make a subdirectory of
your source root:
mkdir my_build
cd my_build
cmake
that seems to refer to libevent and the linker is not finding it - so you
probably need to build/install that lib for your toolchain. It doesn’t look
like there is a standard finder module for libevent currently, but if there
were then find_package(LibEvent) would have likely alerted you when
> On Aug 25, 2016, at 9:58 AM, Moreland, Kenneth wrote:
>
> Does anyone know of a simple way to get CMake to time how long it takes to
> compile each target? As it stands now, when compiling a CMake-managed project
> a status is printed before each target is built. What I
I asked this question on SO and am repeating here with the hope someone knows
the answer:
http://stackoverflow.com/questions/40433573/how-can-i-specify-additional-arguments-for-use-with-cmake-cxx-clang-tidy-variabl
——
I'm trying to use make use of clang-tidy integration with cmake and I'd like
> On Nov 8, 2016, at 10:06 AM, Bill Hoffman <bill.hoff...@kitware.com> wrote:
>
> On 11/8/2016 11:20 AM, Michael Ellery wrote:
>> /usr/local/Cellar/cmake/3.6.2/bin/cmake -E __run_iwyu
>> --tidy="/usr/local/opt/llvm38/bin/clang-tidy-3.8;-checks=*
This is a complete stab in the dark, but I wonder if your clang (Xcode tools…)
needs reactivation. I know some people have reported that they’ve needed to
re-accept the license and/or reinstall the Xcode tools following the upgrade.
Again, this is just a wild guess.
> On Oct 19, 2016, at 2:44
> On Nov 16, 2016, at 2:32 PM, Nikita wrote:
>
> Indeed, specifying '-line-filter=[]' doesn't cause any troubles.
> Should I file a bug about this?
>
> Regards,
> Nikita
>
FWIW, I brought up the same issue a few weeks ago:
> On Nov 21, 2016, at 5:04 AM, Michael Jackson
> wrote:
>
> Is there a command or variable or a code snippet from someone that
> essentially has a list of all the "include_directories" that have been
> used/created in a given project? Or can I get a list of all
This might be helpful:
http://stackoverflow.com/questions/39481958/setting-cmake-install-prefix-from-cmakelists-txt-file/39485990#39485990
Also, FWIW, the generated makefile (if you are using the makefile generator)
supports DESTDIR which will get prepended to the CMAKE_INSTALL_PREFIX path
> On Mar 27, 2017, at 6:31 AM, Bruce Stephens
> wrote:
>
> I have a build with two or three tools that generate headers and
> source files. Getting the source files compiled is easy enough: when
> they're mentioned as source files (in add_library or add_executable)
> On Mar 22, 2017, at 2:07 PM, Hom Nath Gharti wrote:
>
> Dear all,
>
> I use PETSc in my package and I need to use the following line in my
> GNU Makefile:
>
> include ${PETSC_DIR}/lib/petsc/conf/variables
>
> What is the equivalent command for CMakeLists.txt for this?
> If I'm not missing something silly and all this is expected behaviour
> (as it appears to be) it's not a disaster. We can add
> a few explicit dependencies and get things to work. But maybe I'm
> missing something and this should work more
> smoothly.
>
>
> On Mon, Ma
It doesn’t look like that find module directly supports HINTS or PATHS, so you
can try setting CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH
(https://cmake.org/cmake/help/v3.7/variable/CMAKE_LIBRARY_PATH.html) before
calling the curl finder. I think you can add to those variables whatever paths
alf of Alex Chen
> <alex_c...@filemaker.com>
> Date: Friday, April 21, 2017 at 10:28 AM
> To: CMake <cmake@cmake.org>
> Subject: Re: [CMake] Overriding the include path, library path of OpenSSL,
> Zlib and libcurl
>
> Thanks for the help. I will try that.
>
> On Mar 3, 2017, at 9:23 AM, Miroslav Drahos wrote:
>
> Hi,
> I am getting errors emanating from GenerateExportHeader.cmake and hope
> someone has any pointers on this. The error:
>
> CMake Error at /usr/share/cmake-3.5/Modules/GenerateExportHeader.cmake:362
>
> On Jul 9, 2017, at 4:16 AM, Larry Hynes wrote:
>
> Hi
>
> I'm building nvi2[0], on (Mac OS X Yosemite (10.10.5)), which uses
> cmake.
>
> nvi2 depends on a reasonably sane BSD environment, which would
> include Berkeley DB V1 which is found at /usr/include/db.h.
>
> I
> On Jul 10, 2017, at 11:19 AM, Christopher E Robison
> wrote:
>
> The INSTALL(SCRIPT ...) syntax might be just the answer I need, thanks!.
>
> As I mentioned, the index creating script in the custom step needs to operate
> on the copied directory tree in its final
> On Jul 10, 2017, at 10:46 AM, Christopher E Robison
> wrote:
>
> I've recently begun using CMake on an existing project I've taken over, and I
> feel like I'm mostly getting used to it, though there is still a vast amount
> to learn. I've got nearly the entire
> On Jul 10, 2017, at 10:07 PM, Florian Lindner wrote:
>
> Hello,
>
> my complete cmake file looks like that:
>
> cmake_minimum_required (VERSION 3.1)
> project(Preallocation)
> add_executable(prealloc prealloc_parallel.cpp)
>
> set(CMAKE_CXX_STANDARD 11)
>
> On Jul 31, 2017, at 8:48 PM, Florian Lindner wrote:
>
> Hello
>
> ccmake shows CMAKE_BUILD_TYPE as unset. From the compile commands it looks
> like also nothing like Debug nor Release.
>
> Why is there no well-defined default set? How can I set a default?
>
> Thanks,
> On Jun 23, 2017, at 1:11 PM, Robin Verschueren
> wrote:
>
> Thank you, that makes sense.
>
> If I do that, how can I set specific settings for this Platform only? It
> seems that e.g.
>
> set(CMAKE_INCLUDE_FLAG_C "-J")
>
> in the Toolchain file is overwritten
> On Jun 23, 2017, at 1:01 PM, Michael Ellery <mellery...@gmail.com> wrote:
>
>
>> On Jun 23, 2017, at 12:47 PM, Robin Verschueren
>> <robin.verschue...@gmail.com> wrote:
>>
>> Dear CMake,
>>
>> We are trying to build our application
> On Jun 23, 2017, at 12:47 PM, Robin Verschueren
> wrote:
>
> Dear CMake,
>
> We are trying to build our application for the dSPACE embedded system
> (www.dspace.com), more specifically their MicroAutobox-II. This makes
> use of a specific compiler called mccppc
I’m wondering if anyone knows the details of rpath linker args. In particular,
I have two paths in my CMAKE_BUILD_RPATH. On macOS, I end-up with something
like this:
…. -Wl,rpath=/path/number/one -Wl,rpath=/path/number/two ….
and on linux with the same CMakeLists.txt file, I get:
….
> On May 19, 2017, at 2:00 PM, Urs Thuermann <u...@isnogud.escape.de> wrote:
>
> Michael Ellery <mellery...@gmail.com> writes:
>
>> if your source can be generated by simple substitution of variable
>> values (like a template file), then configure_file()
> On May 19, 2017, at 1:00 PM, Urs Thuermann wrote:
>
> How can I write a CMakeFile that will include a generated source file
> into another C source? I have read the FAQ, searched the mailing list
> archives and have tried for two hours without success.
>
> With
if you know exactly where the library is (via the ENV), then I guess you want
to specify the NO_DEFAULT_PATH option to find_library. Alternatively, see if
you can use the standard find module included with cmake:
https://github.com/Kitware/CMake/blob/master/Modules/FindLAPACK.cmake
..and in
> On May 5, 2017, at 11:45 AM, Konstantin Tokarev wrote:
>
> Hello,
>
> Is there any clear way to build specific target in "Debug" mode with flags
> that it would have in "Release"?
>
> In particular, build this specific target without effect of
> CMAKE_CXX_FLAGS_DEBUG
> On May 3, 2017, at 8:20 PM, Sean Wayland wrote:
>
> Hi all,
>
> I am very new to cmake and boost. Sorry if my question is basic thanks for
> your help in advance.
>
> I am having trouble linking a project to boost. I am using OSX 10.12.1
> I am using clion 2017.1.1
> On May 19, 2017, at 3:48 PM, Urs Thuermann wrote:
>
> Craig Scott writes:
>
>> A bit of a long-shot, have you tried generating the file with the extension
>> .h instead of .c? That might allow it to be picked up by the dependency
>> scanner
maybe a CMake snippet of what you are trying would help clarify, but are you
using an interface library for your header-only? I would assume yes - and then
have to tried add_dependency() for that library to trigger the file generation?
The dependency will only be resolved when the library is
I generally develop on a latest cmake (provided by homebrew) and that works
well for me. Unfortunately, I also need to support Visual Studio builds and it
looks like the cmake that is bundled with VS is 3.8. I’m apparently using
bleeding-edge features related to IMPORTED libraries, judging by
> On May 2, 2018, at 3:55 PM, Alan W. Irwin <ir...@beluga.phys.uvic.ca> wrote:
>
> On 2018-05-02 09:45-0700 Michael Ellery wrote:
>
>> I generally develop on a latest cmake (provided by homebrew) and that works
>> well for me. Unfortunately, I also need t
I know this is a long-shot, but I’m wondering if anyone has encountered this
scenario:
CMake (3.10) being used to generate a project for Visual Studio 15 (the current
latest)
the build is running on a windows machine under a jenkins slave process
The generation step runs fine
I then run
I don’t know anything about QTCreator, but the question really boils down to
how to get your IDE to pass extra args to the build tool - it’s not really a
cmake issue except to the extent that CMake can be used to invoke the build
step (after it has been used to generate the build). It sounds
to build the binaries; I'm then
> prompt for a generator for the project. Up to this point am I doing this
> correctly ?
>
> Thank You
>
>
>
>
> On 7/31/2018 12:56 PM, Michael Ellery wrote:
>> typical usage would be something like (assuming you are at repo root) :
&g
did you build boost yourself or download a pre-built package? What subdirectory
are the import libraries (.lib) located in? Do you set any boost-finder
variables before calling find_package(Boost)? I have at times in the past had
to set BOOST_LIBRARYDIR when the package I was using had an odd
typical usage would be something like (assuming you are at repo root) :
mkdir mybuild && cd mybuild
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake —build .
you can also opt to configure cmake (the equivalent of the first cmake command
above) using a GUI like ccmake or cmake-gui if you prefer. The
This seems like something that would be best-suited for a toolchain file:
https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html
Have you given that a try? Also, I wonder if STATIC_LIBRARY_FLAGS is a custom
setting, because I don’t think that one is a standard cmake variable.
-Mike
it’s not clear to me why you are trying to do this multiple project thing…I
mean why not just?:
project(myrepo)
add_subdirectory(util)
add_subdirectory(tool)
add_subdirectory(app)
and then if you only want to build util for instance:
cd build && cmake .. && cmake --build . --target=util
is
> On Sep 27, 2018, at 2:55 PM, Mateusz Loskot wrote:
>
>
>
>> I use to rely on a custom FindXercesC.cmake file that was using XercesC_ROOT
>> to figure all this out.
>> Is there any way to do the same here?
>
> There seem to be no Xxx_ROOT_DIR handled by this module
>
I’m guessing you want to set Boost_USE_DEBUG_RUNTIME:
https://github.com/Kitware/CMake/blob/master/Modules/FindBoost.cmake#L1467
> On Oct 29, 2018, at 4:29 PM, Osman Zakir wrote:
>
> Hi again, everyone.
>
> I noticed that FindBoost.cmake has "-d" set as the Boost debug ABI tag even
> though
look at the error message specifically:LDFLAGS=-static-libstdc++
-static-libgcc
Did you add something to your environment recently? Those look like gcc/clang
flags - msvc is not going to like them. Also, have you wiped your CMakeCache
completely (clean configure)? I’d have a look at your
CMAKE_BUILD_DIR is not a standard variable (did you mean CMAKE_BINARY_DIR ?) -
and the error seems to indicate that the variable is indeed empty so it tries
to create the project directory at the root level.
-Mike
> On Feb 18, 2019, at 8:58 PM, workbe...@gmx.at wrote:
>
> Hi again,
>
> i
https://cmake.org/cmake/help/latest/release/3.12.html says that
target_link_libraries got OBJECT in 3.12 - is that what you had in mind?
-Mike
> On Feb 12, 2019, at 3:35 PM, Paul Smith wrote:
>
> Don't want to be a noodge but wondering if anyone has any thoughts
> about this question or ideas
>> BUILD_COMMAND "cd ${CMAKE_BUILD_DIR}/freetype/src/freetype &&
>>>> ./autgen.sh && ./configure && make"
>>>> LOG_DOWNLOAD ON
>>>> LOG_INSTALL ON
>>>> LOG_CONFIGURE ON
>>>&g
se.
>
> On Fri, Apr 12, 2019 at 4:02 PM Michael Ellery wrote:
> whenever I use bleeding-edge boost, I try to grab the latest FindBoost:
> https://github.com/Kitware/CMake/commits/master/Modules/FindBoost.cmake
>
> ..in particular, you probably want
> htt
whenever I use bleeding-edge boost, I try to grab the latest FindBoost:
https://github.com/Kitware/CMake/commits/master/Modules/FindBoost.cmake
..in particular, you probably want
It seems like the error might be related to the download/extract step. I think
the fact that you are using the same dir for PREFIX, SOURCE_DIR and
DOWNLOAD_DIR might be confusing things. I would try commenting out those three
properties and see if it makes any difference, and then you can
I think you can refer to
https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html or “cmake
—help-properties”.
> On Jun 2, 2019, at 5:07 AM, Steven Truppe wrote:
>
> Hi again,
>
>
> i'm reading up on properties and i see how to use set_properties and
> get_properties but i don't
have a look at https://cmake.org/cmake/help/latest/module/ProcessorCount.html
If you still think you really need to compile/run code for this, have a look at
https://cmake.org/cmake/help/latest/command/try_run.html#command:try_run, but
that is harder to get working and maintain.
> On Jun 2,
If you are using the shell archive from cmake.org, it supports a —prefix and
—exclude-subdir option, e.g.:
cd /tmp
CM_INSTALLER=cmake-3.14.0-Linux-x86_64.sh
CM_VER_DIR=/opt/local/cmake/3.14
wget https://cmake.org/files/v3.14/$CM_INSTALLER
chmod a+x $CM_INSTALLER
mkdir -p $CM_VER_DIR
> On May 22, 2019, at 6:58 AM, Robert Dailey wrote:
>
> From the command line, I want to generate Ninja build scripts that
> utilize a specific version of MSVC compiler. Basically I'd like the
> combination of `-G"Visual Studio 15 2017"` with regards to its ability
> to find the C and C++
I’ve dealt with that using something like this:
set (_saved_CRL ${CMAKE_REQUIRED_LIBRARIES})
set (CMAKE_REQUIRED_LIBRARIES “-fsanitize=address;asan")
check_cxx_compiler_flag (-fsanitize=address COMPILER_SUPPORTS_SAN)
set (CMAKE_REQUIRED_LIBRARIES ${_saved_CRL})
the second item in
I’d like to make sure I understand two different aspects of header files
management for libraries:
(1) typically you can add header files to target_sources, but it’s only helpful
for IDEs..so that the IDE will show the header files in its sources list,
correct?. In theory, cmake does not
63 matches
Mail list logo