Commit b93b6f36 authored by Davis King's avatar Davis King

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.
parent 7bf01102
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment