Skip to content

Commit

Permalink
trying something else
Browse files Browse the repository at this point in the history
  • Loading branch information
yobeonline committed Aug 14, 2024
1 parent dcfe9b8 commit 3fdb7eb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ cmake_minimum_required(VERSION 3.19)

project(test_add_target)

set(BUILD_TESTING ON CACHE STRING "")
set(BUILD_TESTING ON)

include(add_target.cmake)

include(FetchContent)
FetchContent_Declare(
cmake_test
GIT_REPOSITORY https://github.com/CMakePP/CMakeTest
GIT_TAG v0.1.14
)
FetchContent_MakeAvailable(cmake_test)
include(cmake_test/cmake_test)

ct_add_dir("${CMAKE_CURRENT_SOURCE_DIR}/test")
ct_add_dir("test")
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions test/parse_file_options.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ct_add_test(NAME main)
ct_add_test(NAME parse_file_options.main)
function(${CMAKETEST_TEST})
parse_file_options("test.cpp" file options)
ct_assert_equal(file "test.cpp")
Expand Down Expand Up @@ -36,7 +36,7 @@ endfunction()

# Using same variable names as in function definition because some
# implementations may break in this case.
ct_add_test(NAME same_variable_names)
ct_add_test(NAME parse_file_options.same_variable_names)
function(${CMAKETEST_TEST})
parse_file_options("test.cpp" out_file out_options)
ct_assert_equal(out_file "test.cpp")
Expand Down

0 comments on commit 3fdb7eb

Please sign in to comment.