Switched to cmake
This commit is contained in:
38
test/CMakeLists.txt
Normal file
38
test/CMakeLists.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
||||
|
||||
project(io_test
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
include(../cmake/CPM.cmake)
|
||||
|
||||
CPMAddPackage(
|
||||
NAME test_framework
|
||||
GIT_TAG master
|
||||
GIT_REPOSITORY https://git.mtgames.nl/Dreaded_X/test_framework
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE headers CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h")
|
||||
file(GLOB_RECURSE sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${headers} ${sources})
|
||||
|
||||
# being a cross-platform target, we enforce standards conformance on MSVC
|
||||
target_compile_options(${PROJECT_NAME} PUBLIC "$<$<BOOL:${MSVC}>:/permissive->")
|
||||
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include/${PROJECT_NAME}-${PROJECT_VERSION}>
|
||||
)
|
||||
|
||||
|
||||
# Link dependencies (if required)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC test_framework io)
|
||||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
CXX_STANDARD 20
|
||||
OUTPUT_NAME "${PROJECT_NAME}"
|
||||
)
|
||||
|
||||
message("${INCLUDE_DIRECTORIES}")
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "io.h"
|
||||
|
||||
#include "test_franework.h"
|
||||
#include "test_framework.h"
|
||||
|
||||
#include <vector>
|
||||
#include <array>
|
||||
|
||||
Reference in New Issue
Block a user