mirror of https://github.com/davisking/dlib.git
Made the dlib shared library build dependent on the static library build. This
is because some build systems seem to mess up the parallel build of these two things and sometimes rebuild and potentially clobber object files during the parallel build. I haven't seen this result in a problem, but the race condition does seem to exist in some build systems. So this should force the two top level targets to be build sequentially rather than in parallel, thus avoiding any possible race condition.
This commit is contained in:
parent
7bf01102d5
commit
b93b6f36a4
|
@ -185,6 +185,7 @@ if (NOT TARGET dlib)
|
|||
add_library(dlib STATIC ${source_files} )
|
||||
if (UNIX AND NOT DLIB_IN_PROJECT_BUILD)
|
||||
add_library(dlib_shared SHARED ${source_files} )
|
||||
add_dependencies(dlib_shared dlib)
|
||||
endif()
|
||||
else()
|
||||
|
||||
|
@ -631,8 +632,10 @@ if (NOT TARGET dlib)
|
|||
if (UNIX AND NOT DLIB_IN_PROJECT_BUILD)
|
||||
if (DLIB_USE_CUDA)
|
||||
cuda_add_library(dlib_shared SHARED ${source_files} )
|
||||
add_dependencies(dlib_shared dlib)
|
||||
else()
|
||||
add_library(dlib_shared SHARED ${source_files} )
|
||||
add_dependencies(dlib_shared dlib)
|
||||
endif()
|
||||
target_link_libraries(dlib_shared ${dlib_needed_libraries} )
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue