[CMake] Delayed build of shared lib when building static and shared
Gavin Beatty
gavinbeatty at gmail.com
Tue Dec 23 07:21:48 EST 2008
Hello,
My project builds using a proj_static and proj_shared target and
changing the OUTPUT_NAME property on each.
_Only_ on SLES 10sp1 have I run into the problem where the shared
library is not build after a make. A second make builds the so.
Here is a test case:
<CMakeLists.txt>
project(test)
cmake_minimum_required(VERSION 2.6)
add_library(shared SHARED source.cpp)
add_library(static STATIC source.cpp)
set_target_properties(shared static
PROPERTIES OUTPUT_NAME newname
)
</CMakeLists.txt>
<source.cpp>
void do_nothing()
{
return;
}
</source.cpp>
Removing the set_target_properties call causes the so to be created
after the first make (as normal).
I am using cmake-2.6.2 built from source. The same test case builds
successfully after first make on any other system I've tried.
--
Gavin Beatty
SEMPER UBI SUB UBI
More information about the CMake
mailing list