mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 22:58:37 -05:00
Xcode: Teach XCODE_ATTRIBUTE target properties about generator expressions
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
include(RunCMake)
|
||||
|
||||
run_cmake(XcodeFileType)
|
||||
run_cmake(XcodeAttributeGenex)
|
||||
run_cmake(XcodeAttributeGenexError)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
set(expect "TEST_HOST = \"[^;\"]*Tests/RunCMake/XcodeProject/XcodeAttributeGenex-build/[^;\"/]*/some\"")
|
||||
file(STRINGS ${RunCMake_TEST_BINARY_DIR}/XcodeAttributeGenex.xcodeproj/project.pbxproj actual
|
||||
REGEX "TEST_HOST = .*;" LIMIT_COUNT 1)
|
||||
if(NOT "${actual}" MATCHES "${expect}")
|
||||
message(SEND_ERROR "The actual project contains the line:\n ${actual}\n"
|
||||
"which does not match expected regex:\n ${expect}\n")
|
||||
endif()
|
||||
@@ -0,0 +1,4 @@
|
||||
enable_language(C)
|
||||
add_executable(some main.c)
|
||||
add_executable(another main.c)
|
||||
set_property(TARGET another PROPERTY XCODE_ATTRIBUTE_TEST_HOST "$<TARGET_FILE:some>")
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,6 @@
|
||||
CMake Error:
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<NOTAGENEX>
|
||||
|
||||
Expression did not evaluate to a known generator expression
|
||||
@@ -0,0 +1,4 @@
|
||||
enable_language(C)
|
||||
add_executable(some main.c)
|
||||
add_executable(another main.c)
|
||||
set_property(TARGET another PROPERTY XCODE_ATTRIBUTE_TEST_HOST "$<NOTAGENEX>")
|
||||
Reference in New Issue
Block a user