Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Marc CHEVRIER
om/search?q=optimized.lib+cmake > > > > Regards, > > Björn > > > > > > *From:* Marc CHEVRIER > *Sent:* Thursday, October 4, 2018 6:59 PM > *To:* Björn Blissing > *Cc:* Andrew Fuller ; Eric Noulard < > eric.noul...@gmail.com>; CMake Mailinglist >

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Eric Noulard
Le jeu. 4 oct. 2018 à 18:59, Marc CHEVRIER a écrit : > I am afraid that you cannot mix "optimized" or "debug" keywords with > "generator expressions" because keywords handling is done during evaluation > of command "target_link_libraries" and "generator expressions" are > evaluated during generat

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Björn Blissing
: [CMake] Trouble with conditional generator expression inside target_link_libraries I am afraid that you cannot mix "optimized" or "debug" keywords with "generator expressions" because keywords handling is done during evaluation of command "target_link_librari

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Eric Noulard
r ninja generator whereas you get proper "-lbar" I don't know why this happen but it really looks like a bug. > > > I don’t know if other CMake functions will react similarly bad to the > list/bool operator combo. > > > > Regards, > > Björn > > >

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Marc CHEVRIER
t; list/bool operator combo. > > > > Regards, > > Björn > > > > > > *From:* Andrew Fuller > *Sent:* Thursday, October 4, 2018 6:16 PM > > > *To:* Björn Blissing ; Eric Noulard < > eric.noul...@gmail.com> > *Cc:* CMake Mailinglist > *

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Björn Blissing
LIBRARIES_OPT}>" "$<$:bar>" ) A little more verbose. From: Björn Blissing mailto:bjorn.bliss...@vti.se>> Sent: October 4, 2018 9:00:28 AM To: Andrew Fuller; Eric Noulard Cc: CMake Mailinglist Subject: RE: [CMake] Trouble with con

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Andrew Fuller
ot;$<$:bar>" ) A little more verbose. From: Björn Blissing Sent: October 4, 2018 9:00:28 AM To: Andrew Fuller; Eric Noulard Cc: CMake Mailinglist Subject: RE: [CMake] Trouble with conditional generator expression inside target_link_libraries Hi Andrew, When I put the genex ins

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Björn Blissing
Subject: Re: [CMake] Trouble with conditional generator expression inside target_link_libraries What happens if you put the genex inside double quotes? target_link_libraries(my_exe PUBLIC "$<$:${FOO_LIBRARIES}>" "$<$:bar>" )

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Andrew Fuller
19 AM To: Eric Noulard Cc: CMake Mailinglist Subject: Re: [CMake] Trouble with conditional generator expression inside target_link_libraries Hi Eric, I tried to do a self contained minimal example: cmake_minimum_required(VERSION 3.12) project(expension_error LANGUAGES CXX) add_executable(my_ex

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Björn Blissing
Cc: CMake Mailinglist Subject: Re: [CMake] Trouble with conditional generator expression inside target_link_libraries Le jeu. 4 oct. 2018 à 16:53, Björn Blissing mailto:bjorn.bliss...@vti.se>> a écrit : Hello Eric, The minimal example was just to display the expansion error. In real life

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Eric Noulard
Le jeu. 4 oct. 2018 à 16:53, Björn Blissing a écrit : > Hello Eric, > > > > The minimal example was just to display the expansion error. In real life > the code uses a Boolean variable (and the rest of the CMake code is much > larger as well). > It was just to show the expansion error you get if

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Björn Blissing
his external find module. Regards, Björn From: Eric Noulard Sent: Thursday, October 4, 2018 4:37 PM To: Björn Blissing Cc: CMake Mailinglist Subject: Re: [CMake] Trouble with conditional generator expression inside target_link_libraries Le jeu. 4 oct. 2018 à 16:06, Björn Blissing mailto

Re: [CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Eric Noulard
Le jeu. 4 oct. 2018 à 16:06, Björn Blissing a écrit : > Hello, > > > > I am having trouble with a conditional generator expression inside target > link libraries, which seems to expand incorrectly (or at least not the way > I expect). > > > > In short, I have a list of libraries that is found by

[CMake] Trouble with conditional generator expression inside target_link_libraries

2018-10-04 Thread Björn Blissing
Hello, I am having trouble with a conditional generator expression inside target link libraries, which seems to expand incorrectly (or at least not the way I expect). In short, I have a list of libraries that is found by a CMake module. The list is composed of a number of elements each preceded