Commit 846b2ba1 authored by hitstergtd's avatar hitstergtd

Problem: Linker search path warnings on OS X

Problem:
A per-test Linker search path was added in commit a911fa41 to CMakeLists.txt as
part of fixing Windows builds. Whilst this is silently ignored by ld(1) on
Linux, it doesn't settle well with OS X. Spurious warnings are generated about
missing directories leading to convoluted build logs.

Solution:
Make per-Test LINK_DIRECTORIES() conditional for non-Apple platforms.
parent 136870f2
...@@ -131,7 +131,10 @@ foreach(test ${tests}) ...@@ -131,7 +131,10 @@ foreach(test ${tests})
# it will only link correctly for DEBUG builds in Windows (I don't know how to specify the target and target library in CMake) # it will only link correctly for DEBUG builds in Windows (I don't know how to specify the target and target library in CMake)
SET_TARGET_PROPERTIES( ${test} PROPERTIES LINK_FLAGS "/LIBPATH:../bin/Win32/Debug/v120/dynamic" ) SET_TARGET_PROPERTIES( ${test} PROPERTIES LINK_FLAGS "/LIBPATH:../bin/Win32/Debug/v120/dynamic" )
else() else()
link_directories(${test} PRIVATE "${CMAKE_SOURCE_DIR}/../lib") # per-test directories not generated on OS X / Darwin
if (NOT APPLE)
link_directories(${test} PRIVATE "${CMAKE_SOURCE_DIR}/../lib")
endif()
endif() endif()
if(RT_LIBRARY) if(RT_LIBRARY)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment