• Brad King's avatar
    add_library: Restore error on alias of non-global imported target · e567d7eb
    Brad King authored
    In commit v3.11.0-rc1~433^2~1 (Add support for IMPORTED GLOBAL targets
    to be aliased, 2017-09-14) we accidentally dropped the error on calling
    `add_library` to alias an imported target that is not globally visible.
    The `add_executable` command's equivalent check was properly updated.
    Restore the check in `add_library` with the same update.  Also fix the
    test case accordingly.
    
    Fixes: #17982
    e567d7eb
Name
Last commit
Last update
..
CMakeLists.txt Loading commit data...
RunCMakeTest.cmake Loading commit data...
add_dependencies-result.txt Loading commit data...
add_dependencies-stderr.txt Loading commit data...
add_dependencies.cmake Loading commit data...
add_executable-library-result.txt Loading commit data...
add_executable-library-stderr.txt Loading commit data...
add_executable-library.cmake Loading commit data...
add_library-executable-result.txt Loading commit data...
add_library-executable-stderr.txt Loading commit data...
add_library-executable.cmake Loading commit data...
alias-target-result.txt Loading commit data...
alias-target-stderr.txt Loading commit data...
alias-target.cmake Loading commit data...
empty.cpp Loading commit data...
exclude-from-all-result.txt Loading commit data...
exclude-from-all-stderr.txt Loading commit data...
exclude-from-all.cmake Loading commit data...
export-result.txt Loading commit data...
export-stderr.txt Loading commit data...
export.cmake Loading commit data...
imported-global-target-stderr.txt Loading commit data...
imported-global-target.cmake Loading commit data...
imported-result.txt Loading commit data...
imported-stderr.txt Loading commit data...
imported-target-result.txt Loading commit data...
imported-target-stderr.txt Loading commit data...
imported-target.cmake Loading commit data...
imported.cmake Loading commit data...
install-export-result.txt Loading commit data...
install-export-stderr.txt Loading commit data...
install-export.cmake Loading commit data...
invalid-name-result.txt Loading commit data...
invalid-name-stderr.txt Loading commit data...
invalid-name.cmake Loading commit data...
invalid-target-result.txt Loading commit data...
invalid-target-stderr.txt Loading commit data...
invalid-target.cmake Loading commit data...
multiple-targets-result.txt Loading commit data...
multiple-targets-stderr.txt Loading commit data...
multiple-targets.cmake Loading commit data...
name-conflict-result.txt Loading commit data...
name-conflict-stderr.txt Loading commit data...
name-conflict.cmake Loading commit data...
no-targets-result.txt Loading commit data...
no-targets-stderr.txt Loading commit data...
no-targets.cmake Loading commit data...
set_property-result.txt Loading commit data...
set_property-stderr.txt Loading commit data...
set_property.cmake Loading commit data...
set_target_properties-result.txt Loading commit data...
set_target_properties-stderr.txt Loading commit data...
set_target_properties.cmake Loading commit data...
target_include_directories-result.txt Loading commit data...
target_include_directories-stderr.txt Loading commit data...
target_include_directories.cmake Loading commit data...
target_link_libraries-result.txt Loading commit data...
target_link_libraries-stderr.txt Loading commit data...
target_link_libraries.cmake Loading commit data...