1# Copyright (c) 2014 Thomas Heller 2# Copyright (c) 2011 Bryce Lelbach 3# 4# Distributed under the Boost Software License, Version 1.0. (See accompanying 5# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 7if(NOT DEFINED HPX_LIBRARIES) 8 set(HPX_LIBRARIES CACHE INTERNAL "" FORCE) 9endif() 10 11macro(hpx_libraries) 12 set(_libs) 13 set(_keyword "") 14 set(_skip FALSE) 15 foreach(lib ${ARGN}) 16 if(lib STREQUAL "debug" OR 17 lib STREQUAL "general" OR 18 lib STREQUAL "optimized") 19 set(_keyword ${lib}) 20 set(_skip TRUE) 21 else() 22 set(_skip FALSE) 23 endif() 24 25 if(NOT _skip) 26 list(FIND HPX_LIBRARIES "${lib}" _found) 27 if(_found EQUAL -1) 28 set(_libs ${_libs} ${_keyword} ${lib}) 29 endif() 30 set(_keyword "") 31 set(_skip FALSE) 32 endif() 33 endforeach() 34 set(HPX_LIBRARIES ${HPX_LIBRARIES} ${_libs} CACHE INTERNAL "" FORCE) 35endmacro() 36