Re: [CMake] Difference between PRIVATE and PUBLIC with target_link_libraries

2019-12-28 Thread Craig Scott
s to make things PRIVATE by default and only use PUBLIC or INTERFACE if the relationship genuinely requires the thing in question to be applied to whatever links to that target. The platform is not a factor unless the API is different on different platforms. -- Craig Scott Melbourne, Australia https

Re: [CMake] Providing multiple different MAJOR API versions with write_basic_package_version_file

2019-12-28 Thread Craig Scott
hat. It may be instructive to note that there were changes in CMake 3.14 to support Qt being found without the API version being specified as part of the package name (i.e. as find_package(Qt)). See policy CMP0084 <https://cmake.org/cmake/help/latest/policy/CMP0084.html> for some brief backgr

Re: [CMake] modifying cmake_build_type cflags per target

2019-11-19 Thread Craig Scott
build command lines for targets created in that directory scope. This is rarely what developers expect, but that's how it works, for better or worse. When you start adding in calls to add_subdirectory(), it can get really confusing what value is getting used where, so take great care if you

Re: [CMake] graphviz missing dependencies when target spans multiple subfolders

2019-10-25 Thread Craig Scott
few earlier CMake versions and see if the problem has always been there? If it looks like a recently introduced regression, please also try a nightly build of the latest master (or build CMake from sources yourself if you're happy to do that). If the bug is still there on master, I suggest yo

Re: [CMake] Is there a "package" equivalent for CMAKE_SKIP_INSTALL_ALL_DEPENDENCY

2019-10-25 Thread Craig Scott
doing a make package. -- Craig Scott Melbourne, Australia https://crascit.com Get the hand-book for every CMake user: Professional CMake: A Practical Guide <https://crascit.com/professional-cmake/> Consulting services (CMake, C++, build/release processes): https://crascit.com/services -- Powered

Re: [CMake] using `install()` with EXPORT and COMPONENT

2019-10-16 Thread Craig Scott
On Mon, Sep 30, 2019 at 4:09 AM Stefan Seefeld wrote: > Hi Craig, > > thanks for the detailed explanation ! > On 2019-09-29 5:13 a.m., Craig Scott wrote: > > > If all of your headers should be installed to a single directory, then you > can list the headers in the t

Re: [CMake] cmake end user vs. developer rpath handling

2019-10-09 Thread Craig Scott
H property of a target when that target is created. If you are pulling in these other projects via add_subdirectory() rather than building them standalone, you could modify the INSTALL_RPATH property of the targets you want to change from within your own top level project after add_subdirectory() r

Re: [CMake] DEPENDS parameter of add_custom_target

2019-10-07 Thread Craig Scott
On Mon, Oct 7, 2019 at 11:21 PM Setzer Sebastian (CM-CI2/ECS2) < sebastian.set...@de.bosch.com> wrote: > Hi Craig, > > On Mon, 7. Oct 2019 12:56 Craig Scott wrote: > > As it happens, I just updated the docs for these in the last day or so. > > You mean you updated t

Re: [CMake] DEPENDS parameter of add_custom_target

2019-10-07 Thread Craig Scott
quests/3891 I wrote an explanation of the specific behavior of the dependencies in the associated issue here: https://gitlab.kitware.com/cmake/cmake/issues/19771#note_635547 There is a difference between the two, but it's subtle and specific to the sort of scenario I mentioned in that issue comment. -- Cra

Re: [CMake] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS

2019-10-05 Thread Craig Scott
terpret or modify the content of >>> CMAKE_SHARED_LINKER_FLAGS value, but should put it entirely as the user >>> specified it. If you have another opinion, please provide any other >>> possibility to pass an arbitrary arguments to the linking command "as is" >

Re: [CMake] Use interface libraries for providing compile options and definitions

2019-10-03 Thread Craig Scott
e libraries don't appear on the linker command line, so they shouldn't need to be installed for linking to succeed, but I'm wondering if CMake's internal logic isn't properly handling this. Can you open an issue in CMake's gitlab <https://gitlab.kitware.com/cmake/cmake/i

Re: [CMake] using `install()` with EXPORT and COMPONENT

2019-09-29 Thread Craig Scott
m waiting for the YouTube clip to be made available and then I'll be posting a blog article on my website with links and the slides. When it goes up, you'll be able to find it at https://crascit.com (hopefully sometime this week, but depends how quickly the production people get the

Re: [CMake] Ninja generator emits order-only dependencies for custom commands

2019-09-27 Thread Craig Scott
s up as 'cmd /c') > > Is this a bug, or is there some intent behind emitting a CUSTOM_COMMAND > here? > This seems like a bug to me, please add it to gitlab as a new issue here: https://gitlab.kitware.com/cmake/cmake/issues Please ensure you also record what version of CMake yo

