Commit d489a6b3 authored by Jan Koniarik's avatar Jan Koniarik
Browse files

changed test enable detection

parent 5beb9f44
Pipeline #106413 passed with stage
in 49 seconds
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
project(emlabcpp) if(NOT DEFINED PROJECT_NAME) # detection for disabling test inspired by Catch2
set(NOT_SUBPROJECT ON)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) else()
include(CTest) set(NOT_SUBPROJECT OFF)
endif() endif()
project(emlabcpp)
add_library(emlabcpp INTERFACE) add_library(emlabcpp INTERFACE)
target_include_directories(emlabcpp INTERFACE include/) target_include_directories(emlabcpp INTERFACE include/)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) if(NOT_SUBPROJECT)
add_subdirectory(tests) include(CTest)
add_subdirectory(examples) if(BUILD_TESTING)
add_subdirectory(tests)
add_subdirectory(examples)
endif()
endif() endif()
install(TARGETS emlabcpp) install(TARGETS emlabcpp)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment