[CMake] Recompile with different flags
Adam Weiss
cseadam+cmake at gmail.com
Mon Jan 19 16:44:49 EST 2009
I am still fairly new to cmake, and I am not sure how to make
configurations. Let me see if I can provide some more details.
The hope is that a third party can run:
mkdir build
cd build
cmake ..
make
and have both libraries built. A less graceful way I was considering
was to have cmake copy all the files that need the flag set and then
use the copies to build the second version of the library. If you
could elaborate on how to build configurations of a library I would
appreciate it.
-Adam
On Mon, Jan 19, 2009 at 4:10 PM, Dmytro Ovdiienko
<dmitriy.ovdienko at gmail.com> wrote:
>
> Adam,
>
> How about two configurations for your library: cfg_1, cfg_2.
> cfg_1 - is configuration without flag.
> cfg_2 - is configuration with flag.
>
> 2009/1/19 Adam Weiss <cseadam+cmake at gmail.com>
>>
>> I couldn't find an answer to this, so I thought I should ask.
>>
>> I have a set of source files that are compiled and built into a library. Works great.
>> Now I want to recompile those same files with a compiler flag added into another library. Don't ask, this is how it has to be.
>>
>> I tried doing add_library, then set_source_files_properties, then add_library but then the flag is set for both.
>>
>> I would like to keep it all inside of one CMakeLists.txt file, but I might be able to work it out another way.
>>
>>
>> Thanks for any help,
>> Adam
>> _______________________________________________
>> CMake mailing list
>> CMake at cmake.org
>> http://www.cmake.org/mailman/listinfo/cmake
>
More information about the CMake
mailing list