File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
Tests/RunCMake/AppleTextStubs Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -978,6 +978,9 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
978
978
auto genStubsRule =
979
979
this ->Makefile ->GetDefinition (" CMAKE_CREATE_TEXT_STUBS" );
980
980
cmList genStubs_commands{ genStubsRule };
981
+ this ->LocalGenerator ->CreateCDCommand (
982
+ genStubs_commands, this ->Makefile ->GetCurrentBinaryDirectory (),
983
+ this ->LocalGenerator ->GetBinaryDirectory ());
981
984
982
985
std::string TBDFullPath =
983
986
cmStrCat (outpathImp, this ->TargetNames .ImportOutput );
Original file line number Diff line number Diff line change
1
+
2
+ add_library (foo2 SHARED ../foo.c)
3
+ set_property (TARGET foo2 PROPERTY ENABLE_EXPORTS TRUE )
4
+
5
+ install (TARGETS foo2 DESTINATION "${CMAKE_BINARY_DIR} /INSTALL" )
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ set_property(TARGET foo PROPERTY ENABLE_EXPORTS TRUE)
6
6
add_executable (main main.c)
7
7
target_link_libraries (main PRIVATE foo)
8
8
9
+ add_subdirectory (SUBDIR)
9
10
10
11
install (TARGETS foo DESTINATION "${CMAKE_BINARY_DIR} /INSTALL" )
11
12
@@ -24,15 +25,20 @@ macro (CHECK_FILE test_msg path)
24
25
endif()
25
26
endmacro()
26
27
27
- check_file("DYLIB file" "$<TARGET_FILE:foo>")
28
+ check_file("foo DYLIB file" "$<TARGET_FILE:foo>")
29
+ check_file("foo2 DYLIB file" "$<TARGET_FILE:foo2>")
28
30
check_file("executable file" "$<TARGET_FILE:main>")
29
31
32
+ check_file("Installed foo DYLIB file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/$<TARGET_FILE_NAME:foo>")
33
+ check_file("Installed foo2 DYLIB file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/$<TARGET_FILE_NAME:foo2>")
30
34
check_file("Installed DYLIB file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/lib/$<TARGET_FILE_NAME:foo>")
31
35
32
36
if (APPLE_TEXT_STUBS_SUPPORTED)
33
- check_file("TBD file" "$<TARGET_IMPORT_FILE:foo>")
37
+ check_file("foo TBD file" "$<TARGET_IMPORT_FILE:foo>")
38
+ check_file("foo2 TBD file" "$<TARGET_IMPORT_FILE:foo2>")
34
39
35
- check_file("Installed TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/$<TARGET_IMPORT_FILE_NAME:foo>")
40
+ check_file("Installed foo TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/$<TARGET_IMPORT_FILE_NAME:foo>")
41
+ check_file("Installed foo2 TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL/$<TARGET_IMPORT_FILE_NAME:foo2>")
36
42
check_file("Installed TBD file" "${RunCMake_TEST_BINARY_DIR}/INSTALL2/dev/$<TARGET_IMPORT_FILE_NAME:foo>")
37
43
endif()
38
44
]])
You can’t perform that action at this time.
0 commit comments