Re: [CMake] Benchmarking with CMake

2015-11-12 Thread Alexander Neundorf
On Monday, November 09, 2015 23:21:58 Nagy-Egri Máté Ferenc via 
CMake wrote:
> Hi!
> 
> Can anyone tell me if CMake (or CTest) can be customized in a way to 
produce
> decent benchmark output? An .xlsx perhaps, or something GnuPlot 
friendly? I
> have not found any examples of CTest being (ab)used in this way.
> 
> Is my feeling correct, that this should be something like CBench?


depending on what you want...
You can make your test output  tags, and cdash will 
create graphs from the measured numbers. I think they can also be 
exported to csv.

Alex

-- 

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 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/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] SuperProject package/install

2015-11-12 Thread Knox, Kent
[rm] Right now, the Main ExternalProject_add INSTALL_COMMAND is "".  How can I 
change this (or add another step) to build the package target (I don't want to 
just hard-code make package, as it should work with MSVC too).  I've tried 
things like '${CMAKE_COMMAND} cmake--build package' but haven't had any luck.

[kk]  'package' is a target of your generated build environment.  You can 
specify to 'cmake --build' a target of your choosing.  Look at the '--build' 
docs here:
https://cmake.org/cmake/help/v3.3/manual/cmake.1.html

BUILD_COMMAND ${CMAKE_COMMAND} --build  --target package

[rm] Once I get package running, how can I get the system to copy the resulting 
*.zip file out to the top level directory? 

[kk]  Add a custom step to your external project, which depends on the 
build/install step to finish to copy whatever you want

ExternalProject_Add_Step( myEPname copyPackage
  COMMAND ${CMAKE_COMMAND} -E copy_directory ${myLibDir} 
${packageDir}/${LIB_DIR}
  COMMAND ${CMAKE_COMMAND} -E copy_directory /include 
${packageDir}/include
  DEPENDEES build
)

--

Message: 1
Date: Wed, 11 Nov 2015 11:04:13 -0800
From: Rob McDonald 
To: CMake ML 
Subject: [CMake] SuperProject package/install
Message-ID:

Content-Type: text/plain; charset=UTF-8

All,

I have a SuperProject set up with ExternalProject_add the way some
other projects do.

The SuperProject has two EP's -- Libraries and Main.  Libraries has a
bunch of its own EP's.  Main is my core project.

When some users use this setup, they're confused at the end --
everything has worked, but the project hasn't been installed, and the
results of compilation are buried several directories deep.

My Main project has a 'package' target set up by CPack.  I'd like the
SuperProject to conclude by executing that build target, and then
copying the resulting file to the top-level build directory from the
SuperProject.  To complicate things, the target file name is not
fixed, it uses the version number -- which is not known to the
SuperProject level.

Right now, the Main ExternalProject_add INSTALL_COMMAND is "".  How
can I change this (or add another step) to build the package target (I
don't want to just hard-code make package, as it should work with MSVC
too).  I've tried things like '${CMAKE_COMMAND} cmake--build package'
but haven't had any luck.

Once I get package running, how can I get the system to copy the
resulting *.zip file out to the top level directory?  I'd like it to
end up in the CMake build directory at the top of the SuperProject,
but I haven't figured out how to make that happen yet.

Thanks,

Rob
-- 

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 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/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] [ANNOUNCE] CMake 3.4.0 Released

2015-11-12 Thread Robert Maynard
I am proud to announce that CMake 3.4.0 is now available for download at:
  https://cmake.org/download/

Documentation is available at:
  https://cmake.org/cmake/help/v3.4

Release notes appear below and are also published at
  https://cmake.org/cmake/help/v3.4/release/3.4.html

Some of the more significant features of CMake 3.4 are:

* The "if()" command learned a new "TEST" operator that evaluates to
  true if a given test name has been defined by the "add_test()"
  command.  See policy "CMP0064".

* The "install(DIRECTORY)" command "DESTINATION" option learned to
  support "generator expressions".

* The "install(FILES)" command "DESTINATION" option learned to
  support "generator expressions".

* CMake learned to honor "*.manifest" source files with MSVC tools.
  Manifest files named as sources of ".exe" and ".dll" targets will be
  merged with linker-generated manifests and embedded in the binary.


Deprecated and Removed Features:

