mirror of
https://github.com/serge1/ELFIO.git
synced 2025-02-20 09:40:37 +00:00
Enabled C++11 in CMake for examples and tests only
This commit is contained in:
parent
c05cd56dc8
commit
ec41276e48
@ -26,9 +26,6 @@ configure_file(${version_header} ${CMAKE_CURRENT_BINARY_DIR}/elfio_version.hpp.c
|
||||
|
||||
project(elfio VERSION ${version} LANGUAGES C CXX)
|
||||
|
||||
# Enable C++11
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Create a header only CMake target for elfio
|
||||
@ -41,6 +38,11 @@ target_include_directories(
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
|
||||
# Enable C++11 for examples and tests
|
||||
if (ELFIO_BUILD_EXAMPLES OR ELFIO_BUILD_TESTS)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
endif()
|
||||
|
||||
if (ELFIO_BUILD_EXAMPLES)
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user