add_library(A SHARED A.cpp)
add_library(B SHARED B.cpp)
# No need to use ctk_add_executable_utf8 since there are
# no special characters are involved in this test.
add_executable(C C.cpp)
target_link_libraries(C B A)

project(ctkLinkerAsNeededFlagCheck)
add_library(A SHARED A.cpp)
add_library(B SHARED B.cpp)
# No need to use ctk_add_executable_utf8 since there are
# no special characters are involved in this test.
add_executable(C C.cpp)
target_link_libraries(C B A)

Fix CMake 3.15 warning in ctkLinkerAsNeededFlagCheck project
COMP: Fix CMake 3.15 warning in ctkLinkerAsNeededFlagCheck project

Adapted from Slicer/Slicer@0c6ab39ca

This commit fixes the following warning:

  CMake Warning (dev) in /home/jcfr/Projects/CTK/CMake/ctkLinkerAsNeededFlagCheck/CMakeLists.txt:
    No project() command is present.  The top-level CMakeLists.txt file must
    contain a literal, direct call to the project() command.  Add a line of
    code such as

      project(ProjectName)

    near the top of the file, but after cmake_minimum_required().

    CMake is pretending there is a "project(Project)" command on the first
    line.
  This warning is for project developers.  Use -Wno-dev to suppress it.
