-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix paths of target sources outside the workspace (#1816)
* Fix paths of target sources outside the workspace For more details, see: #1504 * Add test for source files outside of workspace root Co-Authored-By: Elson Wei <[email protected]> Co-authored-by: Elson Wei <[email protected]> Co-authored-by: Bob Brown <[email protected]>
- Loading branch information
1 parent
7fd5128
commit d514bef
Showing
5 changed files
with
55 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
test/unit-tests/driver/workspace/source_outside_of_workspace/main.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
int main(int) { | ||
return 0; | ||
} |
5 changes: 5 additions & 0 deletions
5
test/unit-tests/driver/workspace/source_outside_of_workspace/workspace/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cmake_minimum_required(VERSION 3.0.0) | ||
project(source_outside_of_workspace VERSION 0.1.0) | ||
|
||
add_executable(root_target ../main.cpp) | ||
add_subdirectory(subdir) |
1 change: 1 addition & 0 deletions
1
test/unit-tests/driver/workspace/source_outside_of_workspace/workspace/subdir/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_executable(subdir_target ${PROJECT_SOURCE_DIR}/../main.cpp) |