Re: [CMake] printing CMAKE_CXX_FLAGS_* based on build type

2019-09-27 Thread Craig Scott
ng to do something you shouldn't (or that you explicitly don't support multi-config generators). > >> Produce empy result, but >> message( STATUS "CXX compiler Release build options: >> ${CMAKE_CXX_FLAGS_RELEASE}") >> works as expected. >> Is

Re: [CMake] ?==?utf-8?q? Debug logging of items

2019-09-22 Thread Craig Scott
t of all currently known targets” > “give me a list of all properties of a target” > “give me a list of all currently defined variables” > etc. > > What I do not know is: Are this things that already exist - in which case > I would be happy if somebody could tell me how to f

Re: [CMake] set_target_properties ( INTERFACE_INCLUDE_DIRECTORIES ...)

2019-09-12 Thread Craig Scott
es after just one INTERFACE keyword if using target_include_directories(): target_include_directories (target INTERFACE directory1 directory2 ) Either option should work for all platforms, but note that option A will overwrite any previous contents of INTERFACE_INCLUDED_DIRECTORIE

Re: [CMake] The connection to cmake-server was terminated unexpectedly [cms-client] cmake-server exited with status null (SIGSEGV)

2019-09-04 Thread Craig Scott
k the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cm

Re: [CMake] Excluding targets from install set

2019-09-02 Thread Craig Scott
ll", I always create packages, so this works for me. If you did want to do an install directly, you could use the new "cmake --install" functionality added in CMake 3.15 which supports specifying the component to install. The end of the documentation page for the install() command al

Re: [CMake] using fetch_content imported modules and not system one

2019-08-29 Thread Craig Scott
_DIR}/src/Bullet3Common ... more as you work out what is needed ) endif() -- Craig Scott Melbourne, Australia https://crascit.com Get the hand-book for every CMake user: Professional CMake: A Practical Guide <https://crascit.com/professional-cmake/> -- Powered by www.kitware.com P

Re: [CMake] import objects to CMake

2019-07-23 Thread Craig Scott
> set_target_properties(myObjLib PROPERTIES >IMPORTED_OBJECTS /some/path/obj1.obj > /some/path/obj2.obj > ) > > add_executable(myExe $) > -- Craig Scott Melbourne, Australia https://crascit.com Get the hand-book for every CMake user: Professional

Re: [CMake] FetchContent/ExternalProject and URL_HASH

2019-07-22 Thread Craig Scott
on to the source, this is less likely to be a concern for you, but I'll leave that to your own judgement. > > > On Sun, Jul 21, 2019 at 3:49 AM Craig Scott > wrote: > >> >> >> On Wed, Jul 17, 2019 at 12:59 PM Dustyn Blasig wrote: >> >>> Hi

Re: [CMake] FetchContent/ExternalProject and URL_HASH

