1
0
mirror of https://github.com/google/cpu_features.git synced 2025-07-01 05:11:15 +02:00

Fixes #14 - Defaulting to Release and no unit test

This commit is contained in:
Guillaume Chatelet
2018-02-08 16:59:18 +01:00
parent 1d6ba6139c
commit 3a156dada7
3 changed files with 16 additions and 5 deletions

View File

@ -2,6 +2,17 @@ cmake_minimum_required(VERSION 3.0)
project(CpuFeatures)
# Default Build Type to be Release
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
FORCE)
endif(NOT CMAKE_BUILD_TYPE)
# BUILD_TESTING is a standard CMake variable, but we declare it here to make it
# prominent in the GUI.
option(BUILD_TESTING "Enable test (depends on googletest)." OFF)
#
# library : cpu_features
#
@ -88,6 +99,6 @@ if(BUILD_TESTING)
if (CMAKE_VERSION VERSION_LESS 2.8.11)
include_directories("${gtest_SOURCE_DIR}/include")
endif()
add_subdirectory(test)
endif()