[CMake] target_link_libraries fails if one of the libraries is	NOTFOUND
    Vyacheslav Karamov 
    vkaramov at yandex.ru
       
    Sun Oct 14 14:59:14 EDT 2012
    
    
  
Hi All!
I've found annoying bug in Cmake 2.8.8 for Linux. I tried to submit it to Cmake bug tracker, but I couldn't register.
My target which is dynamic library, uses some static libs:
target_link_libraries(${lib_name} 
debug ${do_scoring_debug}
optimized ${do_scoring}
)
When I tried to build Release configuration of my library, build fails because do_scoring_debug == NOTFOUND at that time.
It seems strange to me, because linker doesn't need *Debug* version of ${do_scoring} when building *Release* version of target.
I've found workaraound
if (NOT do_scoring_debug)
set (do_scoring_debug do_scoring)
endif()
but it seems to strange why should I need it.
___
WBR,
Vyacheslav Karamov.
    
    
More information about the CMake
mailing list