2019-07-21 Thread Craig Scott
tically download a checksum file (that I'm aware of). The file command expects that actual checksum, not a location for where to retrieve it from for the reasons mentioned above. -- Craig Scott Melbourne, Australia https://crascit.com Get the hand-book for every CMake user: Profession

Re: [CMake] CMake with FetchContent instead of Git Submodules

2019-06-28 Thread Craig Scott
RCE_DIR (this is why I named the cache variables FetchContent creates this way instead of putting the dependency name at the front of the cache variable name). So you can quickly see for which dependencies you are currently using a local cloned repo instead of what the project normally uses. --

Re: [CMake] Multiple exports for a target installation

2019-06-22 Thread Craig Scott
ts and have some overlap between export sets, but I'd generally try to avoid that if possible. It's simpler if you can structure things with clear and unambiguous dependencies without cycles or overlaps. It's already quite involved even without those things! HTH > > > *Fro

[CMake] CMake now available to Linux users as a snap

2019-06-18 Thread Craig Scott
post about it here: https://crascit.com/2019/06/18/cmake-now-available-as-a-snap/ -- Craig Scott Melbourne, Australia https://crascit.com Get the hand-book for every CMake user: Professional CMake: A Practical Guide <https://crascit.com/professional-cmake/> -- Powered by www.kitware.

Re: [CMake] Why do executables link static libs that shared libs were built from?

2019-06-15 Thread Craig Scott
raries(bar PRIVATE foo). None of the transitive properties of foo should be needed then either, so you'd have nothing left to forward on. If you can't avoid it, then the static library really is a public dependency and anything linking to bar should rightly also be linking to foo. -- C

Re: [CMake] Multiple exports for a target installation

2019-06-15 Thread Craig Scott
cifying a different export set for each one. -- Craig Scott Melbourne, Australia https://crascit.com Get the hand-book for every CMake user: Professional CMake: A Practical Guide <https://crascit.com/professional-cmake/> -- Powered by www.kitware.com Please keep messages on-topic and c

Re: [CMake] Changed behavior of CPACK_PACKAGE_VERSION generation?

2019-05-26 Thread Craig Scott
name, which in turn > makes our custom target to fail. > > Our quick fix was to add the following line to our CMakeList.txt file: > SET(CPACK_PACKAGE_VERSION > "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") > > My qu

Re: [CMake] Problems with ExternalProject_Add

2019-05-26 Thread Craig Scott
for a given stage. Have a read through the ExternalProject_Add() docs for more details, specifically the "Miscellaneous Options" subsection. -- Craig Scott Melbourne, Australia https://crascit.com Get the hand-book for every CMake user: Professional CMake: A Practical Guide <http

Re: [CMake] ctest // fixtures and --repeat-until-fail

2019-04-26 Thread Craig Scott
. For other projects, it might be desirable for the fixture setup/cleanup tests to also run multiple times (a setup test might simply be polling a service to confirm it is up, for example). Since ctest cannot know which of the two scenarios the project wants, it simply treats all tests the same, whet

Re: [CMake] ctest // fixtures and --repeat-until-fail

2019-04-16 Thread Craig Scott
isabled (e.g. "ctest -FA . -R myFlakeyTest --repeat-until-fail 10"). This strategy won't work for everyone's situation, but it has been effective for me. -- Craig Scott Melbourne, Australia https://crascit.com Get the hand-book for every CMake user: Professional CMake: A Practical Gui

Re: [CMake] Possible inconsistent behavior in target_sources() and CMake 3.14

2019-04-15 Thread Craig Scott
be treated any differently? > Yes, this is the intended behavior. There's no need to modify the path when target_sources() is called in the same directory as that in which the target is defined because the behavior is unambiguous and is the same whether CMP0076 is set to OLD or NEW. T

Re: [CMake] linking FetchContent library

2019-04-11 Thread Craig Scott
(Please continue to CC the mailing list with replies) On Thu, Apr 11, 2019 at 4:22 PM Stéphane Ancelot wrote: > > Le 10/04/2019 à 23:03, Craig Scott a écrit : > > > > On Thu, Apr 11, 2019 at 1:35 AM Stéphane Ancelot > wrote: > >> Hi, >> >> are there

Re: [CMake] linking FetchContent library

2019-04-10 Thread Craig Scott
mal example which shows the problem? The snippet above should bring jsoncpp into your main build, but without seeing how you are trying to link to it's targets, it is hard to tell what the problem could be. -- Craig Scott Melbourne, Australia https://crascit.com Get the hand-book for eve

Re: [CMake] Parent component options passed to ExternalProject

2019-03-26 Thread Craig Scott
27;m guessing here that you want the external project's configure stage to run during your main project's build stage so that something later in your main project's configure stage can make use of something the external project's configure stage does). You will still hav

Re: [CMake] FetchContent or Export Targets

2019-03-24 Thread Craig Scott
t and more robust experience. It really comes down to whether in your case you can truly say no-one will ever want to use find_package() to bring your projects into theirs. -- Craig Scott Melbourne, Australia https://crascit.com Get the hand-book for every CMake user: Professional CMake: A

Re: [CMake] conflict between configure & build steps in gitlab-runner script for Windows: Debug or Release build directory not found

2019-03-23 Thread Craig Scott
.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/

Re: [CMake] Passing CMake Arguments to FetchContent

