CMake/Tests/GeneratorExpression/check-part3.cmake
Stephen Kelly 370bf55415 Add the ALIAS target concept for libraries and executables.
* The ALIAS name must match a validity regex.
* Executables and libraries may be aliased.
* An ALIAS acts immutable. It can not be used as the lhs
  of target_link_libraries or other commands.
* An ALIAS can be used with add_custom_command, add_custom_target,
  and add_test in the same way regular targets can.
* The target of an ALIAS can be retrieved with the ALIASED_TARGET
  target property.
* An ALIAS does not appear in the generated buildsystem. It
  is kept separate from cmMakefile::Targets for that reason.
* A target may have multiple aliases.
* An ALIAS target may not itself have an alias.
* An IMPORTED target may not have an alias.
* An ALIAS may not be exported or imported.
2013-08-02 15:21:00 +02:00

27 lines
867 B
CMake

include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake)
check(test_version_greater_1 "0")
check(test_version_greater_2 "1")
check(test_version_less_1 "0")
check(test_version_less_2 "1")
check(test_version_equal_1 "0")
check(test_version_equal_2 "1")
foreach(c debug release relwithdebinfo minsizerel)
if(config AND NOT config STREQUAL NoConfig)
if(NOT "${test_imported_${c}}" MATCHES "^;/imported2/include$"
AND NOT "${test_imported_${c}}" MATCHES "^/imported1/include;$")
message(SEND_ERROR "test_imported_${c} is not correct: ${test_imported_${c}}")
endif()
else()
if(NOT "${test_imported_${c}}" MATCHES "^;$")
message(SEND_ERROR "test_imported_${c} is not an empty list: ${test_imported_${c}}")
endif()
endif()
endforeach()
check(test_alias_file_exe "1")
check(test_alias_file_lib "1")
check(test_alias_target_name "1")