@@ -4,9 +4,7 @@ cmake_minimum_required(VERSION 2.6)
44set (DISRUPTOR_VERSION_MAJOR "1" )
55set (DISRUPTOR_VERSION_MINOR "0" )
66set (DISRUPTOR_VERSION_PATCH "0" )
7- set (DISRUPTOR_VERSION
8- "${DISRUPTOR_VERSION_MAJOR} .${DISRUPTOR_VERSION_MINOR} .${DISRUPTOR_VERSION_PATCH} "
9- )
7+ set (DISRUPTOR_VERSION "${DISRUPTOR_VERSION_MAJOR} .${DISRUPTOR_VERSION_MINOR} .${DISRUPTOR_VERSION_PATCH} " )
108
119enable_testing ()
1210
@@ -21,16 +19,16 @@ if(CMAKE_COMPILER_IS_GNUCXX)
2119 endif ()
2220
2321 include (CheckCXXCompilerFlag )
24- check_cxx_compiler_flag (-std=c++11 FLAG_CXX11 )
22+ check_cxx_compiler_flag (-std=c++14 FLAG_CXX11 )
2523 if (FLAG_CXX11)
26- message (STATUS "C++11 features enabled" )
27- set (CXX11_ENABLED ON CACHE INTERNAL "C++11 features enabled" )
24+ message (STATUS "C++14 features enabled" )
25+ set (CXX11_ENABLED ON CACHE INTERNAL "C++14 features enabled" )
2826 else ()
29- message (FATAL_ERROR "g++ does not support the -std=c++11 flag" )
27+ message (FATAL_ERROR "g++ does not support the -std=c++14 flag" )
3028 endif ()
3129 endif ()
3230
33- set (COMPILER_FLAGS "-std=c++11 " )
31+ set (COMPILER_FLAGS "-std=c++14 " )
3432 set (WARNING_FLAGS "-W -Wall" )
3533
3634 if (CMAKE_BUILD_TYPE STREQUAL "debug" )
@@ -47,16 +45,16 @@ if(CMAKE_COMPILER_IS_GNUCXX)
4745elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
4846 if (NOT CXX11_ENABLED)
4947 include (CheckCXXCompilerFlag )
50- check_cxx_compiler_flag (-std=c++11 FLAG_CXX11 )
48+ check_cxx_compiler_flag (-std=c++14 FLAG_CXX11 )
5149 if (FLAG_CXX11)
52- message (STATUS "C++11 features enabled" )
53- set (CXX11_ENABLED ON CACHE INTERNAL "C++11 features enabled" )
50+ message (STATUS "C++14 features enabled" )
51+ set (CXX11_ENABLED ON CACHE INTERNAL "C++14 features enabled" )
5452 else ()
55- message (FATAL_ERROR "Clang does not support the -std=c++11 flag" )
53+ message (FATAL_ERROR "Clang does not support the -std=c++14 flag" )
5654 endif ()
5755 endif ()
5856
59- set (COMPILER_FLAGS "-std=c++11 " )
57+ set (COMPILER_FLAGS "-std=c++14 " )
6058 set (WARNING_FLAGS "-W -Wall" )
6159
6260 if (CMAKE_BUILD_TYPE STREQUAL "debug" )
@@ -74,14 +72,16 @@ endif()
7472
7573set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS } ${COMPILER_FLAGS} ${WARNING_FLAGS} " )
7674
77- add_subdirectory (googletest-release-1.8.0 )
78- include_directories (${gtest_SOURCE_DIR } /include ${gtest_SOURCE_DIR } )
79-
8075add_subdirectory (Disruptor )
8176
82- add_subdirectory (Disruptor.PerfTests )
83- add_subdirectory (Disruptor.TestTools )
84- add_subdirectory (Disruptor.Tests )
77+ if (DISRUPTOR_BUILD_TESTS)
78+ add_subdirectory (googletest-release-1.8.0 )
79+ include_directories (${gtest_SOURCE_DIR } /include ${gtest_SOURCE_DIR } )
80+
81+ add_subdirectory (Disruptor.PerfTests )
82+ add_subdirectory (Disruptor.TestTools )
83+ add_subdirectory (Disruptor.Tests )
84+ endif ()
8585
8686
8787# uninstall target
@@ -107,9 +107,7 @@ set(CPACK_PACKAGE_VERSION_MAJOR "${DISRUPTOR_VERSION_MAJOR}")
107107set (CPACK_PACKAGE_VERSION_MINOR "${DISRUPTOR_VERSION_MINOR} " )
108108set (CPACK_PACKAGE_VERSION_PATCH "${DISRUPTOR_VERSION_PATCH} " )
109109
110- set (CPACK_SOURCE_PACKAGE_FILE_NAME
111- "${CMAKE_PROJECT_NAME } -${DISRUPTOR_VERSION} "
112- )
110+ set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME } -${DISRUPTOR_VERSION} " )
113111
114112set (CPACK_SOURCE_GENERATOR "TBZ2" )
115113set (CPACK_SOURCE_IGNORE_FILES
0 commit comments