* The "CMakeExpandImportedTargets" module is now documented as
  deprecated.  See module documentation for an explanation.

* The "CMAKE_USE_RELATIVE_PATHS" variable no longer has any effect.
  Previously it was partially implemented and unreliable.


CMake 3.4 Release Notes
***

Changes made since CMake 3.3 include the following.


New Features



Generators
--

* The "Visual Studio 14 2015" generator learned to select a Windows
  10 SDK based on the value of the "CMAKE_SYSTEM_VERSION" variable and
  the SDKs available on the host.

* CMake learned rudimentary support for the Apple Swift language.
  When using the "Xcode" generator with Xcode 6.1 or higher, one may
  enable the "Swift" language with the "enable_language()" command or
  the "project()" command (this is an error with other generators or
  when Xcode is too old).  Then one may list ".swift" source files in
  targets for compilation.


Commands


* The "find_program()" command learned a "NAMES_PER_DIR" option to
  consider all given "NAMES" in each directory before moving on to the
  next directory.

* The "get_filename_component()" command learned a new "BASE_DIR"
  subcommand.  This is used to specify a base directory when
  calculating an absolute path from a relative path.

* The "if()" command learned a new "TEST" operator that evaluates to
  true if a given test name has been defined by the "add_test()"
  command.  See policy "CMP0064".

* The "install(DIRECTORY)" command "DESTINATION" option learned to
  support "generator expressions".

* The "install(FILES)" command "DESTINATION" option learned to
  support "generator expressions".

* The "string()" command learned a new "APPEND" subcommand.


Variables
-

* The Makefile Generators and the "Ninja" generator learned to add
  compiler launcher tools like distcc and ccache along with the
  compiler for "C" and "CXX" languages.  See the
  "CMAKE__COMPILER_LAUNCHER" variable and
  "_COMPILER_LAUNCHER" target property for details.

* New "CMAKE_LINK_SEARCH_START_STATIC" and
  "CMAKE_LINK_SEARCH_END_STATIC" variables were introduced to
  initialize the "LINK_SEARCH_START_STATIC" and
  "LINK_SEARCH_END_STATIC" target properties, respectively.


Properties
--

* Visual Studio Generators learned to support additonal target
  properties to customize projects for NVIDIA Nsight Tegra Visual
  Studio Edition:

  * "ANDROID_ANT_ADDITIONAL_OPTIONS"

  * "ANDROID_ARCH"

  * "ANDROID_ASSETS_DIRECTORIES"

  * "ANDROID_JAR_DEPENDENCIES"

  * "ANDROID_JAR_DIRECTORIES"

  * "ANDROID_JAVA_SOURCE_DIR"

  * "ANDROID_NATIVE_LIB_DEPENDENCIES"

  * "ANDROID_NATIVE_LIB_DIRECTORIES"

  * "ANDROID_PROCESS_MAX"

  * "ANDROID_PROGUARD"

  * "ANDROID_PROGUARD_CONFIG_PATH"

  * "ANDROID_SECURE_PROPS_PATH"

  * "ANDROID_SKIP_ANT_STEP"

  * "ANDROID_STL_TYPE"

* The "ARCHIVE_OUTPUT_DIRECTORY", "LIBRARY_OUTPUT_DIRECTORY", and
  "RUNTIME_OUTPUT_DIRECTORY" target properties learned to support
  "generator expressions".

* The "SOURCE_DIR" and "BINARY_DIR" target properties were
  introduced to allow project code to query where a target is defined.

* The "OUTPUT_NAME" target property and its variants learned to
  support "generator expressions".

* A "TARGET_MESSAGES" global property was added to tell the Makefile
  Generators whether to generate commands to print output after each
  target is completed.

* On Windows with MS-compatible tools, CMake learned to optionally
  generate a module definition (".def") file for "SHARED" libraries.
  See the "WINDOWS_EXPORT_ALL_SYMBOLS" target property.


Modules
---

* The "ExternalProject" module "ExternalProject_Add()" function
  "GIT_SUBMODULES" option now also limits the set of submodules that
  are initialized in addition to the prior behavior of limiting the
  set of submodules that are updated.

* The "ExternalProject" module learned new "USES_TERMINAL" arguments
  for giving steps exclusive terminal access.  This is useful with the
  "Ninja" generator to monitor CMake super

