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 r
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 hav
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 so
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 keep
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 v
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
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 o
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 th
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 replaci
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 op
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
requi
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 typically
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 realise
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 inst
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 in
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
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
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 Se
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 ch
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 -
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.
That
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 this
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
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 don'
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! C
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
explici
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 ju
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 up
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 the
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 ev
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
-D
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. (
>http://www.cmake.org/cmake/help/v3.0/command/find_l
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:
https://mail.kde.org/pipe
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
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:
http://
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 k
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 .
--
Pow
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)
check_c_source_
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 poss
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,
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
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 undocume
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
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
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_BUILD_TYPE=Deb
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 ``CMAKE_USER_MAKE_RULES_OVERRIDE
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 default
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 b
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 installe
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, separ
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 www.kitware
Hi,
So how hard would it be to support syntax like
-DFOO+=bar
or even
-DFOO-=bar
on cmake's command line? Where would I have to start poking around if I wanted
to make a draft/PoC implementation?
Thanks,
René
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake
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 ap
53 matches
Mail list logo