From 00144cb77fd3afc05cfb4183b44e16a8bab175c0 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen Date: Sat, 19 May 2012 01:20:08 +0300 Subject: make: Make util libraries shared in non-windows systems Incremental builds take long time linking tests if utilities are modified. The link time can be eliminate if libraries are made shared. Shared libraries need to specify symbols that are excepted to be declared in executeable as weak to allow linking without symbols that aren't used in runtime. Windows has limitation that shared library can't have programs main function that forces windows to use static libraries. Signed-off-by: Pauli Nieminen Reviewed-by: Chad Versace Acked-by: Kenneth Graunke --- cmake/piglit_util.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/piglit_util.cmake b/cmake/piglit_util.cmake index 0daaad2ca..fccbadd53 100644 --- a/cmake/piglit_util.cmake +++ b/cmake/piglit_util.cmake @@ -75,7 +75,11 @@ endfunction(piglit_add_executable) function(piglit_add_library name) list(REMOVE_AT ARGV 0) - add_library(${name} ${ARGV}) + if(WIN32) + add_library(${name} ${ARGV}) + else(WIN32) + add_library(${name} SHARED ${ARGV}) + endif(WIN32) add_dependencies(${name} piglit_dispatch_gen) endfunction(piglit_add_library) -- cgit v1.2.3