mirror of
https://github.com/serge1/ELFIO.git
synced 2024-12-26 18:15:40 +00:00
Move private build commands to the dedicated 'if' branch
This commit is contained in:
parent
1e6d24d40e
commit
3580e7cc7f
@ -38,25 +38,24 @@ 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)
|
||||
# set (CMAKE_CXX_FLAGS "-Wall")
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
||||
if (ELFIO_BUILD_TESTS AND IS_TOP_PROJECT)
|
||||
# set (CMAKE_CXX_FLAGS "-Wall")
|
||||
enable_testing()
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} USES_TERMINAL)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
# If this is the top level project, add in logic to install elfio
|
||||
if (IS_TOP_PROJECT)
|
||||
# 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)
|
||||
# set (CMAKE_CXX_FLAGS "-Wall")
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
||||
if (ELFIO_BUILD_TESTS AND IS_TOP_PROJECT)
|
||||
# set (CMAKE_CXX_FLAGS "-Wall")
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
# Create a file that includes the current project version. This will be
|
||||
|
Loading…
Reference in New Issue
Block a user