mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Set BUILD_TESTIN to OFF by default when building cpu_features
This commit is contained in:
parent
9e921d161c
commit
63463eee71
@ -277,14 +277,7 @@ if(CMAKE_VERSION VERSION_GREATER 3.0 AND SUPPORTED_CPU_FEATURES_ARCH)
|
||||
if(CpuFeatures_FOUND)
|
||||
message(STATUS "Found CpuFeatures: (found version ${CpuFeatures_VERSION})")
|
||||
else()
|
||||
if(BUILD_TESTING)
|
||||
set(BUILD_TESTING_AUX ${BUILD_TESTING})
|
||||
endif()
|
||||
set(BUILD_TESTING OFF)
|
||||
add_subdirectory(cpu_features)
|
||||
if(BUILD_TESTING_AUX)
|
||||
set(BUILD_TESTING ${BUILD_TESTING_AUX})
|
||||
endif()
|
||||
endif()
|
||||
set(BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS_SAVED}")
|
||||
endif()
|
||||
|
@ -23,6 +23,9 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
FORCE)
|
||||
endif()
|
||||
|
||||
# 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)
|
||||
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
|
||||
# it prominent in the GUI.
|
||||
# cpu_features uses bit-fields which are - to some extends - implementation-defined (see https://en.cppreference.com/w/c/language/bit_field).
|
||||
|
@ -29,10 +29,10 @@ cpu_features directly and use the `cpu_features` target in your project.
|
||||
3- Add the `cpu_features` target to the `target_link_libraries()` section of
|
||||
your executable or of your library.
|
||||
|
||||
## Disabling tests
|
||||
## Enabling tests
|
||||
|
||||
CMake default options for cpu_features is Release built type with tests enabled.
|
||||
To disable testing set cmake `BUILD_TESTING` variable to `OFF`,
|
||||
CMake default options for cpu_features is Release built type with tests
|
||||
disabled. To enable testing set cmake `BUILD_TESTING` variable to `ON`,
|
||||
[.travis.yml](https://github.com/google/cpu_features/blob/master/.travis.yml)
|
||||
and
|
||||
[appveyor.yml](https://github.com/google/cpu_features/blob/master/appveyor.yml)
|
||||
|
Loading…
Reference in New Issue
Block a user