Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Test Files Organization #75

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ include(cmake/MkdirRecursive.cmake)

if(PROJECT_IS_TOP_LEVEL AND BUILD_TESTING)
enable_testing()
add_subdirectory(test)

add_test(
NAME "recursive directory creation"
COMMAND "${CMAKE_COMMAND}"
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/MkdirRecursive.cmake)
endif()

if(MY_MKDIR_ENABLE_INSTALL)
Expand Down
17 changes: 0 additions & 17 deletions test/CMakeLists.txt

This file was deleted.

11 changes: 11 additions & 0 deletions test/MkdirRecursive.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.5)

find_package(MyMkdir REQUIRED PATHS ${CMAKE_CURRENT_LIST_DIR}/../../cmake)

file(REMOVE_RECURSE parent)

mkdir_recursive(parent/child)

if(NOT EXISTS parent/child)
message(FATAL_ERROR "expected path 'parent/child' to exist")
endif()
20 changes: 0 additions & 20 deletions test/cmake/MkdirRecursiveTest.cmake

This file was deleted.