Tests: Cover install(FILES) with a genex DESTINATION

This commit is contained in:
Brad King 2015-09-23 14:41:52 -04:00
parent 17aa6fd362
commit 69ab5f5502
7 changed files with 15 additions and 6 deletions

View File

@ -29,14 +29,14 @@ add_custom_command(TARGET testLib1 POST_BUILD
$<TARGET_FILE:testLib1>.genex $<TARGET_FILE:testLib1>.genex
) )
install(FILES $<TARGET_FILE:testLib1>.genex install(FILES $<TARGET_FILE:testLib1>.genex
DESTINATION lib DESTINATION $<1:lib>$<0:/wrong>
) )
set_property(TARGET testLib1 PROPERTY MY_FILES set_property(TARGET testLib1 PROPERTY MY_FILES
${CMAKE_CURRENT_SOURCE_DIR}/testLib1file1.txt ${CMAKE_CURRENT_SOURCE_DIR}/testLib1file1.txt
${CMAKE_CURRENT_SOURCE_DIR}/testLib1file2.txt ${CMAKE_CURRENT_SOURCE_DIR}/testLib1file2.txt
) )
install(FILES $<TARGET_PROPERTY:testLib1,MY_FILES> install(FILES $<TARGET_PROPERTY:testLib1,MY_FILES>
DESTINATION doc DESTINATION $<1:doc>$<0:/wrong>
) )
# Test library with empty link interface. Link it to an implementation # Test library with empty link interface. Link it to an implementation

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,6 @@
CMake Error:
Error evaluating generator expression:
\$<NOTAGENEX>
Expression did not evaluate to a known generator expression

View File

@ -0,0 +1 @@
install(FILES empty.c DESTINATION $<NOTAGENEX>)

View File

@ -6,6 +6,7 @@ run_cmake(DIRECTORY-message-lazy)
run_cmake(SkipInstallRulesWarning) run_cmake(SkipInstallRulesWarning)
run_cmake(SkipInstallRulesNoWarning1) run_cmake(SkipInstallRulesNoWarning1)
run_cmake(SkipInstallRulesNoWarning2) run_cmake(SkipInstallRulesNoWarning2)
run_cmake(FILES-DESTINATION-bad)
run_cmake(TARGETS-DESTINATION-bad) run_cmake(TARGETS-DESTINATION-bad)
run_cmake(CMP0062-OLD) run_cmake(CMP0062-OLD)
run_cmake(CMP0062-NEW) run_cmake(CMP0062-NEW)

View File

@ -209,9 +209,9 @@ else()
ARCHIVE DESTINATION MyTest/lib/static ARCHIVE DESTINATION MyTest/lib/static
OPTIONAL # for coverage...target should always exist OPTIONAL # for coverage...target should always exist
) )
install(FILES lib1.h DESTINATION MyTest/include/foo) install(FILES lib1.h DESTINATION MyTest/include/$<1:foo>$<0:/wrong>)
install(FILES lib2.h install(FILES lib2.h
DESTINATION MyTest/include/foo DESTINATION $<1:MyTest/include/foo>$<0:/wrong>
COMPONENT Development COMPONENT Development
PERMISSIONS OWNER_READ OWNER_WRITE PERMISSIONS OWNER_READ OWNER_WRITE
RENAME lib2renamed.h RENAME lib2renamed.h

View File

@ -209,9 +209,9 @@ else()
ARCHIVE DESTINATION MyTest/lib/static ARCHIVE DESTINATION MyTest/lib/static
OPTIONAL # for coverage...target should always exist OPTIONAL # for coverage...target should always exist
) )
install(FILES lib1.h DESTINATION MyTest/include/foo) install(FILES lib1.h DESTINATION MyTest/include/$<1:foo>$<0:/wrong>)
install(FILES lib2.h install(FILES lib2.h
DESTINATION MyTest/include/foo DESTINATION $<1:MyTest/include/foo>$<0:/wrong>
COMPONENT Development COMPONENT Development
PERMISSIONS OWNER_READ OWNER_WRITE PERMISSIONS OWNER_READ OWNER_WRITE
RENAME lib2renamed.h RENAME lib2renamed.h