-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fcb9e0
commit 6ee25d3
Showing
7 changed files
with
186 additions
and
206 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
include(${CMAKE_CURRENT_LIST_DIR}/../io1_add_target.cmake) | ||
file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/foo.cpp" "int main() { return 0; }") | ||
|
||
ct_add_test(NAME io1.add_source_file.normal) | ||
function(${CMAKETEST_TEST}) | ||
add_library(foo STATIC) | ||
set_target_properties(foo PROPERTIES LINKER_LANGUAGE CXX) | ||
|
||
io1_add_source_file(foo "foo.cpp") | ||
get_source_file_property(prop "foo.cpp" LANGUAGE) | ||
ct_assert_equal(prop "NOTFOUND") | ||
|
||
get_source_file_property(prop "foo.cpp" HEADER_FILE_ONLY) | ||
ct_assert_equal(prop "NOTFOUND") | ||
endfunction() | ||
|
||
ct_add_test(NAME io1.add_source_file.header) | ||
function(${CMAKETEST_TEST}) | ||
add_library(foo_header STATIC) | ||
set_target_properties(foo_header PROPERTIES LINKER_LANGUAGE CXX) | ||
|
||
io1_add_source_file(foo_header "foo.cpp:header") | ||
get_source_file_property(prop "foo.cpp" LANGUAGE) | ||
#ct_assert_equal(prop "NOTFOUND") | ||
|
||
get_source_file_property(prop "foo.cpp" HEADER_FILE_ONLY) | ||
ct_assert_equal(prop "ON") | ||
endfunction() |
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,56 @@ | ||
include(${CMAKE_CURRENT_LIST_DIR}/../io1_add_target.cmake) | ||
|
||
ct_add_test(NAME io1.is_source_group.normal) | ||
function(${CMAKETEST_TEST}) | ||
set(out "foo") | ||
io1_is_source_group("test.cpp" out) | ||
ct_assert_false(out) | ||
|
||
set(out "foo") | ||
io1_is_source_group("test" out) | ||
ct_assert_false(out) | ||
|
||
set(out "foo") | ||
io1_is_source_group("" out) | ||
ct_assert_false(out) | ||
|
||
set(out "foo") | ||
io1_is_source_group("/" out) | ||
ct_assert_false(out) | ||
|
||
set(out "foo") | ||
io1_is_source_group("/foo" out) | ||
ct_assert_false(out) | ||
|
||
set(out "foo") | ||
io1_is_source_group("/foo/" out) | ||
ct_assert_false(out) | ||
|
||
set(out "foo") | ||
io1_is_source_group("/foo/bar" out) | ||
ct_assert_false(out) | ||
|
||
set(out "foo") | ||
io1_is_source_group("/foo/bar/" out) | ||
ct_assert_false(out) | ||
|
||
set(out "foo") | ||
io1_is_source_group("//" out) | ||
ct_assert_true(out) | ||
|
||
set(out "foo") | ||
io1_is_source_group("/foo//" out) | ||
ct_assert_true(out) | ||
|
||
set(out "foo") | ||
io1_is_source_group("foo//" out) | ||
ct_assert_true(out) | ||
|
||
set(out "foo") | ||
io1_is_source_group("bar/foo//" out) | ||
ct_assert_true(out) | ||
|
||
set(out "foo") | ||
io1_is_source_group("/bar/foo//" out) | ||
ct_assert_true(out) | ||
endfunction() |
Oops, something went wrong.