mirror of
https://github.com/google/benchmark.git
synced 2025-01-27 20:30:15 +08:00
Add export linker flags policy to cmake (#251)
Add policy CMP0056, which honors the link flags in try_compile and try_run. This allows for building against non-system libc++ by providing the correct -L and rpath options in a containing project. For example: set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L ${LLVM_ROOT}/lib -l c++ -l c++abi") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,${LLVM_ROOT}/lib")
This commit is contained in:
parent
885ca41cf8
commit
2149577f89
@ -3,6 +3,7 @@ project (benchmark)
|
||||
|
||||
foreach(p
|
||||
CMP0054 # CMake 3.1
|
||||
CMP0056 # export EXE_LINKER_FLAGS to try_run
|
||||
)
|
||||
if(POLICY ${p})
|
||||
cmake_policy(SET ${p} NEW)
|
||||
|
Loading…
Reference in New Issue
Block a user