summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE-check.cmake
diff options
context:
space:
mode:
authorGusts Kaksis <gusts.kaksis@sonarworks.com>2020-08-29 12:56:05 (GMT)
committerCraig Scott <craig.scott@crascit.com>2020-08-31 21:38:48 (GMT)
commit525464ed2a8857be3fac224b4afde22c8c7dadeb (patch)
treedc2f31f41a340ca3f06f1770de04950dd18268b8 /Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE-check.cmake
parentdc0898205c7fcebcb5224ba3eb6dd95c05193bdd (diff)
downloadCMake-525464ed2a8857be3fac224b4afde22c8c7dadeb.zip
CMake-525464ed2a8857be3fac224b4afde22c8c7dadeb.tar.gz
CMake-525464ed2a8857be3fac224b4afde22c8c7dadeb.tar.bz2
Xcode: Use "Link Binary With Libraries" build phase in some cases
OBJECT and STATIC libraries (framework or non-framework) do not use this build phase. Not all items to be linked use this build phase either. Co-Authored-By: Craig Scott <craig.scott@crascit.com>
Diffstat (limited to 'Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE-check.cmake')
-rw-r--r--Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE-check.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE-check.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE-check.cmake
new file mode 100644
index 0000000..3074881
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_NONE-check.cmake
@@ -0,0 +1,19 @@
+include(${RunCMake_TEST_SOURCE_DIR}/LinkBinariesBuildPhase_Funcs.cmake)
+include(${RunCMake_TEST_BINARY_DIR}/foundLibs.cmake)
+
+# obj2 --> Embeds func3.o in the link flags, but obj2 is part of the path
+# ${libz} --> This is for imported2
+
+foreach(mainTarget IN ITEMS app1 shared1 module1 sharedFramework1)
+ checkFlags(OTHER_LDFLAGS ${mainTarget}
+ "static2;shared2;staticFramework2;sharedFramework2;obj2;${libz};${libresolv}"
+ ""
+ )
+endforeach()
+
+foreach(mainTarget IN ITEMS static1 staticFramework1)
+ checkFlags(OTHER_LIBTOOLFLAGS ${mainTarget}
+ "obj2"
+ "static2;shared2;staticFramework2;sharedFramework2;${libz};${libresolv}"
+ )
+endforeach()