mirror of
https://github.com/anrieff/libcpuid
synced 2025-10-03 11:01:30 +00:00
CMake: harmonizes options
This commit is contained in:
parent
4d6cc787fe
commit
52efefbb7d
5 changed files with 58 additions and 40 deletions
|
@ -17,9 +17,11 @@ if(MSVC)
|
|||
else()
|
||||
set(LIBCPUID_SHARED ON)
|
||||
endif()
|
||||
option(BUILD_SHARED_LIBS "Build shared lib" ${LIBCPUID_SHARED})
|
||||
option(LIBCPUID_DRIVERS "Enable kernel drivers" ON)
|
||||
option(LIBCPUID_TESTS "Enable building tests" OFF)
|
||||
|
||||
# Options
|
||||
option(BUILD_SHARED_LIBS "Build building shared libraries" ${LIBCPUID_SHARED})
|
||||
option(LIBCPUID_BUILD_DRIVERS "Enable building kernel drivers" ON)
|
||||
option(LIBCPUID_ENABLE_TESTS "Enable tests targets" OFF)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
@ -65,9 +67,9 @@ endif(UNIX)
|
|||
# Include subdirectories
|
||||
add_subdirectory(libcpuid)
|
||||
add_subdirectory(cpuid_tool)
|
||||
if(LIBCPUID_DRIVERS)
|
||||
if(LIBCPUID_BUILD_DRIVERS)
|
||||
add_subdirectory(drivers)
|
||||
endif()
|
||||
if(LIBCPUID_TESTS)
|
||||
endif(LIBCPUID_BUILD_DRIVERS)
|
||||
if(LIBCPUID_ENABLE_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
endif(LIBCPUID_ENABLE_TESTS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue