Fixed cmake file and excluded test from all

This commit is contained in:
Dreaded_X 2020-06-14 19:06:04 +02:00
parent e562fb2037
commit 96b6c7e764
2 changed files with 11 additions and 8 deletions

View File

@ -6,15 +6,10 @@ if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
message(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there.") message(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there.")
endif() endif()
include(cmake/CPM.cmake)
include(cmake/tools.cmake) include(cmake/tools.cmake)
CPMAddPackage(
NAME PackageProject.cmake
GITHUB_REPOSITORY TheLartians/PackageProject.cmake
VERSION 1.3
)
add_subdirectory(io) add_subdirectory(io)
add_subdirectory(test) add_subdirectory(test)
set_target_properties(io_test PROPERTIES EXCLUDE_FROM_ALL YES)
set_target_properties(test_framework PROPERTIES EXCLUDE_FROM_ALL YES)

View File

@ -5,6 +5,14 @@ project(io
VERSION 0.1 VERSION 0.1
) )
include(../cmake/CPM.cmake)
CPMAddPackage(
NAME PackageProject.cmake
GITHUB_REPOSITORY TheLartians/PackageProject.cmake
VERSION 1.3
)
file(GLOB_RECURSE headers CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h") file(GLOB_RECURSE headers CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h")
file(GLOB_RECURSE sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) file(GLOB_RECURSE sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)