You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.8 KiB
54 lines
1.8 KiB
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR) |
|
project(c++-benchmarks CXX) |
|
|
|
include(CMakeDetermineCXXCompiler) |
|
|
|
# default to Release |
|
if("${CMAKE_BUILD_TYPE}" STREQUAL "") |
|
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE) |
|
endif("${CMAKE_BUILD_TYPE}" STREQUAL "") |
|
|
|
|
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") |
|
set(EXTRA_CXX_FLAGS "-std=c++11 -Wall -Wextra -Wno-unused-parameter -pedantic" CACHE STRING "Extra flags used by the compiler during all build types.") |
|
else("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") |
|
set(EXTRA_CXX_FLAGS "" CACHE STRING "Extra flags used by the compiler during all build types.") |
|
endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXX_FLAGS}") |
|
|
|
add_executable(benchmark-atomic-costs |
|
benchmark-atomic-costs.cpp) |
|
|
|
add_executable(benchmark-atomic-costs-pthread |
|
benchmark-atomic-costs.cpp) |
|
set_target_properties(benchmark-atomic-costs-pthread |
|
PROPERTIES |
|
COMPILE_FLAGS "-pthread" |
|
LINK_FLAGS "-pthread") |
|
|
|
add_executable(benchmark-shared-unique |
|
benchmark-shared-unique.cpp |
|
benchmark-shared-unique-impl.cpp) |
|
|
|
add_executable(test-NULL-type |
|
test-NULL-type.cpp) |
|
|
|
add_executable(test-base-constr |
|
test-base-constr.cpp) |
|
|
|
add_executable(test-const-ref-results |
|
test-const-ref-results.cpp) |
|
|
|
add_executable(test-constructor-throw |
|
test-constructor-throw.cpp) |
|
|
|
add_executable(test-copy-shared-ptr |
|
test-copy-shared-ptr.cpp |
|
test-copy-shared-ptr-impl.cpp) |
|
|
|
add_executable(test-rvalue-ref |
|
test-rvalue-ref.cpp) |
|
|
|
add_executable(test-smart-factory |
|
test-smart-factory.cpp)
|
|
|