Re: [CMake] building cmake without the bootstrap step

2019-12-12 Thread René J . V . Bertin
Never mind, this tweak to the bootstrap script should take care of anything not directly obvious. Could do with an automated test of the installed version but the accepted version range is so large that doesn't seem to be the trouble. ``` if [ -x ${cmake_prefix_dir}/bin/cmake ] ;then # use

Re: [CMake] building cmake without the bootstrap step

2019-12-12 Thread René J . V . Bertin
On Thursday December 12 2019 09:36:03 Kyle Edwards wrote: >If you want to skip bootstrapping, you can use a pre-existing CMake >binary for your system to build the new CMake. > >This mailing list is deprecated. Please head over to Discourse for >further discussion: OK, thanks. To finish things

[CMake] building cmake without the bootstrap step

2019-12-12 Thread René J . V . Bertin
Hi, If I understand correctly, configuring CMake for building means bootstrapping a basic version of itself which is then run on the included CMakeLists.txt file. That takes a lot of time (comparatively) which begs the question if there's a more-of-less official way to skip the bootstrap and

[CMake] cmake and high-dpi support on Mac

2019-03-13 Thread René J . V . Bertin
Hi, CMake had hardcoded default support for high-dpi screens in the applications it generated for Apple's desktop OS at some point, but that was removed very quickly in 286c75f7f034c5fdcd43bcb755da74d09c809642. It is my understanding that you don't actually need to set the high-dpi key

[CMake] CMAKE_AR/NM/RANLIB require full path?!

2019-02-20 Thread René J . V . Bertin
Hi, I just got some build failures when changes to my build scripts led to configuring with -DCMAKE_AR=ar (RANLIB=ranlib, etc). The documentation isn't explicit on what these parameters expect so I assumed that it should be fine to set them to a command name, as with CMAKE__COMPILER. Wrong!