Re: [CMake] Custom message if target fails

2015-11-12 Thread Daniel Schepler
I'm assuming this is under a Unix platform - in my experience, on Windows, I 
get the color escape codes even running cmake builds under Jenkins.  On Unix 
platforms, you could install expect and use the unbuffer tool, e.g. "unbuffer 
make -j8 -k".
-- 
Daniel Schepler

From: CMake [cmake-boun...@cmake.org] on behalf of Daniel Wirtz 
[daniel.wi...@simtech.uni-stuttgart.de]
Sent: Thursday, November 12, 2015 2:05 AM
To: cmake@cmake.org
Subject: Re: [CMake] Custom message if target fails

Hey,

neat idea, i've tried and it works (i have custom targets there).
However, the "nice" colored build text output of such a solution gets
lost completely (pipes etc); are there any alternative ideas/solutions?

thanks again!

Dr. Daniel Wirtz
Dipl. Math. Dipl. Inf.
SRC SimTech
Pfaffenwaldring 5a
+49 711 685 60044

On 11/12/2015 10:10 AM, Nils Gladitz wrote:
> On 11/12/2015 09:54 AM, Daniel Wirtz wrote:
>> Dear all,
>>
>> i've been thinking on this for a while but i can't seem to get my
>> head around how to solve this.
>> The task is simple: How can i display a custom error message if a
>> target fails to build for whatever reason?
>> - cmake ..
>> - make
>> - 
>> - below the (compile-tool dependent error output) i'd like to print
>> something like "Whoops it went wrong, type this and that or visit
>> this or that website for help"
>>
>
> There is no generic build system feature for this.
>
> You haven't provided any details on what kind of target this concerns
> or what is to be diagnosed specifically but ...
>
> Assuming this is a custom target / custom command you could replace
> the actual command with a wrapper (e.g. cmake -P script) that:
> - runs the actual command (e.g. execute_process())
> - outputs a message based on the actual command's exit status
> (e.g. message("This and that"))
> - exits with (roughly) the same exit status as the actual command
> (e.g. message(FATAL_ERROR) on failure))
>
> For regular build targets (executables, libraries) there is nothing to
> be done at build time.
> Depending on what it is you are actually diagnosing you might want to
> try to diagnose it during configuration rather than during the build.
>
> Nils

--

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 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/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

-- 

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 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/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] SuperProject package/install

2015-11-12 Thread Alan W. Irwin

On 2015-11-11 11:04-0800 Rob McDonald wrote:


Right now, the Main ExternalProject_add INSTALL_COMMAND is "".  How
can I change this (or add another step) to build the package target (I
don't want to just hard-code make package, as it should work with MSVC
too).  I've tried things like '${CMAKE_COMMAND} cmake--build package'
but haven't had any luck.


Hi Rob:

Here is what I suggest you use:

INSTALL_COMMAND ${INSTALL_COMMAND}

where for the Unix-like case (Linux, Mac OS X, Cygwin,
MinGW-w64/MSYS2, etc) I recommend you set the INSTALL_COMMAND variable to
something like

${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_BUILD_COMMAND} install

where ENV_EXECUTABLE is the Unix env command, PATH is set
appropriately for that command, and EPA_PARALLEL_BUILD_COMMAND is
typically "make -j4".  Of course, this logic is currently only suitable for
the Unix case, but once I extend my own epa_build project to use MSVC, I
plan to set the INSTALL_COMMAND variable to whatever is appropriate
("nmake install"?) for that case.

Hope these ideas help.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__
--

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 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/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Porting to CMAKE and utilizing the CPack

2015-11-12 Thread Matthew Keeler
Installing arbitrary files is accomplished by adding install commands into your 
CMakeLists. The documentation for the command is here: 
https://cmake.org/cmake/help/v3.3/command/install.html

For something like an init script or systemd unit file they are going to live 
outside the normal installation prefix. So you will need to do something like 
the following:

if (IS_DIRECTORY /usr/lib/systemd/system)
install(FILES myprog.service DESTINATION /usr/lib/systemd/system)
else()
install(FILES myprog DESTINATION /etc/init.d)
endif()

That code block will install the myprog.service file into 
/usr/lib/systemd/system if that directory exists and if not will install the 
myprog file (init script) int /etc/init.d

