This patch allows various compiler options as arguments to llvm_{multi,single}source().
Both now accept following optional arguments that are used in addition to
those specified via CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS variables. This
allows adjusting build parameters for specific target without having to
modify global variables which makes build files somewhat less verbose.
In addition to global option, I've added two flags to further customize llvm
test target: LIBS and DEPS. This allows more control over targets that need
extra dependencies or need to link with shared libraries in non-standard directories.
- CFLAGS/CXXFLAGS/CPPFLAGS -- added to COMPILE_FLAGS property
- LDFLAGS -- added to LINK_LIBRARIES property
- LIBS -- applies target_link_libraries() which allows cmake to pass proper flags like rpath for shared libraries.
- DEPS -- applies add_dependencies()
This change allows reducing amount of boilerplate for most of the simple test cases.
Upcoming patch converts MultiSource/* build files to use this functionality.