Re: [CMake] support for -fsyntax-only (and generating Qt/KDE's auto-generated content)

2018-10-09 Thread René J . V . Bertin
Sylvain Joubert wrote: > My use case is for static analysis builds. For example, my CI setup has > multiple of them including cppcheck, clang-tidy and iwyu through the > CMake integration. And since I'd like to keep separate builds for each > of them this requires 3 full build whose results I

[CMake] support for -fsyntax-only (and generating Qt/KDE's auto-generated content)

2018-10-09 Thread René J . V . Bertin
Hi, Apologies, longish post ahead. I've tried to present my idea and the thought train leading up to it as succinctly as possible. Hope I at least strike a chord! Clang and GCC have long supported an option that makes them stop after the syntax-verification stage: -fsyntax-only . This has the

[CMake] SOVERSION and Mac library id in shared library made from assembly files

2018-09-11 Thread René J . V . Bertin
Hi, I have a little project that creates a shared library from a pair of assembly files. I've been trying to follow examples such that the generated library - has versioning (libFastCompression.1.dylib on Mac or libFastCompression.so.1 on Linux) - has the full path as its ID on Mac I get

Re: [CMake] losing CMakeCache.txt after changing the compiler...

2018-06-07 Thread René J . V . Bertin
Marc CHEVRIER wrote: > If you have multiple compilers or even multiple versions of a compiler, by > managing carefully environment variables (i.e. PATH variable for example) > by using some bash functions, you can easily ensure to use always the > correct compiler for each build environment.

Re: [CMake] losing CMakeCache.txt after changing the compiler...

2018-06-06 Thread René J . V . Bertin
Marc CHEVRIER wrote: > You can easily avoid this bad experience by using different builds > environments : one per compiler ! You mean one build directory per compiler? That can be very disk-expensive, and it doesn't solve the issue (e.g. you clone an environment and then change the compiler

[CMake] losing CMakeCache.txt after changing the compiler...

2018-06-02 Thread René J . V . Bertin
Hi, This happened once too often for me: I apply successive tweaks to a CMakeCache file, reinvoke make (or ninja) and then at some point lose everything because I forgot that changing the compiler is a "lethal" operation. Why does cmake have to throw away the entire cache file when something

[cmake-developers] Suggestion: include deployment target and sysroot path in feature_summary on Mac

2017-12-12 Thread René J . V . Bertin
Hi, A thought: I know CMAKE_OSX_DEPLOYMENT_TARGET and CMAKE_OSX_SYSROOT are intended mainly to be used by users building a project as opposed to by the build system itself, but it could still be informative to include these settings in the "verbose" feature_summary() print-out. I.e.

Re: [CMake] cmake not always replacing symlinks in the path used to access a build.dir?!

2017-09-18 Thread René J . V . Bertin
WTH, apparently this can even happen without regeneration (that I know of, at least): %> CD kdevld-lnx-work/build/plugins/ wmake --MP -w ### /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-kdevelop/kf5-kdevelop-devel/work/build/plugins ### /home/bertin/script/wmake --MP -w ### Mon

[CMake] cmake not always replacing symlinks in the path used to access a build.dir?!

2017-09-18 Thread René J . V . Bertin
Hi, I'm seeing a weird issue with a large project: KDevelop. It was reorganised recently but I think that's what exposes the issue, rather than causing it. My workflow puts both source and out-of-source build directories rather deep in a dedicated "playground"; for convenience I create symlinks

Re: [CMake] setting/removing compiler flag (-g) for a single project directory

2017-09-16 Thread René J . V . Bertin
On Friday September 15 2017 16:51:24 Steven Velez wrote: >Yeah... I didn't mean to respond personally... i didn't realize my client >was doing that and not the list. OK, replying back to the list then. >What do you mean by "variables related to targets have global scope"? I probably could have

[CMake] setting/removing compiler flag (-g) for a single project directory

2017-09-15 Thread René J . V . Bertin
Hi, Is it possible to set and/or remove compiler arguments on a project subdirectory that holds a tree with sources of a considerable number of build targets? An example to make this more concrete: I have a project that contains common_libs plugins/foo plugins/this_one I'm just interested

Re: [CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-13 Thread René J . V . Bertin
Eric Noulard wrote: > From the command line I doubt it. Adding -DCMAKE_POLICY_DEFAULT_CMP0060=NEW on the commandline works. But whatever the reason, using PNG::PNG works too. Apparently policy 60 doesn't affect the IMPORTED_LOCATION target property... > Did you try to use ninja generator

Re: [CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-13 Thread René J . V . Bertin
Eric Noulard wrote: > Thanks you for digging this. > I totally ignored that "feature". I guess most of us did, it's one of those things that usually works just fine but that when it breaks sends you on a nasty quest to figure out WTF is going on (IOW, makes you doubt yourself until you

Re: [CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-12 Thread René J . V . Bertin
Andreas Naumann wrote: > cmake instrospects your compiler and asks for system directories. Just stumbled across this documentation tidbit: >>> CMAKE__IMPLICIT_LINK_DIRECTORIES -- Implicit linker search path detected for language . Compilers

Re: [CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-12 Thread René J . V . Bertin
Eric Noulard wrote: > AFAIK the explanation you gave. CMake does not seem to play with -l or -L > options. As Rolf said above, apparently it does. > the FindPNG.cmake shipped with CMake does not do that either. Indeed, it sets PNG_LIBRARY to the path of libpng, and PNG_LIBRARIES to the 2

Re: [CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-12 Thread René J . V . Bertin
Rolf Eike Beer wrote: >> It seems that clang handles that variable in a somewhat different manner >> than GCC does. Even in a very simple call on the commandline (including the >> -v option) I see it adds -L/opt/local/lib AFTER the user-supplied >> libraries, where GCC puts it before the 1st -l

Re: [cmake-developers] FindPNG.cmake doesn't return a LIBRARY_DIR variable

2017-07-12 Thread René J . V . Bertin
Rolf Eike Beer wrote: > First, FindPNG.cmake doesn't care about pkg-config files, if that is bug Yes, I noticed that after I wrote the remark about the pkg-config files, and didn't think to remove it (= I diagnosed the issue while writing the message). > or feature depends on your personal

Re: [CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-12 Thread René J . V . Bertin
FWIW, I do question this rewriting feature, because it clearly can go wrong. I'd argue that programmers (or build script/cmake modules/...) usually have good reason when they give the absolute path to a library: making darn sure it's indeed that one that gets linked. While I agree that

Re: [CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-12 Thread René J . V . Bertin
Andreas Naumann wrote: > cmake instrospects your compiler and asks for system directories. Only > these system directories will be removed and the corresponding libraries > will be linked by -l<...>. So, you should check your compiler and the > environment. I had several problems years ago with

[CMake] /path/to/libpng.so automatic conversion to -lpng ?

2017-07-12 Thread René J . V . Bertin
Hi, I have a target_link_libraries command that uses ${PNG_LIBRARIES} and thus *should* add something like `/path/to/libpng.so /path/to/libz.so` to the linker command. Instead, I am getting a linker command line that has `-lpng -lz`, which fails for me because the `/path/to` in question isn't

Re: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-)

2017-05-17 Thread René J . V . Bertin
Volker Enderlein wrote: Hi, Thanks, that helps. With there is maybe something to learn from the CMake sources, too. R. > Hello, > > according to https://sourceforge.net/p/predef/wiki/Compilers/ you could > check with > > check_cxx_source_compiles(" > #if defined (_MSC_VER) && (_MSC_VER

Re: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-)

2017-05-17 Thread René J . V . Bertin
René J.V. Bertin wrote: Bump. No one who can help here? -- 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. For more information on each offering, please

Re: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-)

2017-05-15 Thread René J . V . Bertin
On Monday May 15 2017 15:58:53 Konstantin Tokarev wrote: Hello, >Have you tried CHECK_CXX_COMPILER_FLAG? I forgot to mention: I don't have a MS dev set-up at the moment. This is for a cross-platform purposes (in KDE's extra-cmake-modules). Thanks, R -- Powered by www.kitware.com Please

[CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-)

2017-05-15 Thread René J . V . Bertin
Hello, A question that will hopefully have a quick/easy answer: I'd like to detect when the MSVC /fpermissive- (yes, that's a dash at the end) can be used instead of /Za . I know that a later update bumped the version to 14.0.25422.01 and thus undoubtedly _MSC_FULL_VER== 1402542201 in C code

Re: [cmake-developers] COMPILE_FEATURES, Mac and non-Apple clang versions

2017-01-03 Thread René J . V . Bertin
On Tuesday January 03 2017 15:23:45 Robert Maynard wrote: > Basically my recommendation is if a project isn't setting > cmake_minimum_required before the first project call than nothing you > can do will fix that, as it is an error. The issue here is not that the minimum version was NOT being

Re: [cmake-developers] COMPILE_FEATURES, Mac and non-Apple clang versions

2017-01-03 Thread René J . V . Bertin
On Tuesday January 03 2017 11:41:29 Robert Maynard wrote: > You can explicitly do both of those things currently see: > https://cmake.org/cmake/help/v3.0/manual/cmake-policies.7.html Are you sure about the minimum required version? I cannot seem to have any luck with

Re: [cmake-developers] COMPILE_FEATURES, Mac and non-Apple clang versions

2017-01-03 Thread René J . V . Bertin
On Tuesday January 03 2017 11:41:29 Robert Maynard wrote: > It is the responsibility of the project to understand what components > of CMake they require, and correctly specify a cmake_minimum required > that satisfies all those requirements. In this case to use compile > features you need a

Re: [cmake-developers] COMPILE_FEATURES, Mac and non-Apple clang versions

2017-01-03 Thread René J . V . Bertin
On Tuesday January 3 2017 10:02:44 Robert Maynard wrote: Hi, Thanks for the sample CMake file! It appears indeed that the policy defaulting to OLD is the culprit here: setting it to NEW at an appropriate location (and throwing out build.dir/CMake*) makes detection work properly. Surprised me

[cmake-developers] COMPILE_FEATURES, Mac and non-Apple clang versions

2017-01-03 Thread René J . V . Bertin
Hi, I just had a run-in with a CMake file from Qt5 in a project I've been building with a locally built Clang 3.9 version, affectionately called clang-mp-3.9 . I got the cryptic message CMake Error in src/platformtheme/CMakeLists.txt: No known features for CXX compiler "Clang"

[CMake] check_include_file for Objective C(++) triggers what looks like a clang bug (but probably isn't)

2016-09-29 Thread René J . V . Bertin
Hi, I've been trying to use the check_include_file() macro to verify if a particular ObjC header can be compiled. This turns out to be almost impossible, but I cannot put my finger on whether there isn't a compiler error involved too. Let's take the easier case for Mac OS X, where you don't

[CMake] OS X Info.plist with POSIX executables and libraries (no app/framework bundles)

2016-09-14 Thread René J . V . Bertin
Hi, I'd like to do something like set_target_properties(foo PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/MacOSXBundleInfo.plist.in) set_target_properties(foo PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.bar.foo") # etc for an application that will not be an app bundle but a

Re: [CMake] why no cumulative variable operations via the commandline?

2016-03-19 Thread René J . V . Bertin
Nicholas Braden wrote: > 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. Yes, that would be another use case! R. -- Powered by

Re: [CMake] why no cumulative variable operations via the commandline?

2016-03-19 Thread René J . V . Bertin
Nicholas Braden wrote: > sense. Could you give an example of when you would find them useful? I > think maybe I am not understanding what you want. Yeah, I realise my explanation may not have been very clear. > If you just want to pass a list of values to a variable on the command > line,

[CMake] why no cumulative variable operations via the commandline?

2016-03-19 Thread René J . V . Bertin
Hi, I've been wondering about something that is a real stumbling block in a build/distribution system like MacPorts where settings can be modified in any number of consecutive steps. For instance, depending on what dependencies a package ("port") requires and how those dependencies are

[CMake] [OS X] example CMake file to create a Preference Pane?

2016-03-09 Thread René J . V . Bertin
Hi, I'd like to experiment writing a Preference Pane for Qt-based apps. I'd prefer to use CMake instead of Xcode and wonder if someone can point me to an example CMake file that generates a proper .prefPane bundle? I'm not having much luck googling for one for now. Thanks, René -- Powered

Re: [CMake] Make CMAKE_EXPORT_COMPILE_COMMANDS not default?

2016-01-09 Thread René J . V . Bertin
Hello, Sorry for reviving an old thread (https://cmake.org/pipermail/cmake/2013-December/056517.html) but it seems to have died without a proper answer, at least one that I could find. I'd like to offer an additional reason why CMAKE_EXPORT_COMPILE_COMMANDS would be beneficial if on by

Re: [CMake] CMAKE_BUILD_TYPE and exact control of compiler options

2015-10-13 Thread René J . V . Bertin
Dan Liew wrote: > Hi, > > >> - If not, what is the best/official way to get exact control over the >> compiler and linker options used? > > I had to do something similar recently where I didn't want > ``-DNDEBUG`` to be in any of the configurations. > > I used

Re: [CMake] CMAKE_BUILD_TYPE and exact control of compiler options

2015-10-12 Thread René J . V . Bertin
René J. V. Bertin wrote: Similarly, is there a way to set preprocessor variables (cf. https://cmake.org/Bug/view.php?id=12928 which has been silent for a long time)? One could do -DINCLUDE_DIRECTORIES=${CPPFLAGS}, but that may lead to unexpected results if CPPFLAGS contains something other

[CMake] CMAKE_BUILD_TYPE and exact control of compiler options

2015-10-12 Thread René J . V . Bertin
Hello, I'm using cmake in conjunction with a packaging/distribution system that aims to control the compiler and linker flags, a priori via the usual environment variables. (We're talking about MacPorts.) Using one of the CMAKE_BUILD_TYPE presets, the value of those env. variables appears at

Re: [CMake] CMAKE_BUILD_TYPE and exact control of compiler options

2015-10-12 Thread René J . V . Bertin
Andreas Pakulat wrote: > No this is not possible in general. A CMakeLists.txt file can always just > set their own compiler/linker flags. Which would require patching each and every one of them, which isn't exactly desirable. >> - Out of curiosity, what's special about the

[CMake] --prefix commandline option?

2015-06-19 Thread René J . V . Bertin
Hello, I discovered by accident that cmake (3.2.2) apparently respects the --prefix command line option, with a result that's somewhat different from setting CMAKE_INSTALL_PREFIX. I cannot seem to find any documentation on this feature though: have I overlooked it, or is this indeed an

[CMake] --sphinx-qthelp leads to build error with CMake 3.2.3

2015-06-16 Thread René J . V . Bertin
Hi, I'm trying to build the latest CMake release, with the Qt4 gui and including the docs in Qt help format. I'm using the same recipe as for the 3.2.2 release, but now I see this: [ 95%] sphinx-build qthelp: see Utilities/Sphinx/build-qthelp.log cd /build//cmake-3.2.3/Utilities/Sphinx

Re: [CMake] determining which system headerfile provides a given function

2015-06-16 Thread René J . V . Bertin
On Monday June 15 2015 23:05:07 Alexander Neundorf wrote: if you have multiple candidate headers, try them all, and use separate result variables for every one. Is that the problem you have ? Yes. That's probably the thing I missed and why it didn't work; I used a single variable. Still, it

[CMake] wrapping a macro

2015-06-13 Thread René J . V . Bertin
Hello, Is it possible to wrap an existing macro that returns a result via one of its arguments? I think it will be clear what I would like to do from the following example: if(${INTRINSICS_TEST_TYPE} MATCHES compiles) macro(check_intrinsics_availability source var)

Re: [CMake] determining which system headerfile provides a given function

2015-06-13 Thread René J . V . Bertin
On Saturday June 13 2015 22:26:12 Alexander Neundorf wrote: did you try check_symbol_exists() and the other similar functions ? Yes, but none that I could find give any information beyond whether the symbol exists. It may be possible (or necessary) to repeat such tests trying each of the

[CMake] determining which system headerfile provides a given function

2015-06-09 Thread René J . V . Bertin
Hello, I need to determine the availability of a certain function (reallocf) and which headerfile provides its prototype. If there is a function that handles this case I must have overlooked it (including on google), so I tried repeating a check_symbol_exist() call repeatedly with the various

Re: [CMake] determining which system headerfile provides a given function

2015-06-09 Thread René J . V . Bertin
Ok, let me rephrase the question to see what other kind of constructive answers that'll lead to: how does one check which header file provides the prototype for a function from the system libraries? Function in question: reallocf; can apparently be in either stdlib.h or bsd/stdlib.h . --

[CMake] linking a C application with a C++ library

2015-06-02 Thread René J . V . Bertin
Hello, I'm trying to write a cmake file for an older project of mine, which consists of a library (mostly C++) and a few test cases one of which is a C programme to test the library's functionality exported to C. I'd like to use a single cmake file, but am getting link error on the C app, most

Re: [CMake] linking a C application with a C++ library

2015-06-02 Thread René J . V . Bertin
On Wednesday June 03 2015 02:44:29 René J.V. Bertin wrote: How do I instruct cmake to do this? never mind: set_target_properties(cseTest PROPERTIES LINKER_LANGUAGE CXX) Sorry for the noise! R. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at:

[CMake] repetitive path gives filename too long errors

2015-03-08 Thread René J . V . Bertin
Hello, I'm struggling with the py-pykde4 package, which is giving me filename overflows due to constructing a path that contains repetitions of itself. I first ran into this in November, have since updated to CMake 3.1.2, and now see that the issue hasn't been solved:

[CMake] control python exec. search from command line?

2015-02-27 Thread René J . V . Bertin
Hello, I'm trying to build a project that uses FindPythonInterp.cmake to locate the python executable. Thing is that the system I'm working on has python pointing to a 2.7 install, while the project requires Python 3.x. Is there a way to influence the search from the command line? I tried

Re: [CMake] control python exec. search from command line?

2015-02-27 Thread René J . V . Bertin
On Friday February 27 2015 10:44:11 Omar Valerio wrote: Hello Omar, Well yes I suggest you to use a FIND_LIBRARY directive inside your CMakeList.txt project file and HINT the compiler which location to prefer for the library to get linked. (

[CMake] How to find Python 2.7 libraries if 3.x is installed too

2014-11-05 Thread René J . V . Bertin
Hello, I am trying to get a not-so-old project to build (gizmod.sourceforge.net) which requires Python2.7 and libboost-python. I cannot seem to figure out how to do a find_package(PythonLibs REQUIRED) that will not consider that Python 3.4 is a suitable newer version of Python 2.7 . Is that

[CMake] how to define global compiler flags that are inserted before user-defined flags?

2014-09-03 Thread René J . V . Bertin
I was referred here from http://public.kitware.com/Bug/view.php?id=15127 ... so here goes: KDE defines a number of compiler options that are (supposedly) required but that include optimisation options. These settings are defined in system-wide .cmake files like FindKDE4Internal.cmake and get