2019-03-22 Thread Craig Scott
L "") # Forces the value #option(JSON_BuildTests "" OFF) # Different default, but dev can still change it FetchContent_Declare( nlohmann_json_fc GIT_REPOSITORY https://github.com/nlohmann/json.git GIT_TAG v3.6.1 GIT_SHALLOW TRUE ) FetchContent_MakeAvailable

Re: [CMake] include_extenal_msproject() dependency behavior change between 3.13.4 and 3.14.0-rc2 (possible bug in rc2)

2019-02-26 Thread Craig Scott
Studio 14 2015 Win64" > CMake Error at Tests/RunCMake/CMakeLists.txt:279 (if): >if given arguments: > > "(" "CMAKE_CXX_COMPILER_VERSION" "VERSION_GREATER_EQUAL" > "19.0.24215.1" "AND" "CMAKE_CXX_COMPILER_VERSION" "VERSION

Re: [CMake] include_extenal_msproject() dependency behavior change between 3.13.4 and 3.14.0-rc2 (possible bug in rc2)

2019-02-26 Thread Craig Scott
FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http

Re: [CMake] Ensuring an external project is built and installed before trying to call "find_package" on it

2019-02-22 Thread Craig Scott
t_Add(Dependency2 GIT_REPOSITORY INSTALL_DIR${installDir} CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= ) ExternalProject_Add(mainBuild SOURCE_DIR INSTALL_DIR ${installDir} DEPENDS Dependency1 Dependency2 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= -DCMAKE_PREFIX

Re: [CMake] [cmake-developers] Using FetchContent fails when two subprojects have a target with the same name

2019-02-20 Thread Craig Scott
d, the top level project only sees the targets that ExternalProject itself creates. This is most likely the best workaround if you are not able to modify the target names used in the subprojects you want to combine. -- Craig Scott Melbourne, Australia https://crascit.com Get the hand-book for every C

Re: [CMake] [cmake-developers] Using CMake as a package manager vs using a dedicated package management tool (like Conan)

2019-02-19 Thread Craig Scott
s/18831#note_509194> how I'm currently working on bringing Boost into our build via a FetchContent-based mechanism. That is still somewhat of a work-in-progress and has holes for multi-config generators (i.e. Visual Studio and Xcode), but they don't look insurmountable if those are importa

Re: [CMake] [cmake-developers] Using CMake as a package manager vs using a dedicated package management tool (like Conan)

2019-02-19 Thread Craig Scott
his is an area I'm increasingly thinking about these days (I'm the author of the FetchContent module). I'm interested in hearing peoples' views on dependency management and building an understanding of what works for people and what doesn't. If you want to send feedback my way, do fe

Re: [CMake] Question about set

2019-02-18 Thread Craig Scott
m of the STRINGS property. Example: > > set(MYSTRING "A" CACHE STRING "Documentation for the variable") > set_property(CACHE MYSTRING PROPERTY STRINGS "A;B") > Note that this isn't an enforcing feature, only a convenience for CMake GUI and ccmake. It tel

Re: [CMake] requiring parallel building but sequential linking

2019-02-17 Thread Craig Scott
e default for which can be set project-wide with the CMAKE_JOB_POOL_LINK <https://cmake.org/cmake/help/latest/variable/CMAKE_JOB_POOL_LINK.html> variable. You can control the number of parallel jobs for a given pool with the JOB_POOLS <https://cmake.org/cmake/help/latest/prop_gbl/JOB_POOLS.html> globa

Re: [CMake] Feedback CMAKE bug in VS2017 WDK for Windows 10, version 1809

2019-02-15 Thread Craig Scott
WIN10 PRO > > Uninstalling the VS extension of the WDK, CMAKE can work normally, as long > as the VS extension of the WDK is installed, cmake reports that the C CXX > compiler is unknown. > This seems very similar to an issue recently reported here: https://gitlab.kitware.com/cmak

Re: [CMake] Redundant linking when modifying shared libraries

2019-02-14 Thread Craig Scott
print a different > string the relinked executable remains binary identical. > > Is there a way to prevent these redundant build actions? This would be a > huge time saver for us. > I think you might be looking for the LINK_DEPENDS_NO_SHARED <https://cmake.org/cmake/help/latest/prop_t

Re: [CMake] [EXTERNAL] Re: Linking to boost on OS X 10.12

2019-02-05 Thread Craig Scott
> > > > > > > Thanks! > > > > > > > > Adam > > > > > > > > -- > > > > J. Adam Stephens, Ph.D. > > > > Dakota Support Analyst > > >

Re: [CMake] Checking Variables in a tool-chain file

2019-01-31 Thread Craig Scott
> -DNRF5_SDK_ROOT=~/CMSIS/nRF5_SDK_14-2/ .. > > But also with environment variables: > ARM_GCC_TOOL_PATH=/usr/local/gcc-arm-none-eabi-7-2018-q2-update cmake > -DBINDING=nrf52 -DCMAKE_TOOLCHAIN_FILE=../cmake/gcc-arm-none-eabi.cmake > -DNRF5_SDK_ROOT=~/CMSIS/nRF5_SDK_14-2/ ..

Re: [CMake] Modern cmake advise for transitive library dependencies

2018-12-18 Thread Craig Scott
he way this is normally done is pretty much as Alan suggests (it's also the way I handle cases analogous to yours in our projects at work). There's even a find_dependency() <https://cmake.org/cmake/help/latest/module/CMakeFindDependencyMacro.html> command intended for precisely this situation to make it

Re: [CMake] CMake 3.11.3: set properties on the command line?

2018-12-17 Thread Craig Scott
ting that you need to add this manual workaround at all. I suspect this code <https://gitlab.kitware.com/cmake/cmake/blob/v3.13.2/Modules/Platform/Linux.cmake#L55> might be why it is being turned off for you, but without more detail about your build setup, it's hard to say. If you use a

Re: [CMake] How to set CTEST_BUILD_NAME

2018-12-16 Thread Craig Scott
m, that might give more clues as to what's happening for you. -- Craig Scott Melbourne, Australia https://crascit.com New book released: Professional CMake: A Practical Guide <https://crascit.com/professional-cmake/> -- Powered by www.kitware.com Please keep messages on-topic and check t

Re: [CMake] Correct way to specify multiple build configurations for single config generators?

2018-12-10 Thread Craig Scott
On Mon, Dec 10, 2018 at 1:37 PM Zaak Beekman wrote: > I have been reading the *excellent* book "Professional CMake". The author, > Craig Scott, recommends the following best practices: > >- check the existence of `CMAKE_CONFIGURATION_TYPES` and only adding >or

Re: [CMake] dependencies of cross compiliations

2018-12-10 Thread Craig Scott
On Mon, Dec 10, 2018 at 7:57 PM Eric Noulard wrote: > > Le dim. 9 déc. 2018 à 12:24, Craig Scott a > écrit : > >> On Tue, Dec 4, 2018 at 6:56 PM Torsten Robitzki >> wrote: >> >>> > Am 27.11.2018 um 19:55 schrieb Eric Noulard : >>> > >

Re: [CMake] dependencies of cross compiliations

2018-12-09 Thread Craig Scott
if you need to build more than one cross-compiled architecture. > > The wish-season is coming up, so that's sort of what I would like to > > have. Now it's your turn. No bikeshedding please, only deliveries ;) > > How about ``add_dependencies()`` allowing me to defin

Re: [CMake] [MSVC] Setting warning level on target feels like long-time bug

2018-12-09 Thread Craig Scott
offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/he

Re: [CMake] Effective CMake - warning on bad practices

2018-11-23 Thread Craig Scott
ed are usually documented as such. Some commands still have their uses, even if they should mostly be avoided, so they don't get the deprecation treatment. Contributions to improve the docs are always welcome (and a big shout-out to Joachim Wuttke who has been putting in a great effort lately

Re: [CMake] add_library ALIAS

2018-11-19 Thread Craig Scott
/latest/module/FetchContent.html> module was added in CMake 3.11, it also became much easier to incorporate a dependency via add_subdirectory(). -- Craig Scott Melbourne, Australia https://crascit.com New book released: Professional CMake: A Practical Guide <https://crascit.com/professional-cmake

Re: [CMake] CMAKE_OSX_SYSROOT icw iOS fat binaries (iPhone + iPhoneSimulator)

2018-11-19 Thread Craig Scott
AKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch armv7 -arch armv7s -arch > arm64") > > endif() > > > > # CMAKE_CXX_FLAGS > > if(MAKE_FAT) > > set(CMAKE_OSX_SYSROOT "" CACHE INTERNAL "sysroot" FORCE) > > else() > > set(CMAKE_OSX_SYSR

Re: [CMake] My previous message

2018-11-04 Thread Craig Scott
jects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/mailman/listinfo/cmake > -- Craig Scott Melbourne, Australia https://crascit.com New book released: Professional CMake: A Practical Guide <https://cra

Re: [CMake] include a file from the toolchain file

2018-11-01 Thread Craig Scott
in file, at least I was not able to find any. > > The only possible fix is setting an absolute path, but this is not > really a solution since it makes the toolchain not portable. > > Is there anything else I could try? > Is there already an open issue? I was not able to find any on

Re: [CMake] Signing individual binary and problem with PackageMaker CPack generator

2018-10-23 Thread Craig Scott
On Tue, Oct 23, 2018 at 4:43 PM Eric Noulard wrote: > Le lun. 22 oct. 2018 à 23:05, Craig Scott a > écrit : > >> >>> Yes I agree that having build rpath is useful. >>> I am not aware of any mechanism that enable calling some tool during >>> CPack'

Re: [CMake] Signing individual binary and problem with PackageMaker CPack generator

2018-10-22 Thread Craig Scott
compatible with tools like Fastlane <https://fastlane.tools>, if you end up heading in that direction. But if you have embedded frameworks, then yeah, you probably end up having to do things manually yourself (CMake doesn't yet handle those well and has no direct support for it). -- Cr

Re: [CMake] how to debug CPack creation

2018-10-20 Thread Craig Scott
TRA in >> https://cmake.org/cmake/help/latest/cpack_gen/deb.html >> or >> https://cmake.org/cmake/help/latest/cpack_gen/rpm.html#variable:CPACK_RPM_SPEC_MORE_DEFINE >> >> 3) Ensure that you generate package with >>CMAKE_INSTALL_PREFIX == CPACK_PACKAGING_IN

Re: [CMake] Controlling order of includes with INTERFACE_INCLUDE_DIRECTORIES for an IMPORTED target

2018-10-12 Thread Craig Scott
ription: An effect of the -isystem flag is to search the directory after > those specified via -I flags. Which seems at odds with your observations/comments, unless I'm misunderstanding what you're saying. -- Craig Scott Melbourne, Australia https://crascit.com New book released:

Re: [CMake] LOCATION target property, generator expressions

2018-10-08 Thread Craig Scott
lly trying to do? >>> >>> >>> >>> -Brad >>> >>> >>> >> >>> >>> >>> >>> -- >>> >>> Powered by www.kitware.com >>> >>> Please keep messages on-topic and check t

Re: [CMake] Call function from name and list, including empty elements?

2018-10-04 Thread Craig Scott
(about 2 weeks for converting 45 Makefile.in and 37 > configure.ac files), but make the build specification > a lot easier to follow and much shorter. Especially > using the ninja backend, building is quite a bit > faster as well. > Just wa

Re: [CMake] Computation of CMAKE_OSX_SYSROOT

2018-10-01 Thread Craig Scott
tion logic triggered by the project() call creates a cache variable if one doesn't exist, which would discard the non-cache variable. It's a bit unfortunate, but that's what happens when you set a cache variable for the first time. The relevant code related to your observations

Re: [CMake] Call function from name and list, including empty elements?

2018-09-29 Thread Craig Scott
made here and in the linked stackoverflow article may also be relevant. If I get time, I'll try to see if I can incorporate some of the observations and behaviors you've raised. > P.s. I'd also like to see the possibility to create symlinks > in cmake, other than c

Re: [CMake] ExternalProject, continuous integration and caching builds

2018-09-05 Thread Craig Scott
t the entire EP_BASE directory (here > "C:/Users/appveyor/arrow-externals") is cached and restored by AppVeyor. > > Did someone manage to make this work, and/or is there another solution? > > -- Craig Scott Melbourne, Australia https://crascit.com New book released: Profess

Re: [CMake] [cmake-developers] libc++ usage in CMake with Clang?

2018-08-22 Thread Craig Scott
On Wed, Aug 22, 2018 at 1:39 PM, Ian Henriksen < insertinterestingnameh...@gmail.com> wrote: > > > On Tue, Aug 21, 2018 at 6:40 PM Craig Scott > wrote: > >> >> On Wed, Aug 22, 2018 at 7:18 AM, Robert Dailey >> wrote: >> >>> On Tue, Aug 21

Re: [CMake] [cmake-developers] libc++ usage in CMake with Clang?

2018-08-21 Thread Craig Scott
On Wed, Aug 22, 2018 at 7:18 AM, Robert Dailey wrote: > On Tue, Aug 21, 2018 at 3:47 PM Craig Scott > wrote: > > Excuse the brevity, but it sounds like you might be looking for the > CXX_EXTENSIONS target property (sorry if I've misunderstood your problem, > let me know w

Re: [CMake] [cmake-developers] libc++ usage in CMake with Clang?

2018-08-21 Thread Craig Scott
Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html >

Re: [CMake] Project referring to CSharp project generates incorrectly?

2018-08-16 Thread Craig Scott
> CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.ht

Re: [CMake] setting FIXTURES_* and RESOURCE_LOCK caused permission denied for dependent test?

2018-08-03 Thread Craig Scott
compare_results test is complaining with the message "permission denied". Maybe add more debug logging to the test case to check what you expect to exist (or not exist) at the start of the test. You can also make ctest show more output by adding the -V option which will show all the

Re: [CMake] issue with CPack: RPM package was not generated!

2018-07-31 Thread Craig Scott
? The message above seems to be suggesting nothing was installed. - Are you overriding the .spec file rather than using the one CMake/CPack creates for you? If so, can you indicate why and maybe check its contents. Less likely this is the main issue, but worth covering anyway. --

Re: [CMake] CMake 3.12 rc2 to rc3 Regression

2018-07-18 Thread Craig Scott
volved and was then reverted can be found here: https://gitlab.kitware.com/cmake/cmake/issues/17943 -- Craig Scott Melbourne, Australia https://crascit.com New book released: Professional CMake: A Practical Guide <https://crascit.com/professional-cmake/> -- Powered by www.kitware.com P

Re: [CMake] Cannot import a project twice when cross compiling (as host-tool and for the target arch)

2018-07-11 Thread Craig Scott
p/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/mailman/listinfo/cmake >

[CMake] New CMake book released

2018-07-10 Thread Craig Scott
the build that produces the digital copy. :P Enjoy! -- Craig Scott Melbourne, Australia https://crascit.com -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community

Re: [CMake] CMAKE_ARGS for FetchContent

2018-07-06 Thread Craig Scott
> > if(NOT jsoncpp_POPULATED) > > FetchContent_Populate(jsoncpp) > > add_subdirectory(${jsoncpp_SOURCE_DIR} ${jsoncpp_BINARY_DIR}) > > endif() > > > Should I then set the -DJSONCPP_XXX options when running the main cmake > configure? > > Best regards, > Mads

Re: [CMake] CMAKE_ARGS for FetchContent

2018-07-06 Thread Craig Scott
ould avoid doing time-consuming things during the configure stage. A configure stage will be inherently non-parallel as well, so it hurts you twice. Build steps should be deferred to the build stage as much as possible. If you find yourself wanting to pull some external project's build earlier i

Re: [CMake] CMAKE_SYSROOT

2018-07-03 Thread Craig Scott
> > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensourc

Re: [CMake] Changes to cmake_minimum_required() for 3.12

2018-07-01 Thread Craig Scott
On Mon, Jul 2, 2018 at 4:04 AM, Alan W. Irwin wrote: > On 2018-07-01 08:12+1000 Craig Scott wrote: > > Older CMake versions >> will see the extra dots as being version component separators and will end >> up effectively ignoring the max part. >> > > This

[CMake] Changes to cmake_minimum_required() for 3.12

2018-06-30 Thread Craig Scott
"" versions. > > > >I prefer the latter because it immediately answers the question implied > >by the former, i.e., > >what happens if the running version is less than max? > Seems reasonable. I've created a MR with a slight tweak to your wording for this

Re: [CMake] target_sources and multiple subdirs

2018-06-20 Thread Craig Scott
e subdirs that add sources are. Maybe have a read of the following article for a more detailed discussion of using target_sources() in this way: https://crascit.com/2016/01/31/enhanced-source-file-handling-with-target_sources/ -- Craig Scott Melbourne, Australia https://crascit.com -- Powered by

Re: [CMake] Determine the directory to install package config and version files (like /usr/lib/cmake)

2018-06-16 Thread Craig Scott
they patched their cmake3 executable to search there as well, but still it's not ideal). -- Craig Scott Melbourne, Australia https://crascit.com -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitwar

Re: [CMake] Spaces in conditional output of generator expressions

2018-06-02 Thread Craig Scott
using a space instead), which was kinda surprising given that I didn't quote the whole generator expression. Not sure about other platforms or generators. -- Craig Scott Melbourne, Australia https://crascit.com -- Powered by www.kitware.com Please keep messages on-topic and check the CMa

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

2018-06-01 Thread Craig Scott
std flags: --c++17;-A > C++17 ext flags: --c++17;--gnu_extensions > -- Configuring done > > > And for IBM XL on AIX: > -- The CXX compiler identification is XL 13.1.3 > -- Check for working CXX compiler: /usr/bin/xlC > -- Check for working CXX compiler: /usr/bin/xlC -- works

Re: [CMake] Why isn't target_link_libraries not enough in some cases?

2018-05-04 Thread Craig Scott
ink_libraries(testExe SDL2x OpenGL::GL) > > Install fails, but that's another issue (the symlink is created in the > wrong directory) and this should be reported to SDL I guess. > > CMake Error at _deps/sdl2-build/cmake_install.cmake:188 (file): > file INSTALL cannot find > "

Re: [CMake] Recommandations for public custom macro/functions installation

2018-04-17 Thread Craig Scott
nst name clashes with other parts of the build (always consider the possibility that your project may one day be used as part of some larger parent project, pulled in by add_subdirectory()). -- Craig Scott Melbourne, Australia https://crascit.com -- Powered by www.kitware.com Please keep mess

Re: [CMake] FetchContent and find_package

2018-04-10 Thread Craig Scott
and that's job done from the project's perspective. Much more robust, way easier to use. > On Tue, Apr 10, 2018 at 10:23 AM Craig Scott > wrote: > >> >> On Tue, Apr 10, 2018 at 11:07 PM, Saad Khattak >> wrote: >> >>> Hi, >>> >>

Re: [CMake] FetchContent and find_package

2018-04-10 Thread Craig Scott
. If the found package only provides variables instead of imported targets, then you'll have to work harder and go through whatever variables it provides to see if you can work out what the package can give you. Imported targets are definitely more preferable though. -- Craig Scott Melbourne,

Re: [CMake] looking for 2 features to help pkg-config pc files

2018-03-27 Thread Craig Scott
ot;${_ldflags}" "${__ldflags}" PARENT_SCOPE) > endfunction(MAKE_LDFLAGS_FROM_LIBPATH) > > Regards, > mpsuzuki > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > &g

Re: [CMake] CMAKE_SYSROOT and CMAKE_OSX_SYSROOT

2018-03-26 Thread Craig Scott
full path to an SDK should be rare, it's usually going to be more flexible to specify just the basic family of SDK you want to use). -- Craig Scott Melbourne, Australia https://crascit.com -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http:/

Re: [CMake] Make ctest spit out xml file (without dashboard)

2018-03-19 Thread Craig Scott
/training.html > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/mailman/listinfo/cmake > > -- Craig Scott Melbourne, Australia https://crascit.com --

Re: [CMake] Generator Expressions and FetchContent

2018-03-19 Thread Craig Scott
ling with. This is the recommended way to structure a situation like this. You shouldn't need to also pull in a secondary .cmake file in most circumstances, but maybe I'm missing something about your particular situation. > > On Sun, Mar 18, 2018 at 4:22 PM Craig Scott >

Re: [CMake] Generator Expressions and FetchContent

2018-03-18 Thread Craig Scott
ator expressions. > > On Sat, Mar 17, 2018 at 6:47 PM Craig Scott > wrote: > >> Can you provide a small project example that can be used to demonstrate >> your problem? The specifics of how you are doing things may be important. >> >> >> On Sun, Mar 1

Re: [CMake] Generator Expressions and FetchContent

2018-03-17 Thread Craig Scott
ke.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Follow

Re: [CMake] How to link against projects added through FetchContent

2018-03-11 Thread Craig Scott
``````` > > CMake populates Catch2 with Catch2-NOTFOUND. > > So, my question is, how do I link against projects added through > FetchContent? > -- Craig Scott Melbourne, Australia https://crascit.com -- Powered by www.kitware.com

  1   2   3   >