I have found that checking if the usual systemd directory exists is sufficient 
to determine that systemd is present on the build system. If you are compiling 
on one debian version but want to support multiple versions then you will most 
likely install your init script and systemd files into some place specific to 
your application and use a post install script to detect which version should 
get installed. This will however bypass the package manager for installing 
these and thus if the package is removed/altered dpkg wont handle anything for 
you regarding these files.

Check out the CpackDeb documentation for all the various variables that can be 
set to alter how the package builds and installs: 
https://cmake.org/cmake/help/v3.3/module/CPackDeb.html
In particular if you need to have postinstall scripts then you will want to set 
the variable CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
--
Matt Keeler


On November 12, 2015 at 07:37:14, Šimon Tóth 
(t...@fi.muni.cz) wrote:

I have managed to port my SW to CMake fine, but now I'm running into
issues with the CPack package generation (debian packages for now).

I'm using the "dh_" commands in the package generation for debian.
What would be the equivalent in CMake? In particular, installing cron
scripts, init.d scripts and systemd service files.

Also is there a way to detect the presence systemd (and install systemd
service file if this is the case, init.d script otherwise)?

--
RNDr. Šimon Tóth
FI@MU (t...@fi.muni.cz) | CESNET (si...@cesnet.cz)
--

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 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/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
-- 

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 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/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Porting to CMAKE and utilizing the CPack

2015-11-12 Thread Šimon Tóth
I have managed to port my SW to CMake fine, but now I'm running into 
issues with the CPack package generation (debian packages for now).


I'm using the "dh_" commands in the package generation for debian. 
What would be the equivalent in CMake? In particular, installing cron 
scripts, init.d scripts and systemd service files.


Also is there a way to detect the presence systemd (and install systemd 
service file if this is the case, init.d script otherwise)?


--
RNDr. Šimon Tóth
FI@MU (t...@fi.muni.cz) | CESNET (si...@cesnet.cz)
--

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 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/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Custom message if target fails

2015-11-12 Thread Daniel Wirtz

Hey,

neat idea, i've tried and it works (i have custom targets there).
However, the "nice" colored build text output of such a solution gets 
lost completely (pipes etc); are there any alternative ideas/solutions?


thanks again!

Dr. Daniel Wirtz
Dipl. Math. Dipl. Inf.
SRC SimTech
Pfaffenwaldring 5a
+49 711 685 60044

On 11/12/2015 10:10 AM, Nils Gladitz wrote:

On 11/12/2015 09:54 AM, Daniel Wirtz wrote:

Dear all,

i've been thinking on this for a while but i can't seem to get my 
head around how to solve this.
The task is simple: How can i display a custom error message if a 
target fails to build for whatever reason?

- cmake ..
- make
- 
- below the (compile-tool dependent error output) i'd like to print 
something like "Whoops it went wrong, type this and that or visit 
this or that website for help"




There is no generic build system feature for this.

You haven't provided any details on what kind of target this concerns 
or what is to be diagnosed specifically but ...


Assuming this is a custom target / custom command you could replace 
the actual command with a wrapper (e.g. cmake -P script) that:

- runs the actual command (e.g. execute_process())
- outputs a message based on the actual command's exit status 
(e.g. message("This and that"))
- exits with (roughly) the same exit status as the actual command 
(e.g. message(FATAL_ERROR) on failure))


For regular build targets (executables, libraries) there is nothing to 
be done at build time.
Depending on what it is you are actually diagnosing you might want to 
try to diagnose it during configuration rather than during the build.


Nils


--

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 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/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Configuration dependent link

2015-11-12 Thread Stephan Menzel
Hey all,

I have a few more findings about this before I finally give up and resort
my old self made approach: It looks to me like the imported target
mechanism is not propagating properties the way it could and probably
should. Es specially not like it is described here:
https://cmake.org/cmake/help/v3.4/command/target_link_libraries.html

As an example consider the following example in which I try to create an
imported target out of boost, taking the FindBoost Module as import:

set(BOOST_REQUIRED_COMPONENTS
atomic
chrono
date_time
filesystem
iostreams
log
math_tr1
program_options
random
regex
serialization
signals
system
unit_test_framework
thread
)

find_package(Boost ${Boost_REQUIRED_VERSION} REQUIRED COMPONENTS
${BOOST_REQUIRED_COMPONENTS}
)

