[CMake] Changing definitions at compile time

2011-06-14 Thread Kfir Lavi
Hi, I need to compile the code twice. Once with -DA and once with -DB My code look like this: add_definitions(-DA) add_library(${mylib_A} SHARED ${myfiles}) remove_definitions(-DA) add_definitions(-DB) add_library(${lib_B} SHARED ${myfiles}) remove_definitions(-DB) What cmake does is to define A

Re: [CMake] Changing definitions at compile time

2011-06-14 Thread Andreas Naumann
Am 14.06.2011 18:12, schrieb Kfir Lavi: Hi, I need to compile the code twice. Once with -DA and once with -DB My code look like this: add_definitions(-DA) add_library(${mylib_A} SHARED ${myfiles}) remove_definitions(-DA) add_definitions(-DB) add_library(${lib_B} SHARED ${myfiles})

Re: [CMake] Changing definitions at compile time

2011-06-14 Thread Kfir Lavi
On Tue, Jun 14, 2011 at 8:04 PM, Andreas Naumann andreas-naum...@gmx.netwrote: Am 14.06.2011 18:12, schrieb Kfir Lavi: Hi, I need to compile the code twice. Once with -DA and once with -DB My code look like this: add_definitions(-DA) add_library(${mylib_A} SHARED ${myfiles})

Re: [CMake] Changing definitions at compile time

2011-06-14 Thread Michael Wild
On 06/14/2011 07:12 PM, Kfir Lavi wrote: On Tue, Jun 14, 2011 at 8:04 PM, Andreas Naumann andreas-naum...@gmx.net mailto:andreas-naum...@gmx.net wrote: Am 14.06.2011 18:12, schrieb Kfir Lavi: Hi, I need to compile the code twice. Once with -DA and once with -DB My code

Re: [CMake] Changing definitions at compile time

2011-06-14 Thread Andreas Naumann
Am 14.06.2011 19:26, schrieb Michael Wild: On 06/14/2011 07:12 PM, Kfir Lavi wrote: On Tue, Jun 14, 2011 at 8:04 PM, Andreas Naumann andreas-naum...@gmx.netmailto:andreas-naum...@gmx.net wrote: Am 14.06.2011 18:12, schrieb Kfir Lavi: Hi, I need to compile the code

Re: [CMake] Changing definitions at compile time

2011-06-14 Thread Michael Wild
On 06/14/2011 09:12 PM, Andreas Naumann wrote: Am 14.06.2011 19:26, schrieb Michael Wild: On 06/14/2011 07:12 PM, Kfir Lavi wrote: On Tue, Jun 14, 2011 at 8:04 PM, Andreas Naumann andreas-naum...@gmx.netmailto:andreas-naum...@gmx.net wrote: Am 14.06.2011 18:12, schrieb Kfir Lavi:

Re: [CMake] Changing definitions at compile time

2011-06-14 Thread Andreas Naumann
Am 14.06.2011 21:26, schrieb Michael Wild: On 06/14/2011 09:12 PM, Andreas Naumann wrote: Am 14.06.2011 19:26, schrieb Michael Wild: On 06/14/2011 07:12 PM, Kfir Lavi wrote: On Tue, Jun 14, 2011 at 8:04 PM, Andreas Naumann