endif()
set(source_dir
URL ${boost_url}
- URL_HASH SHA256=${boost_sha256})
- if(CMAKE_VERSION VERSION_GREATER 3.1)
- list(APPEND source_dir DOWNLOAD_NO_PROGRESS 1)
- endif()
+ URL_HASH SHA256=${boost_sha256}
+ DOWNLOAD_NO_PROGRESS 1)
endif()
# build all components in a single shot
include(ExternalProject)
endforeach()
# for header-only libraries
- if(CMAKE_VERSION VERSION_LESS 3.3)
- # only ALIAS and INTERFACE target names allow ":" in it, but
- # INTERFACE library is not allowed until cmake 3.1
- add_custom_target(Boost.boost DEPENDS Boost)
- else()
- add_library(Boost::boost INTERFACE IMPORTED)
- set_target_properties(Boost::boost PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}")
- add_dependencies(Boost::boost Boost)
- endif()
+ add_library(Boost::boost INTERFACE IMPORTED)
+ set_target_properties(Boost::boost PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}")
+ add_dependencies(Boost::boost Boost)
find_package_handle_standard_args(Boost DEFAULT_MSG
Boost_INCLUDE_DIRS Boost_LIBRARIES)
mark_as_advanced(Boost_LIBRARIES BOOST_INCLUDE_DIRS)
return()
endif()
get_target_property(sources ${target} SOURCES)
- if(NOT CMAKE_VERSION VERSION_LESS 3.1)
- string(GENEX_STRIP "${sources}" sources)
- endif()
+ string(GENEX_STRIP "${sources}" sources)
foreach(src ${sources})
get_filename_component(ext ${src} EXT)
# assuming all cxx source files include boost header(s)
if(ext MATCHES ".cc|.cpp|.cxx")
- if(CMAKE_VERSION VERSION_LESS 3.3)
- add_dependencies(${target} Boost.boost)
- else()
- add_dependencies(${target} Boost::boost)
- endif()
+ add_dependencies(${target} Boost::boost)
return()
endif()
endforeach()
set(FIO_CFLAGS "-DCONFIG_HAVE_BOOL")
# fio headers use typeof(), which requires c++11 extensions
-if(CMAKE_VERSION VERSION_LESS "3.1")
- set_target_properties(fio_ceph_objectstore PROPERTIES
- COMPILE_FLAGS "-std=gnu++11 ${FIO_CFLAGS}")
-else()
- set_target_properties(fio_ceph_objectstore PROPERTIES
- CXX_EXTENSIONS ON
- COMPILE_FLAGS "${FIO_CFLAGS}")
-endif()
+set_target_properties(fio_ceph_objectstore PROPERTIES
+ CXX_EXTENSIONS ON
+ COMPILE_FLAGS "${FIO_CFLAGS}")
if(WITH_FIO)
add_dependencies(fio_ceph_objectstore fio_ext)