1
0
mirror of https://github.com/google/cpu_features.git synced 2025-04-28 07:23:37 +02:00
cpu_features/ci/sample/CMakeLists.txt
Corentin Le Molgat ccc3a51e4c ci: Add docker based test framework
* Add documentation
* Add .dockerignore: minimize docker context size to improve speed
* Add Makefile: to easily run various docker stages
* Add a CMake sample project to check CMake install rules
2021-10-28 16:24:54 +02:00

23 lines
576 B
CMake

cmake_minimum_required(VERSION 3.15)
project(Sample VERSION 1.0.0 LANGUAGES CXX)
include(CTest)
find_package(CpuFeatures REQUIRED)
add_executable(sample main.cpp)
target_compile_features(sample PUBLIC cxx_std_11)
set_target_properties(sample PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED ON
VERSION ${PROJECT_VERSION})
target_link_libraries(sample PRIVATE CpuFeatures::cpu_features)
if(BUILD_TESTING)
add_test(NAME sample_test COMMAND sample)
endif()
include(GNUInstallDirs)
install(TARGETS sample
EXPORT SampleTargets
DESTINATION ${CMAKE_INSTALL_BIN_DIR})