Re: [CMake] Provide default compiler/link flags in cache before project command.

2017-06-05 Thread Robert Maynard
You should look at the CMAKE__LANG_FLAGS_INIT ( https://cmake.org/cmake/help/v3.8/variable/CMAKE_LANG_FLAGS_INIT.html ) set of variables they are designed to resolve this issue. On Fri, Jun 2, 2017 at 11:03 PM, Marco Satti wrote: > Hi, I am trying to let the user pick their

[CMake] [ANNOUNCE] CMake 3.9.0-rc2 is now ready for testing!

2017-06-07 Thread Robert Maynard
I am proud to announce the second CMake 3.9 release candidate. https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.9 Release notes appear below and are also published at https://cmake.org/cmake/help/v3.9/release/3.9.html Some of the more significant

Re: [CMake] CUDA sample using CMake 3.9

2017-06-07 Thread Robert Maynard
Hi, Here is a collection of samples using the CUDA 3.9 support, that are targeted around specific features. https://gitlab.kitware.com/robertmaynard/cmake_cuda_tests/tree/master You can also look at the CUDA and CUDAOnly tests inside CMake.

Re: [CMake] Choosing Toolset v140 for Generator VS 15 2017 Win64

2017-06-09 Thread Robert Maynard
petros\_dev\math_dev\_build_trees\x64\vc14-intel-17_0_0\CMakeFiles\3.9.0-rc2\CompilerIdCXX\CompilerIdCXX.vcxproj] > Done Building Project > "C:\_petros\_dev\math_dev\_build_trees\x64\vc14-intel-17_0_0\CMakeFiles\3.9.0-rc2\CompilerIdCXX\CompilerIdCXX.vcxproj" > (default

Re: [CMake] Choosing Toolset v140 for Generator VS 15 2017 Win64

2017-06-09 Thread Robert Maynard
Hi, Can you provide the contents of the build directory file CMakeFiles/CMakeError.log . That might help us figure out why the toolset is not found On Tue, May 30, 2017 at 10:44 PM, Valmiki Rampersad wrote: > I have Visual Studio 2017 Community, with toolsets v141

Re: [CMake] Adding external static library into a target static library

2017-06-16 Thread Robert Maynard
The example you provided shows how you can combine raw object files into a single library. As far as I am aware CMake doesn't offer a nice cross platform API for extracting the object files from a static library and adding them to a new static library. On Thu, Jun 15, 2017 at 10:19 PM, Pawel

Re: [CMake] Missing _EXPORTS definition in CUDA host compilation

2017-06-19 Thread Robert Maynard
Hi James, I have created a bug report for this issue, which you can track at: https://gitlab.kitware.com/cmake/cmake/issues/16993 On Fri, Jun 16, 2017 at 12:14 PM, Hancox, James wrote: > Hi, > > > > I’m trying out the new CUDA support for Visual Studio generators in Cmake >

[CMake] CMake 3.9.0-rc3 is now ready for testing!

2017-06-13 Thread Robert Maynard
er than 3. * The "FindDoxygen" module has deprecated several variables. * The version of curl bundled with CMake no longer accepts URLs of the form "file://c:/..." on Windows due to a change in upstream curl 7.52. Use the form "file:///c:/..." instead to work

Re: [CMake] Circular dependencies with Ninja, not with Unix Makefiles

2017-05-05 Thread Robert Maynard
Hi, This is caused by doing an in source build and thereby causing the issue. The custom command is outputting a file called 'foo', which is also the chosen name of a target in the ninja file. All of this results in ninja conflating the two and causing a circular dependency. Your options are to

Re: [CMake] avoiding finding system libraries (motivation is superbuilds)

2017-05-05 Thread Robert Maynard
Have you tried using CMAKE_PREFIX_PATH instead of CMAKE_INSTALL_PREFIX? On Thu, May 4, 2017 at 5:13 PM, Kris Thielemans wrote: > Hi > > > > Short question: if we have a library/include files installed both in the > usual system locations and outside, how do we

[CMake] [ANNOUNCE] CMake 3.8.1 available for download

2017-05-02 Thread Robert Maynard
We are pleased to announce that CMake 3.8.1 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! - Changes in 3.8.1 since 3.8.0: Alex

Re: [CMake] CPack not detecting pkgbuild or product build

2017-05-04 Thread Robert Maynard
rather be sure. > > Thanks, > > Ayla > > On May 3, 2017, at 2:56 PM, Robert Maynard <robert.mayn...@kitware.com> > wrote: > > You will need to append the productbuild type to you CPACK_GENERATOR so > it would look like SET(CPACK_GENERATOR "productbuild;

[CMake] [ANNOUNCE] CMake 3.9.0-rc1 now ready for testing

2017-06-05 Thread Robert Maynard
I am proud to announce the first CMake 3.9 release candidate. https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.9 Release notes appear below and are also published at https://cmake.org/cmake/help/v3.9/release/3.9.html Some of the more significant

Re: [CMake] Understanding constraint graph cycles

2017-09-14 Thread Robert Maynard
Yes, You most likely want to look at BUILD_RPATH or INSTALL_RPATH depending on if these libraries are located in your build directory or install directory. On Mon, Sep 4, 2017 at 4:39 PM, James Turner <james.tur...@kdab.com> wrote: > > On 4 Sep 2017, at 18:37, Robert Maynard

[CMake] [ANNOUNCE] CMake 3.10.0-rc2 is now ready for testing

2017-10-12 Thread Robert Maynard
While technically incompatible with the old behavior, it is expected that behavior under typical use cases with properly-quoted command-lines has not changed. Changes made since CMake 3.9.0-rc1: André Apitzsch (1):

Re: [CMake] Future direction for FindCUDA

2017-08-30 Thread Robert Maynard
> Can I link to CUDA libraries with GCC while not using FindCUDA Yes you can if you have enabled the CUDA language. You will need to use find_package and can use the CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES as the location(s) to search. > Instead of modifying what FindCUDA does, which would break

Re: [CMake] CMake 3.9.x Visual Studio CUDA PDB/compiler flags issues

2017-09-06 Thread Robert Maynard
As far as gencode goes, your line has errors. With CUDA 8 it should look like: -gencode arch=compute_20,code=\"sm_20,compute_20\" On Mon, Sep 4, 2017 at 4:06 AM, Mueller-Roemer, Johannes Sebastian < johannes.sebastian.mueller-roe...@igd.fraunhofer.de> wrote: > I’m having two issues with debug

Re: [CMake] CMake 3.9.x Visual Studio CUDA PDB/compiler flags issues

2017-09-06 Thread Robert Maynard
Or am I misunderstanding what you mean? > > > > Fraunhofer-Institut für Graphische Datenverarbeitung IGD > > Fraunhoferstr. 5 | 64283 Darmstadt | Germany > > Tel +49 6151 155-606 <+49%206151%20155606> | Fax +49 6151 155-139 > <+49%206151%20155139> > >

Re: [CMake] CMake 3.9.x Visual Studio CUDA PDB/compiler flags issues

2017-09-07 Thread Robert Maynard
Okay I have opened an issue on CMake for handling multiple gencode with multiple code targets. On Wed, Sep 6, 2017 at 3:19 PM, Mueller-Roemer, Johannes Sebastian < johannes.sebastian.mueller-roe...@igd.fraunhofer.de> wrote: > Yes > > ____ > Fr

[CMake] [ANNOUNCE] CMake 3.9.2 available for download

2017-09-07 Thread Robert Maynard
We are pleased to announce that CMake 3.9.2 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! - Changes in 3.9.2 since 3.9.1: Brad

Re: [CMake] CMake 3.9.x Visual Studio CUDA PDB/compiler flags issues

2017-09-06 Thread Robert Maynard
quot; > and compute_20,compute_20 into -gencode=arch=compute_20,code= > \"compute_20,compute_20\" > > > > > > Fraunhofer-Institut für Graphische Datenverarbeitung IGD > > Fraunhoferstr. 5 | 64283 Darmstadt | Germany > > Tel +49 6151 155-606 <+49%20615

Re: [CMake] CMake, Mingw-w64 32 bit exception handling.

2017-08-23 Thread Robert Maynard
A quick scan of CMake source code shows that we don't have any references to gcc_eh anywhere. I way this could be occurring is through CMake detection of the implicit libraries that a compiler requires for each language. In particular it could be that C code for mingw by default uses gcc_eh while

Re: [CMake] Interface Libraries allow include directories but not link directories.. Why?

2017-08-22 Thread Robert Maynard
Usage of link_directories is discouraged, and was part of the reason why a target based option was not added. As the documentation for link_directories states "Note that this command is rarely necessary. Library locations returned by find_package() and find_library() are absolute paths. Pass these

Re: [CMake] Understanding constraint graph cycles

2017-09-04 Thread Robert Maynard
Hi, Yes you are correct the issue is related to rpath. When CMake constructs the rpath for the library linking it will have two paths ( /home/jenkins/workspace/FlightGear/dist/lib64, /home/jenkins/workspace/SimGear/dist/lib64) each that contain a copy of libosgText.so.130. CMake is warning that

Re: [CMake] Path to vc_redist

2017-09-04 Thread Robert Maynard
You can use the InstallRequiredSystemLibraries to do this. Since it sounds like you don't want all the libraries installed, use CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP and than deduce the path of vc_redist.exe from the value(s) in CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS. On Mon, Sep 4, 2017 at 3:01 AM,

[CMake] [ANNOUNCE] CMake 3.10.1 available for download

2017-12-14 Thread Robert Maynard
XX as well as C Matthew Woehlke (4): GoogleTest: Fix multiple discovery on same target GoogleTest: Improve gtest_discover_tests messages GoogleTest: Add timeout to discovery GoogleTest: Add test for missing test executable Robert Maynard (1): CUDA: Shared libraries

Re: [CMake] "modern" CUDA handling and static libraries

2017-12-19 Thread Robert Maynard
Hi, The CUDA_RESOLVE_DEVICE_SYMBOLS property was added for this exact situation. You can find it documented at https://cmake.org/cmake/help/v3.10/prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS.html Here is an example of it being used:

[CMake] CMake Monthly Meeting Summary

2017-11-21 Thread Robert Maynard
Hi, The next CMake monthly meeting will occur on Dec 5th at 10am in the KHQ21 Conference Room ( meet.google.com/nak-crpy-ykz ). If you want to be added to the calendar invite don't hesitate to send me an email. The next monthly meeting currently doesn't have a agenda yet, so please suggest

Re: [CMake] CMake Monthly Meeting Summary

2017-11-21 Thread Robert Maynard
Sorry about this this was meant for an internal mailing list. On Tue, Nov 21, 2017 at 12:11 PM, Robert Maynard <robert.mayn...@kitware.com> wrote: > Hi, > > The next CMake monthly meeting will occur on Dec 5th at 10am in the > KHQ21 Conference Room ( meet.google.com/nak-crpy-

Re: [CMake] Handling of generator expressions

2017-11-21 Thread Robert Maynard
Hi Roberto, Can you please report this as an issue ( https://gitlab.kitware.com/cmake/cmake ) as this looks like a bug in the way we are parsing generator expressions in target_link_libraries. The target_link_libraries fully supports taking a list of linker flags when it isn't part of a generator

Re: [CMake] CUDA support- no way to set GPUDebugInfo to be False ?

2017-12-08 Thread Robert Maynard
This is an oversight rather than an unsupported feature. Can you report this as an issue on https://gitlab.kitware.com/cmake/cmake On Fri, Dec 8, 2017 at 3:56 AM, Hancox, James wrote: > Hi, > > > > I’m working on porting an existing FindCUDA project over to using the new >

Re: [CMake] -std=c++17 vs -std=c++1y

2018-05-09 Thread Robert Maynard
If you have standard required enabled the compiler version shouldn't decay down to 14 when asking for 17. I recommend having a small test repo and using cmake --trace/--trace-expand to determine where the gnu++1y is coming from. It is not clear when looking at Modules/Compiler/Clang-CXX.cmake how

Re: [CMake] Help Accommodating Ninja when including CMAKE_CURRENT_BINARY_DIR

2018-04-27 Thread Robert Maynard
I recommend going with the custom target / custom command route. On Fri, Apr 27, 2018 at 5:19 AM, Stephen McDowell wrote: > Upon further inspection, it seems more related to PRE_BUILD. The step to > generating the files is through a add_custom_command call, which from the >

Re: [CMake] Help Accommodating Ninja when including CMAKE_CURRENT_BINARY_DIR

2018-05-08 Thread Robert Maynard
Here is how I would do this ( https://github.com/robertmaynard/Sandbox/tree/master/CMakeCustomCommandAfterTarget). In my example the executable is the target I want to have a custom PRE_BUILD step for. On Sat, Apr 28, 2018 at 5:02 AM Stephen McDowell wrote: > After much

Re: [CMake] Forcing a target to be built if another target is built

2018-05-17 Thread Robert Maynard
oject. This is not what a want. The active project simply lists its > *direct* dependencies (via target_link_libraries) and CMake then figures > out all the needed transitive dependencies. > > Please correct me if i missed your point :-) > > > On 15/05/18 23:29, Robert Maynard wrote

Re: [CMake] include directories not found for object library

2018-05-16 Thread Robert Maynard
ect library has to be added to the sources of the app1 and > app2, like now. With other words, object libraries would be allowed on the > left hand side of "target_link_libraries". > > This looks the most intuitive way, indeed. > > Cheers, > Miklos > > > On Tu

Re: [CMake] include directories not found for object library

2018-05-15 Thread Robert Maynard
This is scheduled to be fixed in the next release by allowing OBJECT libraries to be used in target_link_libraries. On Tue, May 8, 2018 at 7:46 PM Miklos Espak wrote: > Hi, > > I have an abstract class that I want to compile into many applications. > Something like this: > >

Re: [CMake] target_link_libraries and Custom Properties

2018-05-15 Thread Robert Maynard
> I also wasn't able to find a way to get a list of targets a given target depends on, so that I could run through it and query each dependent target's custom property manually. This isn't currently possible. > The executable targets need to collect the shader files and headers of only the

[CMake] [ANNOUNCE] CMake 3.11.2 available for download

2018-05-17 Thread Robert Maynard
We are pleased to announce that CMake 3.11.2 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ * Calling "add_library()" to create an alias of an imported target that is not globally visible now causes an error again as it did

Re: [CMake] Install libraries defined in INTERFACE targets

2018-05-16 Thread Robert Maynard
BUILD_INTERFACE explicitly means that only consumers inside the same buildsystem should use these libraries. To specify the libraries that should be used when linking to an installed version of a library you need to use INSTALL_INTERFACE. The reason for BUILD and INSTALL interface is to make sure

Re: [CMake] Forcing a target to be built if another target is built

2018-05-15 Thread Robert Maynard
Have you thought about not doing anything in the root CMakeLists for your testing directories but instead inside the active project you use add_subdirectory ( it supports relative paths to handle directories not physically nested inside it ). On Wed, May 9, 2018 at 8:56 AM Job Noorman

[CMake] [ANNOUNCE] CMake 3.11.4 available for download

2018-06-14 Thread Robert Maynard
We are pleased to announce that CMake 3.11.4 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! - Changes in 3.11.4 since 3.11.3:

[CMake] Upcoming AMA on CMake

2018-06-14 Thread Robert Maynard
On June 20th, I plus other Kitware CMake contributors will be doing an AMA on reddit ( r/cpp ). So please ask us any questions about CMake, contributing to CMake, or just life in general. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at:

[CMake] [ANNOUNCE] CMake 3.12.0-rc1 is ready for testing

2018-06-14 Thread Robert Maynard
I am proud to announce the first CMake 3.12 release candidate. https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.12 Release notes appear below and are also published at https://cmake.org/cmake/help/v3.12/release/3.12.html Some of the more

Re: [CMake] Install libraries defined in INTERFACE targets

2018-06-11 Thread Robert Maynard
Here is an updated version of your example with working exporting of Module3 and importing inside Module4 ( I ignored the XML lib importing ) CMake_with_exporting.tar.xz Description: application/xz -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at:

Re: [CMake] Is there a way to obtain the current compiler standard flag?

2018-05-30 Thread Robert Maynard
I am pretty sure you currently can't extract the compile flag information. This would be an enhancement and would have to be done as a generator expression. On Tue, May 29, 2018 at 5:37 PM Chris Green wrote: > Hi, > We have to use a utility (Root's rootcling/genreflex tool) as part of a >

[CMake] [ANNOUNCE] CMake 3.11.3 available for download

2018-05-31 Thread Robert Maynard
We are pleased to announce that CMake 3.11.3 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! - Changes in 3.11.3 since 3.11.2:

Re: [CMake] how to deprecate a target?

2018-06-29 Thread Robert Maynard
I am not aware of a nice way to setup CMake to error out if a user links to `foo` instead of `Foo::foo`. On Fri, Jun 29, 2018 at 2:05 AM Bram de Greve wrote: > > Hi all, > > Consider this situation. I'm building a Foo packaged, to be used by a > Bar project. > > Foo used to export its target as

[CMake] [ANNOUNCE] CMake 3.12.0-rc2 is ready for testing

2018-06-29 Thread Robert Maynard
I am proud to announce the second CMake 3.12 release candidate. https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.12 Release notes appear below and are also published at https://cmake.org/cmake/help/v3.12/release/3.12.html Some of the more

Re: [CMake] ccmake command missing from 3.12.0 RC releases

2018-07-02 Thread Robert Maynard
Thanks for reporting this. I am looking into it. On Sun, Jul 1, 2018 at 6:18 PM Miklos Espak wrote: > > Hi, > > the 'ccmake' command seems to be missing from the linux tarballs from 3.12.0 > RC1 and RC2. Not sure if you are aware of that. > > The release notes does not mention that it should be

Re: [CMake] [ANNOUNCE] CMake 3.12.0-rc2 is ready for testing

2018-07-02 Thread Robert Maynard
> Am 30. Juni 2018 00:05:25 MESZ schrieb "Alan W. Irwin" > : > >On 2018-06-29 14:46-0400 Robert Maynard wrote: > >[...] > >> * The "cmake_minimum_required()" and "cmake_policy(VERSION)" > >> commands now accept a version ra

Re: [CMake] Green Hills MULTI generator development

2018-06-22 Thread Robert Maynard
An easy way to track the activity and authors is to look at the history on the generator. ( https://gitlab.kitware.com/cmake/cmake/commits/master/Source/cmGlobalGhsMultiGenerator.cxx ) On Thu, Jun 21, 2018 at 9:06 AM Erich Schroeter wrote: > > Is anyone actively developing the Green Hills MULTI

Re: [CMake] Multiple cross compiling

2018-01-09 Thread Robert Maynard
Currently CMake only supports a single platform / toolchain per build directory. If you need to build with multiple toolchains you will need to use some form of a wrapper. Which can either be an external script that invokes CMake multiple times or a CMake project that uses ExternalProject (

Re: [CMake] How can I create a C executable and C++ library from the same source

2018-01-17 Thread Robert Maynard
As stated CMake tracks source files globally so they can only have a single language. Project that I work on have migrated over to using file(GENERATE) to produce the files as it only requires a couple lines of CMake code. get_filename_component(c_fname "${c_source_file}" NAME_WE)

[CMake] [ANNOUNCE] CMake 3.10.2 available for download

2018-01-18 Thread Robert Maynard
We are pleased to announce that CMake 3.10.2 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! - Changes in 3.10.2 since 3.10.1:

Re: [CMake] Recommandation for macOS framework install rules

2018-01-18 Thread Robert Maynard
Are you just checking if the compiler is GCC? if so I would use COMPILER_ID https://cmake.org/cmake/help/v3.8/variable/CMAKE_LANG_COMPILER_ID.html On Wed, Jan 17, 2018 at 6:19 PM, J Decker wrote: > It's not entirely related other than Mac > > I had to test > > if(

Re: [CMake] Confusion with range-based FOREACH logic

2018-01-29 Thread Robert Maynard
Hi, Looking at the documentation for 'RANGE' indicates that it is inclusive on both ends (but poorly), which as you point out is not what most people will expect. To solve your problem you can subtract 1 from len before you loop to have the behavior you want. On Tue, Jan 23, 2018 at 12:27 PM,

Re: [CMake] CMake detects suspicious compiler

2018-01-29 Thread Robert Maynard
Have you tried running with '--trace-expand' with a clean build directory? I would start by looking for where the execute_process occurs that verifies the C compiler and work backwards from that point. On Mon, Jan 29, 2018 at 5:45 AM, christoph@ruediger.engineering

Re: [CMake] Config.cmake.in: Conditionally serve static or shared library

2018-02-14 Thread Robert Maynard
If you want to support consumers that are building shared and static libraries themselves you can do this by using an import library with a generator expression. A simplified version of how do this, besides the import library can be found at:

Re: [CMake] Config.cmake.in: Conditionally serve static or shared library

2018-02-15 Thread Robert Maynard
It would be really nice though if CMake would support library aliases for import targets, then I could achieve the same using much nicer code. 3.11 will include support for aliasing import targets, as long as the import target was marked with GLOBAL visibility. On Wed, Feb 14, 2018 at 3:47 PM,

Re: [CMake] OBJECT Library Type

2018-02-16 Thread Robert Maynard
As the error message states an OBJECT library can't consume other OBJECT libraries. When creating the actual library you will have to explicitly state what $ you need. If you are just looking at a way to simplify the logic for the consuming library you should look at doing the

[CMake] [ANNOUNCE] CMake 3.11.0-rc1 is now ready for testing

2018-02-15 Thread Robert Maynard
I am proud to announce the first CMake 3.11 release candidate. https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.11 Release notes appear below and are also published at https://cmake.org/cmake/help/v3.11/release/3.11.html Some of the more

Re: [CMake] how to find CUDA libraries under new CUDA framework?

2018-01-02 Thread Robert Maynard
I would start by looking at the contents of CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES and CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES On Sat, Dec 30, 2017 at 12:29 PM, Crni Gorac wrote: > The FindCUDA.cmake module would put list of CUDA libraries found into > corresponding CMake

Re: [CMake] CMake 3.9.x Visual Studio CUDA PDB/compiler flags issues

2017-12-22 Thread Robert Maynard
Hi, I have a MR open for CMake that resolves this bug (https://gitlab.kitware.com/cmake/cmake/merge_requests/1618) On Thu, Sep 7, 2017 at 9:48 AM, Robert Maynard <robert.mayn...@kitware.com> wrote: > Okay I have opened an issue on CMake for handling multiple gencode with > multiple

Re: [CMake] "modern" CUDA handling and static libraries

2017-12-20 Thread Robert Maynard
gt; this a known limitation? > > On a related note: what is the equivalent of > "set(CUDA_PROPAGATE_HOST_FLAGS OFF)" now? > > Regards. > > On Tue, Dec 19, 2017 at 11:47 PM, Robert Maynard > <robert.mayn...@kitware.com> wrote: >> Hi, >> >> The CUD

Re: [CMake] modularizing, specifying dependencies in a project

2018-01-03 Thread Robert Maynard
You will want to use add_subdirectory instead of include in the root CMakeLists.txt and remove all include statements from ModA and ModB It total the changes needed to get everything to work are: diff --git a/CMakeLists.txt b/CMakeLists.txt index e611a37..b6968c1 100644 --- a/CMakeLists.txt +++

Re: [CMake] Performance profiling for CMake scripts?

2018-06-20 Thread Robert Maynard
I am not aware of any built in functionality that can generate performance numbers for a project. Have you made sure that the performance/parsing policies are set to NEW or your cmake_minimum_required is sufficiently high, those can have a significant improvement on configuration time. Polices (

Re: [CMake] VS 2017 + CUDA 9.0

2018-08-02 Thread Robert Maynard
When initially configuring a project you can specify which toolset you would like to use. Starting in CMake 3.12 this now also supports specifying which patch version. You can see what the syntax looks like at: https://cmake.org/cmake/help/v3.12/release/3.12.html#id3 On Thu, Aug 2, 2018 at 4:12 PM

Re: [CMake] AUTOUIC generated headers not found by lib that uses lib with headers

2018-07-30 Thread Robert Maynard
You need to defer the evaluation of the include directory to generate time, which will know what exactly build type is needed. This is done by using `$` instead of `${CMAKE_BUILD_TYPE`. Something like the following should work: set(directory

Re: [CMake] order of includes seems wrong (or please help me understand)

2018-07-31 Thread Robert Maynard
The BEFORE keyword places the includes before any other paths such as ones from other target_include_directories statements or from transitive propagation from targets you linked too. As to why `CMAKE_PREFIX_PATH` is being added, I expect that some find call is bring it in as an include

Re: [CMake] CMake for CUDA with MPICC still using gcc to link?

2018-07-31 Thread Robert Maynard
_LINKER_PREFERENCE ${CMAKE_CXX_COMPILER}) > > but it snaps back to gcc still. > > Thanks, > QT > > On Tue, 31 Jul 2018 at 13:12, Robert Maynard > wrote: >> >> It is snapping back to g++ as that was the linker that nvcc uses when >> it builds an executable. CMake detect

Re: [CMake] CMake for CUDA with MPICC still using gcc to link?

2018-07-31 Thread Robert Maynard
It is snapping back to g++ as that was the linker that nvcc uses when it builds an executable. CMake detects this as part of the compiler detection process. I haven't verified that this will work but you can try specifying the

Re: [CMake] LD_LIBRARY_PATH not used by the linker

2018-08-03 Thread Robert Maynard
When you dumb out the contents of VTK_LIBRARIES do you see ';/home2/softmassot/eb/Compiler/GCCcore/7.2.0/Python/2.7.14-bare/lib/libpython2.7.so'. In general CMake will only stop using the absolute path of a library when the library resides in an implicit directory provided by the compiler. On

Re: [CMake] ctest to output files

2018-08-01 Thread Robert Maynard
I would look at use the FIXTURES features to define the file as a shared resource. Here is a good article on how to use this feature: https://crascit.com/2016/10/18/test-fixtures-with-cmake-ctest/ On Wed, Aug 1, 2018 at 12:32 AM Quang Ha wrote: > > Hi all, > > Is there a way to let ctest create

Re: [CMake] order of includes seems wrong (or please help me understand)

2018-08-02 Thread Robert Maynard
Emmenlauer wrote: > > > Dear Robert, > > On 31.07.2018 15:04, Robert Maynard wrote: > > The BEFORE keyword places the includes before any other paths such as > > ones from other target_include_directories statements or from > > transitive propagation from targets

Re: [CMake] VS 2017 + CUDA 9.0

2018-08-08 Thread Robert Maynard
hint how this can be added to the CUDA functionality in CMake? I guess > others might stumble across this problem as well. > > Thanks, > > Sophonet > > Am 02.08.2018 um 22:50 schrieb Robert Maynard : > > When initially configuring a project you can specify whic

[CMake] [ANNOUNCE] CMake 3.12.1 available for download

2018-08-09 Thread Robert Maynard
We are pleased to announce that CMake 3.12.1 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! - Changes in 3.12.1 since 3.12.0:

Re: [CMake] Install interface

2018-08-06 Thread Robert Maynard
Installing interface libraries has no effect without the 'EXPORT' keyword as they have no artifacts, you will need to install the actual archives to get any artifacts. To generate a CMake file containing the correct import targets for consumers of your project you should like at the 'EXPORT'

Re: [CMake] Why does CMake 3.9.0 open VS2017 when targeting 2013 after installing 2017... sigh.

2018-08-15 Thread Robert Maynard
> cannot find CUDA likely as CUDA was not installed after 2017 The CUDA language support requires the CUDA MSBUILD extensions, which will require you to run the CUDA installer again ( it only installs the msbuild extensions for versions that are currently installed ). > I would like it to load

Re: [CMake] Why does CMake 3.9.0 open VS2017 when targeting 2013 after installing 2017... sigh.

2018-08-15 Thread Robert Maynard
correct >> version of VS. I mean that is what I thought I specified. >> >> I had thought when I upgraded to 3.8/3.9 or whatever at the time that ... >> Oh great they now have an open project button... .maybe that will allow me >> to not have to generate .bat scripts to lo

Re: [CMake] Why does CMake 3.9.0 open VS2017 when targeting 2013 after installing 2017... sigh.

2018-08-16 Thread Robert Maynard
8 at 9:18 AM Brian Davis wrote: >> >> >> >> On Wed, Aug 15, 2018 at 11:58 AM, Robert Maynard >> wrote: >>> >>> The MSVC / CUDA support recently has been very challenging to keep track >>> of. In general CUDA will only support a single pat

Re: [CMake] cmake fails on first run but succeeds when run again after make

2018-08-06 Thread Robert Maynard
The error sounds like the file needs to be marked as GENERATED ( https://cmake.org/cmake/help/latest/prop_sf/GENERATED.html ) but I would have thought qt5_add_resources would do that for you. You might look at using CMake built in rc support (

Re: [CMake] Copy file from Source to Build dir based on CMAKE_CFG_INTDIR

2018-08-23 Thread Robert Maynard
You can use `file(GENERATE` and the `$` generator expression. Here is an example: https://gitlab.kitware.com/cmake/cmake/blob/v3.12.1/Tests/CudaOnly/ExportPTX/CMakeLists.txt#L13 On Thu, Aug 23, 2018 at 1:47 PM Michael Jackson wrote: > > I would like to copy some files from my source dir into my

Re: [CMake] how do you allow CMAKE_CUDA_COMPILER to be optional via project LANGUAGE?

2018-08-28 Thread Robert Maynard
The way Eric suggest with check_language is what I use when I want to conditionally support CUDA. On Tue, Aug 28, 2018 at 10:28 AM Eric Noulard wrote: > > > Le mar. 28 août 2018 à 19:07, Quang Ha a écrit : > >> Hi all, >> >> So this question is again about project(foo LANGUAGES CXX CUDA). Is

[CMake] [ANNOUNCE] CMake 3.12.0 available for download

2018-07-17 Thread Robert Maynard
has been removed. * CMake no longer produces "_LIB_DEPENDS" cache entries for library targets. See policy "CMP0073". Other Changes = * Include flags for directories marked as "SYSTEM" are now moved after non-system directories. The "-isystem"

Re: [CMake] CMake 3.12 rc2 to rc3 Regression

2018-07-19 Thread Robert Maynard
The original author of the feature is looking at how to solve this problem. The author has a post on the developer boards on some of the changes needed to get everything to work: https://cmake.org/pipermail/cmake-developers/2018-July/030760.html On Thu, Jul 19, 2018 at 8:04 AM Michael Jackson

[CMake] [ANNOUNCE] CMake 3.12.2 available for download

2018-09-07 Thread Robert Maynard
: Do not find cublas_device on CUDA >= 9.2 Raffi Enficiaud (1): FindMatlab: Remove erroneous duplicate code Robert Maynard (1): CUDA: Avoid using deprecated cublas_device to identify device lib dirs Shane Parris (1): cmState: Clear GlobVerificationManager state on Re

Re: [CMake] Specifying path of nvcc for CUDA projects using project command

2018-09-10 Thread Robert Maynard
You can specify the location by setting the CUDACXX environment variable ( https://cmake.org/cmake/help/v3.12/envvar/CUDACXX.html ). On Mon, Sep 10, 2018 at 2:40 PM Jeffrey Perez via CMake wrote: > > Hello, > > > > I have a project which uses the CMake 3.10.1 and CUDA nvcc compiler and I am >

Re: [CMake] are target_compile_definitions not transitive in cmake 3.12.1?

2018-09-04 Thread Robert Maynard
target_compile_definitions is transitive for PUBLIC/INTERFACE definitions. Can you provide an example where that is failing? On Thu, Aug 30, 2018 at 6:32 PM Mario Emmenlauer wrote: > > Sorry if this has been discussed before, I searched the mailing > list and google but could not find this

Re: [CMake] Joining an OBJECT and a SHARED library

2018-09-11 Thread Robert Maynard
I believe what you are looking for in the CMake 3.12 improvements to object libraries. In 3.12 the target_link_libraries command now supports linking to an object library to embed the object files ( only on direct dependencies, no propagation of .objs ) and also propagates usage requirements like

Re: [CMake] Lib prefix: Windows vs. Unix/MinGW convention

2018-07-10 Thread Robert Maynard
>Why isn't CMake doing that by default? The convention of the target platform should prevail over the convention of the toolchain, shouldn't it?' CMake considers the target platform to be composed of the OS, and the compilation toolchain. Therefore MINGW uses the 'lib' prefix. > 2. Should I use

Re: [CMake] Using CMake to link C++ and CUDA Object file

2018-07-06 Thread Robert Maynard
if you are using the new first class cuda language, as seen by `project(MyTest LANGUAGES CXX CUDA)` you shouldn't use the old find cuda package or the associated cuda_add_library calls. When using the first class cuda language simply use add_library. The other difference I notice is that you

Re: [CMake] Using CMake to link C++ and CUDA Object file

2018-07-06 Thread Robert Maynard
n't use find_package(CUDA), I run > into the following problem: > > fatal error: thrust/host_vector.h: No such file or directory > > I guess this is needed if I am using Thrust/CUDA? > > Thanks, > Quang > > On Fri, 6 Jul 2018 at 06:38, Robert Maynard > wrote: >

Re: [CMake] Concurrency issues with copy_if_different

2018-07-12 Thread Robert Maynard
Personally would go with option number 2 On Thu, Jul 12, 2018 at 1:58 AM Olivier Croquette wrote: > Hello, > > in one of our projects, we use copy_if_different to copy some DLLs > required by the runtime. It's called as post-build action. The problem > is that several targets want to copy the

[CMake] [ANNOUNCE] CMake 3.12.0-rc3 is ready for testing

2018-07-09 Thread Robert Maynard
I am proud to announce the third CMake 3.12 release candidate. https://cmake.org/download/ The first two 3.12.0 release candidates included a change to allow the target_link_libraries command to modify targets created outside the current directory. This has been reverted in rc3 due to problems

Re: [CMake] CMake tried to pass all flags from gcc into nvcc when trying to add CUDA extension to current CPP project

2018-07-09 Thread Robert Maynard
The `CUDA_PROPAGATE_HOST_FLAGS` and `CUDA_SEPARABLE_COMPILATION` are global variables ( use `set` ) not a target properties. You can find more documentation on the legacy cuda support variable in the find cuda module ( https://cmake.org/cmake/help/latest/module/FindCUDA.html ). On Mon, Jul 9,

[CMake] [ANNOUNCE] CMake 3.11.0-rc3 is now ready for testing

2018-03-09 Thread Robert Maynard
I am proud to announce the third CMake 3.11 release candidate. https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.11 Release notes appear below and are also published at https://cmake.org/cmake/help/v3.11/release/3.11.html Some of the more

[CMake] [ANNOUNCE] CMake 3.11.0-rc2 is now ready for testing

2018-02-27 Thread Robert Maynard
I am proud to announce the second CMake 3.11 release candidate. https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.11 Release notes appear below and are also published at https://cmake.org/cmake/help/v3.11/release/3.11.html Some of the more

Re: [CMake] CMake misidentifies xlc++ as Clang

2018-03-08 Thread Robert Maynard
Just to roundtrip this for posterity. The fix for incorrect identification of XLC will be in CMake 3.11.0-rc3 On Thu, Mar 8, 2018 at 11:17 AM, Robert Maynard <robert.mayn...@kitware.com> wrote: > Hi. > > 1. You can report this issue on the CMake gitlab ( > https://gitlab.kitwa

Re: [CMake] [ANNOUNCE] CMake 3.11.0-rc3 is now ready for testing

2018-03-10 Thread Robert Maynard
at’s really the case, I will submit a patch for it right away. I just > want to make sure, I’m not misunderstanding something here? > > Greetings, > > Kai Wolf > http://kai-wolf.me/ > > [1] > https://cmake.org/cmake/help/v3.11/manual/cmake-buildsystem.7.html?highlight=right%20ha

<    1   2   3   4   5   6   7   8   >