<div dir="ltr">Hi,<br>I need to compile the code twice. Once with -DA and once with -DB<br>My code look like this:<br>add_definitions(-DA)<br>add_library(${mylib_A} SHARED ${myfiles})<br>remove_definitions(-DA)<br><br>add_definitions(-DB)<br>

add_library(${lib_B} SHARED ${myfiles})<br>remove_definitions(-DB)<br><br>What cmake does is to define A and then remove it, so in compile time, there <br>is now definition of A or B. <br><br>How do I tell cmake that the remove needs to  be in compile time?<br>

<br>Regards,<br>Kfir<br></div>