From cb5fdd1d865ae2e7094f3c8570ac9e345d0add15 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 16 Jul 2021 00:46:09 +0200 Subject: [PATCH] cmake: add an option to build tests (#153) --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 08e78d4..f6e7358 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,8 @@ project( LANGUAGES C CXX ASM_MASM VERSION ${VERSION}) +option(LIBCPUID_TESTS "Enable building tests" OFF) + set(CMAKE_CXX_STANDARD 11) set(CMAKE_C_STANDARD 99) @@ -27,4 +29,6 @@ endif(UNIX) # Include subdirectories add_subdirectory(libcpuid) add_subdirectory(cpuid_tool) -add_subdirectory(tests) +if(LIBCPUID_TESTS) + add_subdirectory(tests) +endif()