Skip to content

Commit

Permalink
Initial GitHub Commit
Browse files Browse the repository at this point in the history
Moved from SourceForge to GitHub.
  • Loading branch information
DigitalInBlue committed Jan 11, 2013
0 parents commit dc68534
Show file tree
Hide file tree
Showing 28 changed files with 2,054 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
172 changes: 172 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Rr]elease/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.vspscc
.builds
*.dotCover

## TODO: If you have NuGet Package Restore enabled, uncomment this
#packages/

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf

# Visual Studio profiler
*.psess
*.vsp

# ReSharper is a .NET coding add-in
_ReSharper*

# Installshield output folder
[Ee]xpress

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish

# Others
[Bb]in
[Oo]bj
sql
TestResults
*.Cache
ClientBin
stylecop.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML



############
## Windows
############

# Windows image file caches
Thumbs.db

# Folder config file
Desktop.ini


#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg

# Mac crap
.DS_Store

#################
## Custom
#################

*.jpg
*.png
*.xcf
[Bb]uild
164 changes: 164 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
#
# Top level makefile for Celero
#
# John Farrier
#

#
# Cmake Configuration
#

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

include(CheckFunctionExists)
include(CheckCXXSourceCompiles)
include(CheckIncludeFile)

#
# User Options
#

option(CELERO_COMPILE_DYNAMIC_LIBRARIES "Set to ON to build Celero for dynamic linking. Use OFF for static." ON)

if(CELERO_COMPILE_DYNAMIC_LIBRARIES)
SET(CELERO_USER_DEFINED_SHARED_OR_STATIC "SHARED")
else()
SET(CELERO_USER_DEFINED_SHARED_OR_STATIC "STATIC")
endif()

set_property(GLOBAL PROPERTY USE_FOLDERS ON)

#
# Compiler Settings
#

if(MSVC)
# Force to always compile with warning level 4
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "Compiler Flags for All Builds" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING "Compiler Flags for Debug Builds" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "Compiler Flags for Release Builds" FORCE)
endif()

if(BORLAND)
set(CMAKE_CXX_FLAGS "" CACHE STRING "Compiler Flags for All Builds" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "" CACHE STRING "Compiler Flags for Debug Builds" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "" CACHE STRING "Compiler Flags for Release Builds" FORCE)
endif()

if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -std=gnu++11 -Wall" CACHE STRING "Compiler Flags for All Builds" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pedantic" CACHE STRING "Compiler Flags for Debug Builds" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "Compiler Flags for Release Builds" FORCE)
endif()

#
# Build and Install Settings
#

set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "add a postfix, usually d on windows")
set(CMAKE_RELEASE_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows")
set(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows")
set(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows")

add_definitions("/W4 /D_CRT_SECURE_NO_WARNINGS /wd4251 /nologo")

# --------------------------------------------------------------------------- #
# --------------------------------------------------------------------------- #


# Project Name
PROJECT(Celero)

#
# Install Locations
#

#set(EXECUTABLE_OUTPUT_PATH ${Celero_BINARY_DIR}/bin)
#set(LIBRARY_OUTPUT_PATH ${Celero_BINARY_DIR}/bin)

#
# include path to be used by all projects
#

SET(HEADER_PATH ${Celero_SOURCE_DIR}/include)

set(PROJECT_NAME Celero)

if(CELERO_COMPILE_DYNAMIC_LIBRARIES)
add_definitions(-DCELERO_EXPORTS)
else()
add_definitions(-DCELERO_STATIC)
endif()

#
# Define header and sources
#

set(TARGET_H
include/celero/BenchmarkInfo.h
include/celero/Celero.h
include/celero/Console.h
include/celero/Executor.h
include/celero/Export.h
include/celero/Factory.h
include/celero/GenericFactory.h
include/celero/Pimpl.h
include/celero/PimplImpl.h
include/celero/Print.h
include/celero/TestFixture.h
include/celero/TestVector.h
include/celero/Timer.h
include/celero/Utilities.h
)

set(TARGET_SRC
src/BenchmarkInfo.cpp
src/Celero.cpp
src/Console.cpp
src/Executor.cpp
src/Print.cpp
src/TestVector.cpp
src/TestFixture.cpp
src/Timer.cpp
)

set(TARGET_LIBRARIES ${SYSLIBS})
add_library(${PROJECT_NAME} ${USER_DEFINED_SHARED_OR_STATIC} ${TARGET_SRC} ${TARGET_H})
include_directories(${HEADER_PATH})

# --------------------------------------------------------------------------- #
# --------------------------------------------------------------------------- #

SET(PROJECT_TEST_NAME CeleroTest)

#
# Add Sources
#

add_executable(${PROJECT_TEST_NAME}
src/CeleroTest.cpp)

#
# Celero Project Dependencies
#

add_dependencies(${PROJECT_TEST_NAME} Celero)
target_link_libraries(${PROJECT_TEST_NAME} Celero)

#
# Broiler Plate
#

# VS2012 doesn't support true variadic templates
if(MSVC)
add_definitions( /D _VARIADIC_MAX=10 )
endif()

include_directories(${HEADER_PATH})
add_custom_command(TARGET ${PROJECT_TEST_NAME} POST_BUILD COMMAND $<TARGET_FILE:${PROJECT_TEST_NAME}>)
17 changes: 17 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Celero

C++ Benchmarking Library

Copyright 2012 John Farrier

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading

0 comments on commit dc68534

Please sign in to comment.