diff options
author | Pauli Nieminen <pauli.nieminen@linux.intel.com> | 2012-05-19 01:20:08 +0300 |
---|---|---|
committer | Pauli Nieminen <pauli.nieminen@linux.intel.com> | 2012-06-04 21:33:57 +0300 |
commit | 700c38b09b3163d1d789d778137b939de9c647e2 (patch) | |
tree | 39b788f125814b7d267b87fe3c852a95dac0a79d /cmake | |
parent | 7788efd885539eaf5ee4a49d5a230e3912c7d614 (diff) |
make: Make util libraries shared in non-windows systemsshared_piglit_util
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 <pauli.nieminen@linux.intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/piglit_util.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/piglit_util.cmake b/cmake/piglit_util.cmake index 0daaad2c..fccbadd5 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) |