Re: [CMake] cmake - two targets that depends on single static library that should be compiled based on the target that is being built

2019-07-17 Thread Marc Herbert
> > > I have a static library and two target executables, let's call them > **libA**, **EXE1**, **EXE2**. > > If I am building EXE2, I need to disabled the macros in libA and don't > link to another library. > [...] > I don't want to create two targets with same source files. > I'm curious why

Re: [CMake] cmake - two targets that depends on single static library that should be compiled based on the target that is being built

2019-07-02 Thread ugesh reddy
Ok, seems there is no other way then. Thank you for the clarification. On Tue, Jul 2, 2019 at 3:44 PM Kyle Edwards wrote: > On Tue, 2019-07-02 at 14:18 +0200, ugesh reddy wrote: > > Hello, > > > > I couldn't find any solution's for this problem even after posting > > the question on

Re: [CMake] cmake - two targets that depends on single static library that should be compiled based on the target that is being built

2019-07-02 Thread Kyle Edwards
On Tue, 2019-07-02 at 14:18 +0200, ugesh reddy wrote: > Hello, > > I couldn't find any solution's for this problem even after posting > the question on Reddit/stack overflow, so I am posting it here. > > My question is as follows: > > I have a static library and two target executables, let's

[CMake] cmake - two targets that depends on single static library that should be compiled based on the target that is being built

2019-07-02 Thread ugesh reddy
Hello, I couldn't find any solution's for this problem even after posting the question on Reddit/stack overflow, so I am posting it here. My question is as follows: I have a static library and two target executables, let's call them **libA**, **EXE1**, **EXE2**. **libA** has pre-processor