[CMake] BUILD_INTERFACE genex used even in install(EXPORT...

Mueller-Roemer, Johannes Sebastian Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de
Tue Nov 25 09:11:18 EST 2014


For clarification:

As an imported target can't have debug and optimized keywords, I can't simply use
$<BUILD_INTERFACE:${Boost_LIBRARIES}> $<INSTALL_INTERFACE:\${Boost_LIBRARIES}>
But have to do
$<BUILD_INTERFACE:
	$<$<CONFIG:Debug>:
		${Boost_COROUTINE_LIBRARY_DEBUG}
		${Boost_CONTEXT_LIBRARY_DEBUG}
		${Boost_SYSTEM_LIBRARY_DEBUG}
	>
	$<$<NOT:$<CONFIG:Debug>>:
		${Boost_COROUTINE_LIBRARY_RELEASE}
		${Boost_CONTEXT_LIBRARY_RELEASE}
		${Boost_SYSTEM_LIBRARY_RELEASE}
	>
>
$<INSTALL_INTERFACE:
	$<$<CONFIG:Debug>:
		\${Boost_COROUTINE_LIBRARY_DEBUG}
		\${Boost_CONTEXT_LIBRARY_DEBUG}
		\${Boost_SYSTEM_LIBRARY_DEBUG}
	>
	$<$<NOT:$<CONFIG:Debug>>:
		\${Boost_COROUTINE_LIBRARY_RELEASE}
		\${Boost_CONTEXT_LIBRARY_RELEASE}
		\${Boost_SYSTEM_LIBRARY_RELEASE}
	>
>

Instead which is excessively verbose...

--
Johannes S. Mueller-Roemer, MSc
Wiss. Mitarbeiter - Interactive Engineering Technologies (IET)

Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-606  |  Fax +49 6151 155-139
johannes.mueller-roemer at igd.fraunhofer.de  |  www.igd.fraunhofer.de


-----Original Message-----
From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Stephen Kelly
Sent: Tuesday, November 25, 2014 15:05
To: cmake at cmake.org
Subject: Re: [CMake] BUILD_INTERFACE genex used even in install(EXPORT...

Mueller-Roemer, Johannes Sebastian wrote:

> It appears that wasn't really the issue, but rather that I had my 
> CMake minimum version set to 2.8.11 and not 2.8.12.

See the reply from Nils and the documentation link I posted previously.

> Is there a cleaner solution
> for the "debug" and "optimized" keyword issue than using individual 
> library variables?

I don't fully understand the question. Imported targets for Boost would be cleaner, but there's no one submitting and maintaining such a thing. There was a discussion that could be picked up though.

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10332/focus=10370

Thanks,

Steve.


-- 

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


More information about the CMake mailing list