mirror of
https://github.com/google/cpu_features.git
synced 2025-04-27 23:22:31 +02:00
Fixes #14 - Defaulting to Release and no unit test
This commit is contained in:
parent
1d6ba6139c
commit
3a156dada7
@ -11,6 +11,6 @@ compiler:
|
||||
|
||||
script:
|
||||
- cmake --version
|
||||
- cmake -H. -Bcmake_build
|
||||
- cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -H. -Bcmake_build
|
||||
- cmake --build cmake_build --target all
|
||||
- CTEST_OUTPUT_ON_FAILURE=1 cmake --build cmake_build --target test
|
||||
|
@ -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()
|
||||
|
@ -15,10 +15,10 @@ matrix:
|
||||
|
||||
before_build:
|
||||
- cmake --version
|
||||
- cmake -H. -Bcmake_build -G "%CMAKE_GENERATOR%"
|
||||
- cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -H. -Bcmake_build -G "%CMAKE_GENERATOR%"
|
||||
|
||||
build_script:
|
||||
- cmake --build cmake_build --config Release --target ALL_BUILD
|
||||
- cmake --build cmake_build --config Debug --target ALL_BUILD
|
||||
|
||||
test_script:
|
||||
- cmake --build cmake_build --config Release --target RUN_TESTS
|
||||
- cmake --build cmake_build --config Debug --target RUN_TESTS
|
||||
|
Loading…
x
Reference in New Issue
Block a user