summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FileAPI
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2023-09-01 18:02:44 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2023-09-01 18:02:44 (GMT)
commite1fe5bb4750353dba909c2d38fbca580bf3154a4 (patch)
treedf0736a381c2b5f75637ccef3ee4455f331937d4 /Tests/RunCMake/FileAPI
parentbf933b817397a2390d58e50490d2b69d6b57c794 (diff)
downloadCMake-e1fe5bb4750353dba909c2d38fbca580bf3154a4.zip
CMake-e1fe5bb4750353dba909c2d38fbca580bf3154a4.tar.gz
CMake-e1fe5bb4750353dba909c2d38fbca580bf3154a4.tar.bz2
Tests: Fix FileAPI interface_exe test
Diffstat (limited to 'Tests/RunCMake/FileAPI')
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json41
-rw-r--r--Tests/RunCMake/FileAPI/include_test.cmake2
2 files changed, 42 insertions, 1 deletions
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json
index 521e464..93df8a6 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json
@@ -73,6 +73,47 @@
{
"define": "interface_exe_EXPORTS",
"backtrace": null
+ },
+ {
+ "define": "COMPILED_WITH_INTERFACE_LIB",
+ "backtrace": [
+ {
+ "file": "^include_test\\.cmake$",
+ "line": 4,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^include_test\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
}
],
"compileCommandFragments": null
diff --git a/Tests/RunCMake/FileAPI/include_test.cmake b/Tests/RunCMake/FileAPI/include_test.cmake
index c74d264..c188cb3 100644
--- a/Tests/RunCMake/FileAPI/include_test.cmake
+++ b/Tests/RunCMake/FileAPI/include_test.cmake
@@ -1,7 +1,7 @@
add_library(interface_lib INTERFACE)
target_compile_definitions(interface_lib INTERFACE COMPILED_WITH_INTERFACE_LIB)
add_executable(interface_exe empty.c)
-target_link_libraries(interface_exe PRIVATE inteface_lib)
+target_link_libraries(interface_exe PRIVATE interface_lib)
set_property(TARGET interface_exe PROPERTY ENABLE_EXPORTS ON)
set_property(TARGET interface_exe PROPERTY RUNTIME_OUTPUT_DIRECTORY bin)
set_property(TARGET interface_exe PROPERTY ARCHIVE_OUTPUT_DIRECTORY lib)