add_library(sys::boost SHARED IMPORTED GLOBAL)

function(add_boost_imported_target component_name)
if (NOT DEFINED component_name)
message(SEND_ERROR "Error, the variable 'component_name' is not
defined!")
else()
boost_target_name(${component_name} target prefix)

add_library(${target} SHARED IMPORTED GLOBAL)

set_property(TARGET ${target} PROPERTY
INTERFACE_LINK_LIBRARIES_DEBUG ${${prefix}_LIBRARY_DEBUG})
set_property(TARGET ${target} PROPERTY
INTERFACE_LINK_LIBRARIES_RELEASE ${${prefix}_LIBRARY_RELEASE})
set_property(TARGET ${target} PROPERTY
INTERFACE_LINK_LIBRARIES_RELWITHDEBINFO ${${prefix}_LIBRARY_RELEASE})
set_property(TARGET ${target} PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
set_property(TARGET ${target} PROPERTY INCLUDE_DIRECTORIES
${Boost_INCLUDE_DIR})

target_link_libraries(sys::boost INTERFACE ${target})
endif()
endfunction(add_boost_imported_target)

foreach (comp ${BOOST_REQUIRED_COMPONENTS})
add_boost_imported_target(${comp})
endforeach()


Now as far as I can tell this should give me an IMPORTED target called
sys::boost and create a number of sub-targets for each boost components.
This appeared necessary to me as there is no way to have one sys::boost
with multiple IMPLIBs on it.

Alas, the target doesn't contain any libs at all:

get_target_property(libs sys::boost LINK_LIBRARIES_DEBUG)
message ("boost link:  ${libs}")

will yield empty output. However the manual clearly states that

"Usage requirements are propagated by reading the INTERFACE_ variants of
target properties from dependencies and appending the values to the non-
INTERFACE_ variants of the operand."

So INTERFACE_LINK_LIBRARIES_DEBUG of, say, sys::boost_atomic should appear
as LINK_LIBRARIES_DEBUG of sys::boost_atomic. Which is not the case and in
my opinion a bug.

Which means I cannot have imported targets depending on each other (and
propagating their libs) to create a structure with multiple implibs, nor
can I put multiple implibs in one imported target. At least not for MSVC.
As much as I liked the approach of IMPORTED libs, this forces me to go back
to the self made scripts.
I just wanted to put it out here in case anybody attempts the same.

Cheers,
Stephan
-- 

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 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/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Custom message if target fails

2015-11-12 Thread Nils Gladitz

On 11/12/2015 09:54 AM, Daniel Wirtz wrote:

Dear all,

i've been thinking on this for a while but i can't seem to get my head 
around how to solve this.
The task is simple: How can i display a custom error message if a 
target fails to build for whatever reason?

- cmake ..
- make
- 
- below the (compile-tool dependent error output) i'd like to print 
something like "Whoops it went wrong, type this and that or visit this 
or that website for help"




There is no generic build system feature for this.

You haven't provided any details on what kind of target this concerns or 
what is to be diagnosed specifically but ...


Assuming this is a custom target / custom command you could replace the 
actual command with a wrapper (e.g. cmake -P script) that:

- runs the actual command (e.g. execute_process())
- outputs a message based on the actual command's exit status (e.g. 
message("This and that"))
- exits with (roughly) the same exit status as the actual command 
(e.g. message(FATAL_ERROR) on failure))


For regular build targets (executables, libraries) there is nothing to 
be done at build time.
Depending on what it is you are actually diagnosing you might want to 
try to diagnose it during configuration rather than during the build.


Nils
--

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 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/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Custom message if target fails

2015-11-12 Thread Daniel Wirtz

Dear all,

i've been thinking on this for a while but i can't seem to get my head 
around how to solve this.
The task is simple: How can i display a custom error message if a target 
fails to build for whatever reason?

- cmake ..
- make
- 
- below the (compile-tool dependent error output) i'd like to print 
something like "Whoops it went wrong, type this and that or visit this 
or that website for help"


i know this should ALSO be in the documentation, but you know how people 
intuitively avoid reading those important parts :-)


any help/ideas are appreciated.

--
Dr. Daniel Wirtz
Dipl. Math. Dipl. Inf.
SRC SimTech
Pfaffenwaldring 5a
+49 711 685 60044

--

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 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/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake