summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake1
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-Common.cmake9
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt7
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt26
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-WARN.cmake1
-rw-r--r--Tests/RunCMake/CMP0111/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0111/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/CMP0111/main.cpp3
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/FetchContent/DirOverrides.cmake25
-rw-r--r--Tests/RunCMake/FetchContent/DirOverridesDisconnected.cmake18
-rw-r--r--Tests/RunCMake/FetchContent/RunCMakeTest.cmake15
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json4
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json4
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json4
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json4
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json4
-rw-r--r--Tests/RunCMake/FileAPI/imported/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/File_Generate/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/File_Generate/Target.cmake2
-rw-r--r--Tests/RunCMake/File_Generate/sub1/CMakeLists.txt7
-rw-r--r--Tests/RunCMake/File_Generate/sub2/CMakeLists.txt7
-rw-r--r--Tests/RunCMake/Graphviz/GraphvizTestProject.cmake1
-rw-r--r--Tests/RunCMake/target_link_libraries/SharedDepNotTarget.cmake3
-rw-r--r--Tests/RunCMake/target_link_libraries/UNKNOWN-IMPORTED-GLOBAL.cmake1
28 files changed, 159 insertions, 14 deletions
diff --git a/Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake
index 650c8a5..ae62e79 100644
--- a/Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake
+++ b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake
@@ -1,6 +1,7 @@
enable_language(CXX)
+cmake_policy(SET CMP0111 OLD)
add_library(someimportedlib SHARED IMPORTED)
get_target_property(_loc someimportedlib LOCATION)
diff --git a/Tests/RunCMake/CMP0111/CMP0111-Common.cmake b/Tests/RunCMake/CMP0111/CMP0111-Common.cmake
new file mode 100644
index 0000000..564169d
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-Common.cmake
@@ -0,0 +1,9 @@
+# Prevent duplicate errors on some platforms.
+set(CMAKE_IMPORT_LIBRARY_SUFFIX "placeholder")
+
+add_library(unknown_lib UNKNOWN IMPORTED)
+add_library(static_lib STATIC IMPORTED)
+add_library(shared_lib SHARED IMPORTED)
+
+add_executable(executable main.cpp)
+target_link_libraries(executable unknown_lib static_lib shared_lib)
diff --git a/Tests/RunCMake/CMP0111/CMP0111-NEW-result.txt b/Tests/RunCMake/CMP0111/CMP0111-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt b/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt
new file mode 100644
index 0000000..ba5d936
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error in CMakeLists.txt:
+ IMPORTED_LOCATION not set for imported target "static_lib"( configuration
+ ".+")?.
++
+CMake Error in CMakeLists.txt:
+ IMPORTED_IMPLIB not set for imported target "shared_lib"( configuration
+ ".+")?.
diff --git a/Tests/RunCMake/CMP0111/CMP0111-NEW.cmake b/Tests/RunCMake/CMP0111/CMP0111-NEW.cmake
new file mode 100644
index 0000000..d0c8dd3
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0111 NEW)
+include(CMP0111-Common.cmake)
diff --git a/Tests/RunCMake/CMP0111/CMP0111-OLD.cmake b/Tests/RunCMake/CMP0111/CMP0111-OLD.cmake
new file mode 100644
index 0000000..d00847a
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0111 OLD)
+include(CMP0111-Common.cmake)
diff --git a/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt b/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt
new file mode 100644
index 0000000..2fe6cc8
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt
@@ -0,0 +1,26 @@
+CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0111 is not set: An imported target with a missing location fails
+ during generation. Run "cmake --help-policy CMP0111" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+
+ IMPORTED_LOCATION not set for imported target "unknown_lib"( configuration
+ ".+")?.
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0111 is not set: An imported target with a missing location fails
+ during generation. Run "cmake --help-policy CMP0111" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+
+ IMPORTED_LOCATION not set for imported target "static_lib"( configuration
+ ".+")?.
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0111 is not set: An imported target with a missing location fails
+ during generation. Run "cmake --help-policy CMP0111" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+
+ IMPORTED_IMPLIB not set for imported target "shared_lib"( configuration
+ ".+")?.
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0111/CMP0111-WARN.cmake b/Tests/RunCMake/CMP0111/CMP0111-WARN.cmake
new file mode 100644
index 0000000..0efe48c
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMP0111-WARN.cmake
@@ -0,0 +1 @@
+include(CMP0111-Common.cmake)
diff --git a/Tests/RunCMake/CMP0111/CMakeLists.txt b/Tests/RunCMake/CMP0111/CMakeLists.txt
new file mode 100644
index 0000000..9f19a75
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.17)
+project(${RunCMake_TEST} CXX)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0111/RunCMakeTest.cmake b/Tests/RunCMake/CMP0111/RunCMakeTest.cmake
new file mode 100644
index 0000000..02e420a
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/RunCMakeTest.cmake
@@ -0,0 +1,5 @@
+include(RunCMake)
+
+run_cmake(CMP0111-OLD)
+run_cmake(CMP0111-NEW)
+run_cmake(CMP0111-WARN)
diff --git a/Tests/RunCMake/CMP0111/main.cpp b/Tests/RunCMake/CMP0111/main.cpp
new file mode 100644
index 0000000..5047a34
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/main.cpp
@@ -0,0 +1,3 @@
+int main()
+{
+}
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index fed2852..65e8b0b 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -124,6 +124,7 @@ if(CMake_TEST_CUDA)
PROPERTY LABELS "CUDA")
endif()
add_RunCMake_test(CMP0106)
+add_RunCMake_test(CMP0111)
# The test for Policy 65 requires the use of the
# CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS variable, which both the VS and Xcode
diff --git a/Tests/RunCMake/FetchContent/DirOverrides.cmake b/Tests/RunCMake/FetchContent/DirOverrides.cmake
index 50eef16..ad61a00 100644
--- a/Tests/RunCMake/FetchContent/DirOverrides.cmake
+++ b/Tests/RunCMake/FetchContent/DirOverrides.cmake
@@ -4,18 +4,23 @@ include(FetchContent)
FetchContent_Declare(
t1
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/savedSrc
- DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E make_directory <SOURCE_DIR>
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/savedBin
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E make_directory <SOURCE_DIR> <BINARY_DIR>
)
FetchContent_Populate(t1)
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/savedSrc)
message(FATAL_ERROR "Saved details SOURCE_DIR override failed")
endif()
+if(NOT IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/savedBin)
+ message(FATAL_ERROR "Saved details BINARY_DIR override failed")
+endif()
# Test direct population
FetchContent_Populate(
t2
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/directSrc
- DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E make_directory <SOURCE_DIR>
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/directBin
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E make_directory <SOURCE_DIR> <BINARY_DIR>
)
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/directSrc)
message(FATAL_ERROR "Direct details SOURCE_DIR override failed")
@@ -44,3 +49,19 @@ FetchContent_Populate(
if(IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/savedNobuildDir-build)
message(FATAL_ERROR "Direct details BINARY_DIR override failed")
endif()
+
+# Test overriding the source directory by reusing the one from t1
+set(FETCHCONTENT_SOURCE_DIR_T5 ${CMAKE_CURRENT_BINARY_DIR}/savedSrc)
+FetchContent_Declare(
+ t5
+ SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/doesNotExist
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/wontBeCreated
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E false
+)
+FetchContent_Populate(t5)
+if(NOT "${t5_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/savedSrc")
+ message(FATAL_ERROR "Wrong SOURCE_DIR returned: ${t5_SOURCE_DIR}")
+endif()
+if(NOT "${t5_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/wontBeCreated")
+ message(FATAL_ERROR "Wrong BINARY_DIR returned: ${t5_BINARY_DIR}")
+endif()
diff --git a/Tests/RunCMake/FetchContent/DirOverridesDisconnected.cmake b/Tests/RunCMake/FetchContent/DirOverridesDisconnected.cmake
new file mode 100644
index 0000000..768a82e
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/DirOverridesDisconnected.cmake
@@ -0,0 +1,18 @@
+include(FetchContent)
+
+# Test using saved details. We are re-using a SOURCE_DIR from a previous test
+# so the download command should not be executed.
+FetchContent_Declare(
+ t1
+ SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/savedSrc
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/savedBin
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E false
+)
+FetchContent_Populate(t1)
+
+if(NOT "${t1_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/savedSrc")
+ message(FATAL_ERROR "Wrong SOURCE_DIR returned: ${t1_SOURCE_DIR}")
+endif()
+if(NOT "${t1_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/savedBin")
+ message(FATAL_ERROR "Wrong BINARY_DIR returned: ${t1_BINARY_DIR}")
+endif()
diff --git a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
index f3ed3e2..ad9e48e 100644
--- a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
@@ -10,12 +10,25 @@ run_cmake(DownloadFile)
run_cmake(SameGenerator)
run_cmake(VarDefinitions)
run_cmake(GetProperties)
-run_cmake(DirOverrides)
run_cmake(UsesTerminalOverride)
run_cmake(MakeAvailable)
run_cmake(MakeAvailableTwice)
run_cmake(MakeAvailableUndeclared)
+function(run_FetchContent_DirOverrides)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/DirOverrides-build)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(DirOverrides)
+
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_with_options(DirOverridesDisconnected
+ -D FETCHCONTENT_FULLY_DISCONNECTED=YES
+ )
+endfunction()
+run_FetchContent_DirOverrides()
+
set(RunCMake_TEST_OUTPUT_MERGE 1)
run_cmake(PreserveEmptyArgs)
set(RunCMake_TEST_OUTPUT_MERGE 0)
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
index 312f4c5..451e8d4 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
@@ -14,7 +14,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 5,
+ "line": 6,
"command": "add_executable",
"hasParent": true
},
@@ -49,7 +49,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 5,
+ "line": 6,
"command": "add_executable",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
index 7d0e6df..cbd4346 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
@@ -14,7 +14,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 23,
+ "line": 29,
"command": "add_executable",
"hasParent": true
},
@@ -49,7 +49,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 23,
+ "line": 29,
"command": "add_executable",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
index 4aec524..d92a810 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
@@ -14,7 +14,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 18,
+ "line": 24,
"command": "add_executable",
"hasParent": true
},
@@ -49,7 +49,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 18,
+ "line": 24,
"command": "add_executable",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
index f5846ec..1197a73 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
@@ -14,7 +14,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 9,
+ "line": 14,
"command": "add_executable",
"hasParent": true
},
@@ -49,7 +49,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 9,
+ "line": 14,
"command": "add_executable",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
index 29a1695..42564e0 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
@@ -14,7 +14,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 13,
+ "line": 19,
"command": "add_executable",
"hasParent": true
},
@@ -49,7 +49,7 @@
"backtrace": [
{
"file": "^imported/CMakeLists\\.txt$",
- "line": 13,
+ "line": 19,
"command": "add_executable",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/imported/CMakeLists.txt b/Tests/RunCMake/FileAPI/imported/CMakeLists.txt
index d36d88b..f79d87c 100644
--- a/Tests/RunCMake/FileAPI/imported/CMakeLists.txt
+++ b/Tests/RunCMake/FileAPI/imported/CMakeLists.txt
@@ -1,15 +1,21 @@
project(Imported)
add_library(imported_lib UNKNOWN IMPORTED)
+set_target_properties(imported_lib PROPERTIES IMPORTED_LOCATION "imported_unk${CMAKE_STATIC_LIBRARY_SUFFIX}")
add_executable(imported_exe IMPORTED)
add_executable(link_imported_exe ../empty.c)
target_link_libraries(link_imported_exe PRIVATE imported_lib)
add_library(imported_shared_lib SHARED IMPORTED)
+set_target_properties(imported_shared_lib PROPERTIES
+ IMPORTED_LOCATION "imported_shared${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ IMPORTED_IMPLIB "imported_shared${CMAKE_IMPORT_LIBRARY_SUFFIX}"
+)
add_executable(link_imported_shared_exe ../empty.c)
target_link_libraries(link_imported_shared_exe PRIVATE imported_shared_lib)
add_library(imported_static_lib STATIC IMPORTED)
+set_target_properties(imported_static_lib PROPERTIES IMPORTED_LOCATION "imported_static${CMAKE_STATIC_LIBRARY_SUFFIX}")
add_executable(link_imported_static_exe ../empty.c)
target_link_libraries(link_imported_static_exe PRIVATE imported_static_lib)
diff --git a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
index 770fc6e..48fb71c 100644
--- a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
+++ b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
@@ -33,6 +33,13 @@ foreach(l CXX C)
endif()
endforeach()
+run_cmake(Target)
+file(READ "${RunCMake_BINARY_DIR}/Target-build/sub1/output.txt" sub_1)
+file(READ "${RunCMake_BINARY_DIR}/Target-build/sub2/output.txt" sub_2)
+if(NOT sub_1 MATCHES "first" OR NOT sub_2 MATCHES "second")
+ message(SEND_ERROR "Wrong target used by TARGET argument! ${sub_1} ${sub_2}")
+endif()
+
set(timeformat "%Y%j%H%M%S")
file(REMOVE "${RunCMake_BINARY_DIR}/WriteIfDifferent-build/output_file.txt")
diff --git a/Tests/RunCMake/File_Generate/Target.cmake b/Tests/RunCMake/File_Generate/Target.cmake
new file mode 100644
index 0000000..16e8457
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/Target.cmake
@@ -0,0 +1,2 @@
+add_subdirectory(sub1)
+add_subdirectory(sub2)
diff --git a/Tests/RunCMake/File_Generate/sub1/CMakeLists.txt b/Tests/RunCMake/File_Generate/sub1/CMakeLists.txt
new file mode 100644
index 0000000..34c51a4
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/sub1/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_library(library IMPORTED STATIC)
+set_property(TARGET library PROPERTY COMPILE_DEFINITIONS "first")
+
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/output.txt"
+ CONTENT "$<TARGET_PROPERTY:COMPILE_DEFINITIONS>"
+ TARGET library
+)
diff --git a/Tests/RunCMake/File_Generate/sub2/CMakeLists.txt b/Tests/RunCMake/File_Generate/sub2/CMakeLists.txt
new file mode 100644
index 0000000..09b81ac
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/sub2/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_library(library IMPORTED STATIC)
+set_property(TARGET library PROPERTY COMPILE_DEFINITIONS "second")
+
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/output.txt"
+ CONTENT "$<TARGET_PROPERTY:COMPILE_DEFINITIONS>"
+ TARGET library
+)
diff --git a/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake b/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake
index 8a628cf..2c7d5bf 100644
--- a/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake
+++ b/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake
@@ -60,6 +60,7 @@ target_link_libraries(ConsoleApplication CoreLibrary)
# No one will ever notice...
add_library(CryptoCurrencyMiningLibrary UNKNOWN IMPORTED)
+set_target_properties(CryptoCurrencyMiningLibrary PROPERTIES IMPORTED_LOCATION "cryptomining${CMAKE_STATIC_LIBRARY_SUFFIX}")
target_link_libraries(ConsoleApplication CryptoCurrencyMiningLibrary)
add_custom_target(GenerateManPage COMMAND ${CMAKE_COMMAND} --version)
diff --git a/Tests/RunCMake/target_link_libraries/SharedDepNotTarget.cmake b/Tests/RunCMake/target_link_libraries/SharedDepNotTarget.cmake
index bab537e..d6ddfae 100644
--- a/Tests/RunCMake/target_link_libraries/SharedDepNotTarget.cmake
+++ b/Tests/RunCMake/target_link_libraries/SharedDepNotTarget.cmake
@@ -3,7 +3,8 @@ set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
add_library(imported SHARED IMPORTED)
set_target_properties(imported PROPERTIES
- IMPORTED_LOCATION "imported"
+ IMPORTED_LOCATION "imported${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ IMPORTED_IMPLIB "imported${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORTED_LINK_DEPENDENT_LIBRARIES "/path/to/libSharedDep.so"
)
add_executable(empty empty.c)
diff --git a/Tests/RunCMake/target_link_libraries/UNKNOWN-IMPORTED-GLOBAL.cmake b/Tests/RunCMake/target_link_libraries/UNKNOWN-IMPORTED-GLOBAL.cmake
index f52fa30..608f47b 100644
--- a/Tests/RunCMake/target_link_libraries/UNKNOWN-IMPORTED-GLOBAL.cmake
+++ b/Tests/RunCMake/target_link_libraries/UNKNOWN-IMPORTED-GLOBAL.cmake
@@ -1,4 +1,5 @@
enable_language(C)
add_library(UnknownImportedGlobal UNKNOWN IMPORTED GLOBAL)
+set_target_properties(UnknownImportedGlobal PROPERTIES IMPORTED_LOCATION "unknown.${CMAKE_SHARED_LIBRARY_SUFFIX}")
add_library(mylib empty.c)
target_link_libraries(mylib UnknownImportedGlobal)