]> code.bitgloo.com Git - clyne/entityx.git/commitdiff
A bunch of minor build fixes. Started README.
authorAlec Thomas <alec@swapoff.org>
Fri, 19 Oct 2012 18:48:55 +0000 (14:48 -0400)
committerAlec Thomas <alec@swapoff.org>
Fri, 19 Oct 2012 18:48:55 +0000 (14:48 -0400)
39 files changed:
.clang_complete [new file with mode: 0644]
.gitignore
CMakeLists.txt
CheckCXX11Features.cmake
Makefile [deleted file]
README.md [new file with mode: 0644]
c++11/c++11-test-__func__-N2340.cpp [deleted file]
c++11/c++11-test-auto-N2546.cpp [deleted file]
c++11/c++11-test-constexpr-N2235.cpp [deleted file]
c++11/c++11-test-cstdint.cpp [deleted file]
c++11/c++11-test-decltype-N2343.cpp [deleted file]
c++11/c++11-test-lambda-N2927.cpp [deleted file]
c++11/c++11-test-long_long-N1811.cpp [deleted file]
c++11/c++11-test-nullptr-N2431.cpp [deleted file]
c++11/c++11-test-nullptr-N2431_fail_compile.cpp [deleted file]
c++11/c++11-test-rvalue_references-N2118.cpp [deleted file]
c++11/c++11-test-sizeof_member-N2253.cpp [deleted file]
c++11/c++11-test-static_assert-N1720.cpp [deleted file]
c++11/c++11-test-static_assert-N1720_fail_compile.cpp [deleted file]
c++11/c++11-test-variadic_templates-N2555.cpp [deleted file]
c++11/demo.cpp [deleted file]
cxx11/c++11-test-__func__-N2340.cpp [new file with mode: 0644]
cxx11/c++11-test-auto-N2546.cpp [new file with mode: 0644]
cxx11/c++11-test-constexpr-N2235.cpp [new file with mode: 0644]
cxx11/c++11-test-cstdint.cpp [new file with mode: 0644]
cxx11/c++11-test-decltype-N2343.cpp [new file with mode: 0644]
cxx11/c++11-test-lambda-N2927.cpp [new file with mode: 0644]
cxx11/c++11-test-long_long-N1811.cpp [new file with mode: 0644]
cxx11/c++11-test-nullptr-N2431.cpp [new file with mode: 0644]
cxx11/c++11-test-nullptr-N2431_fail_compile.cpp [new file with mode: 0644]
cxx11/c++11-test-rvalue_references-N2118.cpp [new file with mode: 0644]
cxx11/c++11-test-sizeof_member-N2253.cpp [new file with mode: 0644]
cxx11/c++11-test-static_assert-N1720.cpp [new file with mode: 0644]
cxx11/c++11-test-static_assert-N1720_fail_compile.cpp [new file with mode: 0644]
cxx11/c++11-test-variadic_templates-N2555.cpp [new file with mode: 0644]
cxx11/demo.cpp [new file with mode: 0644]
entityx/Entity.h
entityx/Event.h
entityx/System.h

diff --git a/.clang_complete b/.clang_complete
new file mode 100644 (file)
index 0000000..492390d
--- /dev/null
@@ -0,0 +1,2 @@
+-std=c++11
+-I.
index dc667ff1e4376e15f60878131b67e1e1903f53e5..f08d8e3310072361568b28eb2f563543d1089305 100644 (file)
@@ -2,3 +2,4 @@
 *.a
 *.so
 *.o
+build/*
index 8075f237b5a7c38557f17d0108a4e58514b85e7a..f868d34077d687e0a712e56649b7cecbd9cdd9b7 100644 (file)
@@ -1,61 +1,81 @@
 cmake_minimum_required(VERSION 2.8)
 project(EntityX)
-include_directories(. ./c++11)
+include_directories(${CMAKE_CURRENT_LIST_DIR})
 
+include(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
 # C++11 feature checks
 include(CheckCXX11Features.cmake)
+# Misc features
+CHECK_INCLUDE_FILE("stdint.h" CMAKE_HAVE_STDINT_H)
 
-MACRO(REQUIRE FEATURE_NAME MESSAGE_STRING)
-    if (NOT DEFINED ${FEATURE_NAME})
-        message(FATAL_ERROR ${MESSAGE_STRING})
+macro(require FEATURE_NAME MESSAGE_STRING)
+    if (NOT ${${FEATURE_NAME}})
+        message(FATAL_ERROR "${MESSAGE_STRING} required -- ${${FEATURE_NAME}}")
+    else()
+        message("--   ${MESSAGE_STRING} found")
     endif()
-ENDMACRO(REQUIRE)
+endmacro(require)
 
-require(HAS_CXX11_AUTO "C++11 auto support is required")
-require(HAS_CXX11_NULLPTR "C++11 nullptr support is required")
-require(HAS_CXX11_RVALUE_REFERENCES "C++11 rvalue reference support is required")
-require(HAS_CXX11_CSTDINT_H "C++11 stdint support is required")
-require(HAS_CXX11_VARIADIC_TEMPLATES "C++11 variadic templates required")
+macro(create_test TARGET_NAME SOURCE)
+    add_executable(${TARGET_NAME} ${SOURCE})
+    target_link_libraries(
+        ${TARGET_NAME}
+        entityx
+        glog
+        ${Boost_LIBRARIES}
+        ${GTEST_BOTH_LIBRARIES}
+        )
+    add_test(${TARGET_NAME} ${TARGET_NAME})
+endmacro()
+
+message("-- Checking C++ features")
+require(HAS_CXX11_AUTO "C++11 auto support")
+require(HAS_CXX11_NULLPTR "C++11 nullptr support")
+require(HAS_CXX11_RVALUE_REFERENCES "C++11 rvalue reference support")
+#require(HAS_CXX11_CSTDINT_H "C++11 stdint support")
+require(HAS_CXX11_VARIADIC_TEMPLATES "C++11 variadic templates")
+require(HAS_CXX11_RVALUE_REFERENCES "C++11 rvalue references")
+
+message("-- Checking misc features")
+require(CMAKE_HAVE_STDINT_H "stdint.h")
 
 enable_testing()
 find_package(GTest REQUIRED)
 set(Boost_USE_STATIC_LIBS OFF)
 set(Boost_USE_MULTITHREADED ON)
 set(Boost_USE_STATIC_RUNTIME OFF)
-#find_package(Boost REQUIRED COMPONENTS)
-find_package(Boost 1.36.0 REQUIRED COMPONENTS signals)
-
-set(CMAKE_CXX_FLAGS "-ansi -pedantic -Werror -Wall -Wextra -Wno-unused-parameter -Wno-error=unused-variable -std=c++11")
-set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
-set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
-set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+find_package(Boost 1.48.0 REQUIRED COMPONENTS signals)
 
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Werror -Wall -Wextra -Wno-unused-parameter -Wno-error=unused-variable -std=c++11")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
+set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g")
 
-include_directories(
-    ${Boost_INCLUDE_DIR}
-    ${GTest_INCLUDE_DIR}
-    )
-add_executable(
-    entityx_test
-    entityx/Components_test.cc
-    entityx/Entity_test.cc
-    entityx/Event_test.cc
-    entityx/System_test.cc
-    )
-target_link_libraries(
-    entityx_test
-    entityx
-    glog
-    ${Boost_LIBRARIES}
-    ${GTEST_BOTH_LIBRARIES}
-    )
-add_test(AllTestsInentityx_test entityx_test)
 add_library(
     entityx
+    STATIC SHARED
     entityx/Components.cc
     entityx/System.cc
     entityx/Event.cc
     entityx/Entity.cc
     entityx/World.cc
     )
+
+include_directories(
+    ${Boost_INCLUDE_DIR}
+    ${GTest_INCLUDE_DIR}
+    )
+
+create_test(entity_test entityx/Entity_test.cc)
+create_test(component_test entityx/Components_test.cc)
+create_test(event_test entityx/Event_test.cc)
+create_test(system_test entityx/System_test.cc)
+
+file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/entityx/*.h")
+install(FILES ${headers} DESTINATION "include/entityx")
+
+install(TARGETS entityx
+  LIBRARY DESTINATION lib
+  ARCHIVE DESTINATION lib
+)
index fc1243f10ed3443195515468c2d3c67bf6a47035..80e684d710df0d920b021fa1963f62dcfd9b5818 100644 (file)
@@ -21,17 +21,19 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
 SET(CHECK_CXX11_OLD_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})\r
 IF(CMAKE_COMPILER_IS_GNUCXX)\r
        SET(CMAKE_CXX_FLAGS "-std=c++0x")\r
-endif()\r
+ELSE("${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang")\r
+       SET(CMAKE_CXX_FLAGS "-std=c++11")\r
+ENDIF()\r
 \r
 MACRO(CXX11_CHECK_FEATURE FEATURE_NAME FEATURE_NUMBER RESULT_VAR)\r
        IF (NOT DEFINED ${RESULT_VAR})\r
                SET(_bindir "${CMAKE_CURRENT_BINARY_DIR}/cxx11/cxx11_${FEATURE_NAME}")\r
 \r
                IF (${FEATURE_NUMBER})\r
-                       SET(_SRCFILE_BASE ${CMAKE_CURRENT_LIST_DIR}/c++11-test-${FEATURE_NAME}-N${FEATURE_NUMBER})\r
+                       SET(_SRCFILE_BASE ${CMAKE_CURRENT_LIST_DIR}/cxx11/c++11-test-${FEATURE_NAME}-N${FEATURE_NUMBER})\r
                        SET(_LOG_NAME "\"${FEATURE_NAME}\" (N${FEATURE_NUMBER})")\r
                ELSE (${FEATURE_NUMBER})\r
-                       SET(_SRCFILE_BASE ${CMAKE_CURRENT_LIST_DIR}/c++11-test-${FEATURE_NAME})\r
+                       SET(_SRCFILE_BASE ${CMAKE_CURRENT_LIST_DIR}/cxx11/c++11-test-${FEATURE_NAME})\r
                        SET(_LOG_NAME "\"${FEATURE_NAME}\"")\r
                ENDIF (${FEATURE_NUMBER})\r
                MESSAGE(STATUS "Checking C++11 support for ${_LOG_NAME}")\r
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index be258b2..0000000
--- a/Makefile
+++ /dev/null
@@ -1,407 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 2.8
-
-# Default target executed when no arguments are given to make.
-default_target: all
-.PHONY : default_target
-
-#=============================================================================
-# Special targets provided by cmake.
-
-# Disable implicit rules so canonical targets will work.
-.SUFFIXES:
-
-# Remove some rules from gmake that .SUFFIXES does not remove.
-SUFFIXES =
-
-.SUFFIXES: .hpux_make_needs_suffix_list
-
-# Suppress display of executed commands.
-$(VERBOSE).SILENT:
-
-# A target that is always out of date.
-cmake_force:
-.PHONY : cmake_force
-
-#=============================================================================
-# Set environment variables for the build.
-
-# The shell in which to execute make rules.
-SHELL = /bin/sh
-
-# The CMake executable.
-CMAKE_COMMAND = /usr/local/Cellar/cmake/2.8.9/bin/cmake
-
-# The command to remove a file.
-RM = /usr/local/Cellar/cmake/2.8.9/bin/cmake -E remove -f
-
-# Escaping for special characters.
-EQUALS = =
-
-# The program to use to edit the cache.
-CMAKE_EDIT_COMMAND = /usr/local/Cellar/cmake/2.8.9/bin/ccmake
-
-# The top-level source directory on which CMake was run.
-CMAKE_SOURCE_DIR = /Users/alec/Projects/entityx
-
-# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /Users/alec/Projects/entityx
-
-#=============================================================================
-# Targets provided globally by CMake.
-
-# Special rule for the target edit_cache
-edit_cache:
-       @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
-       /usr/local/Cellar/cmake/2.8.9/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-.PHONY : edit_cache
-
-# Special rule for the target edit_cache
-edit_cache/fast: edit_cache
-.PHONY : edit_cache/fast
-
-# Special rule for the target rebuild_cache
-rebuild_cache:
-       @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
-       /usr/local/Cellar/cmake/2.8.9/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-.PHONY : rebuild_cache
-
-# Special rule for the target rebuild_cache
-rebuild_cache/fast: rebuild_cache
-.PHONY : rebuild_cache/fast
-
-# Special rule for the target test
-test:
-       @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
-       /usr/local/Cellar/cmake/2.8.9/bin/ctest --force-new-ctest-process $(ARGS)
-.PHONY : test
-
-# Special rule for the target test
-test/fast: test
-.PHONY : test/fast
-
-# The main all target
-all: cmake_check_build_system
-       $(CMAKE_COMMAND) -E cmake_progress_start /Users/alec/Projects/entityx/CMakeFiles /Users/alec/Projects/entityx/CMakeFiles/progress.marks
-       $(MAKE) -f CMakeFiles/Makefile2 all
-       $(CMAKE_COMMAND) -E cmake_progress_start /Users/alec/Projects/entityx/CMakeFiles 0
-.PHONY : all
-
-# The main clean target
-clean:
-       $(MAKE) -f CMakeFiles/Makefile2 clean
-.PHONY : clean
-
-# The main clean target
-clean/fast: clean
-.PHONY : clean/fast
-
-# Prepare targets for installation.
-preinstall: all
-       $(MAKE) -f CMakeFiles/Makefile2 preinstall
-.PHONY : preinstall
-
-# Prepare targets for installation.
-preinstall/fast:
-       $(MAKE) -f CMakeFiles/Makefile2 preinstall
-.PHONY : preinstall/fast
-
-# clear depends
-depend:
-       $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
-.PHONY : depend
-
-#=============================================================================
-# Target rules for targets named entityx
-
-# Build rule for target.
-entityx: cmake_check_build_system
-       $(MAKE) -f CMakeFiles/Makefile2 entityx
-.PHONY : entityx
-
-# fast build rule for target.
-entityx/fast:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/build
-.PHONY : entityx/fast
-
-#=============================================================================
-# Target rules for targets named entityx_test
-
-# Build rule for target.
-entityx_test: cmake_check_build_system
-       $(MAKE) -f CMakeFiles/Makefile2 entityx_test
-.PHONY : entityx_test
-
-# fast build rule for target.
-entityx_test/fast:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/build
-.PHONY : entityx_test/fast
-
-entityx/Components.o: entityx/Components.cc.o
-.PHONY : entityx/Components.o
-
-# target to build an object file
-entityx/Components.cc.o:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/Components.cc.o
-.PHONY : entityx/Components.cc.o
-
-entityx/Components.i: entityx/Components.cc.i
-.PHONY : entityx/Components.i
-
-# target to preprocess a source file
-entityx/Components.cc.i:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/Components.cc.i
-.PHONY : entityx/Components.cc.i
-
-entityx/Components.s: entityx/Components.cc.s
-.PHONY : entityx/Components.s
-
-# target to generate assembly for a file
-entityx/Components.cc.s:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/Components.cc.s
-.PHONY : entityx/Components.cc.s
-
-entityx/Components_test.o: entityx/Components_test.cc.o
-.PHONY : entityx/Components_test.o
-
-# target to build an object file
-entityx/Components_test.cc.o:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/entityx/Components_test.cc.o
-.PHONY : entityx/Components_test.cc.o
-
-entityx/Components_test.i: entityx/Components_test.cc.i
-.PHONY : entityx/Components_test.i
-
-# target to preprocess a source file
-entityx/Components_test.cc.i:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/entityx/Components_test.cc.i
-.PHONY : entityx/Components_test.cc.i
-
-entityx/Components_test.s: entityx/Components_test.cc.s
-.PHONY : entityx/Components_test.s
-
-# target to generate assembly for a file
-entityx/Components_test.cc.s:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/entityx/Components_test.cc.s
-.PHONY : entityx/Components_test.cc.s
-
-entityx/Entity.o: entityx/Entity.cc.o
-.PHONY : entityx/Entity.o
-
-# target to build an object file
-entityx/Entity.cc.o:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/Entity.cc.o
-.PHONY : entityx/Entity.cc.o
-
-entityx/Entity.i: entityx/Entity.cc.i
-.PHONY : entityx/Entity.i
-
-# target to preprocess a source file
-entityx/Entity.cc.i:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/Entity.cc.i
-.PHONY : entityx/Entity.cc.i
-
-entityx/Entity.s: entityx/Entity.cc.s
-.PHONY : entityx/Entity.s
-
-# target to generate assembly for a file
-entityx/Entity.cc.s:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/Entity.cc.s
-.PHONY : entityx/Entity.cc.s
-
-entityx/Entity_test.o: entityx/Entity_test.cc.o
-.PHONY : entityx/Entity_test.o
-
-# target to build an object file
-entityx/Entity_test.cc.o:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/entityx/Entity_test.cc.o
-.PHONY : entityx/Entity_test.cc.o
-
-entityx/Entity_test.i: entityx/Entity_test.cc.i
-.PHONY : entityx/Entity_test.i
-
-# target to preprocess a source file
-entityx/Entity_test.cc.i:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/entityx/Entity_test.cc.i
-.PHONY : entityx/Entity_test.cc.i
-
-entityx/Entity_test.s: entityx/Entity_test.cc.s
-.PHONY : entityx/Entity_test.s
-
-# target to generate assembly for a file
-entityx/Entity_test.cc.s:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/entityx/Entity_test.cc.s
-.PHONY : entityx/Entity_test.cc.s
-
-entityx/Event.o: entityx/Event.cc.o
-.PHONY : entityx/Event.o
-
-# target to build an object file
-entityx/Event.cc.o:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/Event.cc.o
-.PHONY : entityx/Event.cc.o
-
-entityx/Event.i: entityx/Event.cc.i
-.PHONY : entityx/Event.i
-
-# target to preprocess a source file
-entityx/Event.cc.i:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/Event.cc.i
-.PHONY : entityx/Event.cc.i
-
-entityx/Event.s: entityx/Event.cc.s
-.PHONY : entityx/Event.s
-
-# target to generate assembly for a file
-entityx/Event.cc.s:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/Event.cc.s
-.PHONY : entityx/Event.cc.s
-
-entityx/Event_test.o: entityx/Event_test.cc.o
-.PHONY : entityx/Event_test.o
-
-# target to build an object file
-entityx/Event_test.cc.o:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/entityx/Event_test.cc.o
-.PHONY : entityx/Event_test.cc.o
-
-entityx/Event_test.i: entityx/Event_test.cc.i
-.PHONY : entityx/Event_test.i
-
-# target to preprocess a source file
-entityx/Event_test.cc.i:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/entityx/Event_test.cc.i
-.PHONY : entityx/Event_test.cc.i
-
-entityx/Event_test.s: entityx/Event_test.cc.s
-.PHONY : entityx/Event_test.s
-
-# target to generate assembly for a file
-entityx/Event_test.cc.s:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/entityx/Event_test.cc.s
-.PHONY : entityx/Event_test.cc.s
-
-entityx/System.o: entityx/System.cc.o
-.PHONY : entityx/System.o
-
-# target to build an object file
-entityx/System.cc.o:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/System.cc.o
-.PHONY : entityx/System.cc.o
-
-entityx/System.i: entityx/System.cc.i
-.PHONY : entityx/System.i
-
-# target to preprocess a source file
-entityx/System.cc.i:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/System.cc.i
-.PHONY : entityx/System.cc.i
-
-entityx/System.s: entityx/System.cc.s
-.PHONY : entityx/System.s
-
-# target to generate assembly for a file
-entityx/System.cc.s:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/System.cc.s
-.PHONY : entityx/System.cc.s
-
-entityx/System_test.o: entityx/System_test.cc.o
-.PHONY : entityx/System_test.o
-
-# target to build an object file
-entityx/System_test.cc.o:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/entityx/System_test.cc.o
-.PHONY : entityx/System_test.cc.o
-
-entityx/System_test.i: entityx/System_test.cc.i
-.PHONY : entityx/System_test.i
-
-# target to preprocess a source file
-entityx/System_test.cc.i:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/entityx/System_test.cc.i
-.PHONY : entityx/System_test.cc.i
-
-entityx/System_test.s: entityx/System_test.cc.s
-.PHONY : entityx/System_test.s
-
-# target to generate assembly for a file
-entityx/System_test.cc.s:
-       $(MAKE) -f CMakeFiles/entityx_test.dir/build.make CMakeFiles/entityx_test.dir/entityx/System_test.cc.s
-.PHONY : entityx/System_test.cc.s
-
-entityx/World.o: entityx/World.cc.o
-.PHONY : entityx/World.o
-
-# target to build an object file
-entityx/World.cc.o:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/World.cc.o
-.PHONY : entityx/World.cc.o
-
-entityx/World.i: entityx/World.cc.i
-.PHONY : entityx/World.i
-
-# target to preprocess a source file
-entityx/World.cc.i:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/World.cc.i
-.PHONY : entityx/World.cc.i
-
-entityx/World.s: entityx/World.cc.s
-.PHONY : entityx/World.s
-
-# target to generate assembly for a file
-entityx/World.cc.s:
-       $(MAKE) -f CMakeFiles/entityx.dir/build.make CMakeFiles/entityx.dir/entityx/World.cc.s
-.PHONY : entityx/World.cc.s
-
-# Help Target
-help:
-       @echo "The following are some of the valid targets for this Makefile:"
-       @echo "... all (the default if no target is provided)"
-       @echo "... clean"
-       @echo "... depend"
-       @echo "... edit_cache"
-       @echo "... entityx"
-       @echo "... entityx_test"
-       @echo "... rebuild_cache"
-       @echo "... test"
-       @echo "... entityx/Components.o"
-       @echo "... entityx/Components.i"
-       @echo "... entityx/Components.s"
-       @echo "... entityx/Components_test.o"
-       @echo "... entityx/Components_test.i"
-       @echo "... entityx/Components_test.s"
-       @echo "... entityx/Entity.o"
-       @echo "... entityx/Entity.i"
-       @echo "... entityx/Entity.s"
-       @echo "... entityx/Entity_test.o"
-       @echo "... entityx/Entity_test.i"
-       @echo "... entityx/Entity_test.s"
-       @echo "... entityx/Event.o"
-       @echo "... entityx/Event.i"
-       @echo "... entityx/Event.s"
-       @echo "... entityx/Event_test.o"
-       @echo "... entityx/Event_test.i"
-       @echo "... entityx/Event_test.s"
-       @echo "... entityx/System.o"
-       @echo "... entityx/System.i"
-       @echo "... entityx/System.s"
-       @echo "... entityx/System_test.o"
-       @echo "... entityx/System_test.i"
-       @echo "... entityx/System_test.s"
-       @echo "... entityx/World.o"
-       @echo "... entityx/World.i"
-       @echo "... entityx/World.s"
-.PHONY : help
-
-
-
-#=============================================================================
-# Special targets to cleanup operation of make.
-
-# Special rule to run CMake to check the build system integrity.
-# No rule that depends on this can have commands that come from listfiles
-# because they might be regenerated.
-cmake_check_build_system:
-       $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
-.PHONY : cmake_check_build_system
-
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..6f2bdb3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+# EntityX - A C++ Entity Component System
+
diff --git a/c++11/c++11-test-__func__-N2340.cpp b/c++11/c++11-test-__func__-N2340.cpp
deleted file mode 100644 (file)
index c10dd18..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <cstring>\r
-\r
-int main()\r
-{\r
-       if (!__func__) { return 1; }\r
-       if(std::strlen(__func__) <= 0) { return 1; }\r
-       return 0;\r
-}\r
diff --git a/c++11/c++11-test-auto-N2546.cpp b/c++11/c++11-test-auto-N2546.cpp
deleted file mode 100644 (file)
index dbff414..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-\r
-int main()\r
-{\r
-       auto i = 5;\r
-       auto f = 3.14159f;\r
-       auto d = 3.14159;\r
-       bool ret = (\r
-               (sizeof(f) < sizeof(d)) &&\r
-               (sizeof(i) == sizeof(int))\r
-       );\r
-       return ret ? 0 : 1;\r
-}\r
diff --git a/c++11/c++11-test-constexpr-N2235.cpp b/c++11/c++11-test-constexpr-N2235.cpp
deleted file mode 100644 (file)
index 9f969e4..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-constexpr int square(int x)\r
-{\r
-       return x*x;\r
-}\r
-\r
-constexpr int the_answer()\r
-{\r
-       return 42;\r
-}\r
-\r
-int main()\r
-{\r
-       int test_arr[square(3)];\r
-       bool ret = (\r
-               (square(the_answer()) == 1764) &&\r
-               (sizeof(test_arr)/sizeof(test_arr[0]) == 9)\r
-       );\r
-       return ret ? 0 : 1;\r
-}\r
diff --git a/c++11/c++11-test-cstdint.cpp b/c++11/c++11-test-cstdint.cpp
deleted file mode 100644 (file)
index 58d4381..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <cstdint>\r
-int main()\r
-{\r
-       bool test = \r
-               (sizeof(int8_t) == 1) &&\r
-               (sizeof(int16_t) == 2) &&\r
-               (sizeof(int32_t) == 4) &&\r
-               (sizeof(int64_t) == 8);\r
-       return test ? 0 : 1;\r
-}\r
diff --git a/c++11/c++11-test-decltype-N2343.cpp b/c++11/c++11-test-decltype-N2343.cpp
deleted file mode 100644 (file)
index d023885..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-\r
-bool check_size(int i)\r
-{\r
-       return sizeof(int) == sizeof(decltype(i));\r
-}\r
-\r
-int main()\r
-{\r
-       bool ret = check_size(42);\r
-       return ret ? 0 : 1;\r
-}\r
diff --git a/c++11/c++11-test-lambda-N2927.cpp b/c++11/c++11-test-lambda-N2927.cpp
deleted file mode 100644 (file)
index b86ad17..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-int main()\r
-{\r
-       int ret = 0;\r
-       return ([&ret]() -> int { return ret; })();\r
-}\r
diff --git a/c++11/c++11-test-long_long-N1811.cpp b/c++11/c++11-test-long_long-N1811.cpp
deleted file mode 100644 (file)
index 2ae6988..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-int main(void)\r
-{\r
-       long long l;\r
-       unsigned long long ul;\r
-\r
-       return ((sizeof(l) >= 8) && (sizeof(ul) >= 8)) ? 0 : 1;\r
-}\r
diff --git a/c++11/c++11-test-nullptr-N2431.cpp b/c++11/c++11-test-nullptr-N2431.cpp
deleted file mode 100644 (file)
index 6c5ae66..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-int main()\r
-{\r
-       int* test = nullptr;\r
-       return test ? 1 : 0;\r
-}\r
diff --git a/c++11/c++11-test-nullptr-N2431_fail_compile.cpp b/c++11/c++11-test-nullptr-N2431_fail_compile.cpp
deleted file mode 100644 (file)
index 5747f1b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-int main()\r
-{\r
-       int i = nullptr;\r
-       return 1;\r
-}\r
diff --git a/c++11/c++11-test-rvalue_references-N2118.cpp b/c++11/c++11-test-rvalue_references-N2118.cpp
deleted file mode 100644 (file)
index ef4e421..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-int foo(int& lvalue)\r
-{\r
-       return 123;\r
-}\r
-\r
-int foo(int&& rvalue)\r
-{\r
-       return 321;\r
-}\r
-\r
-int main()\r
-{\r
-       int i = 42;\r
-       return ((foo(i) == 123) && (foo(42) == 321)) ? 0 : 1;\r
-}\r
diff --git a/c++11/c++11-test-sizeof_member-N2253.cpp b/c++11/c++11-test-sizeof_member-N2253.cpp
deleted file mode 100644 (file)
index 3049ed1..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-struct foo {\r
-       char bar;\r
-       int baz;\r
-};\r
-\r
-int main(void)\r
-{\r
-       bool ret = (\r
-               (sizeof(foo::bar) == 1) &&\r
-               (sizeof(foo::baz) >= sizeof(foo::bar)) &&\r
-               (sizeof(foo) >= sizeof(foo::bar)+sizeof(foo::baz))\r
-       );\r
-       return ret ? 0 : 1;\r
-}\r
diff --git a/c++11/c++11-test-static_assert-N1720.cpp b/c++11/c++11-test-static_assert-N1720.cpp
deleted file mode 100644 (file)
index eae3c9a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-int main()\r
-{\r
-       static_assert(0 < 1, "your ordering of integers is screwed");\r
-       return 0;\r
-}\r
diff --git a/c++11/c++11-test-static_assert-N1720_fail_compile.cpp b/c++11/c++11-test-static_assert-N1720_fail_compile.cpp
deleted file mode 100644 (file)
index d97b679..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-int main()\r
-{\r
-       static_assert(1 < 0, "this should fail");\r
-       return 0;\r
-}\r
diff --git a/c++11/c++11-test-variadic_templates-N2555.cpp b/c++11/c++11-test-variadic_templates-N2555.cpp
deleted file mode 100644 (file)
index 79fae84..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-int Accumulate()\r
-{\r
-       return 0;\r
-}\r
-\r
-template<typename T, typename... Ts>\r
-int Accumulate(T v, Ts... vs)\r
-{\r
-       return v + Accumulate(vs...);\r
-}\r
-\r
-template<int... Is>\r
-int CountElements()\r
-{\r
-       return sizeof...(Is);\r
-}\r
-\r
-int main()\r
-{\r
-       int acc = Accumulate(1, 2, 3, 4, -5);\r
-       int count = CountElements<1,2,3,4,5>();\r
-       return ((acc == 5) && (count == 5)) ? 0 : 1;\r
-}\r
diff --git a/c++11/demo.cpp b/c++11/demo.cpp
deleted file mode 100644 (file)
index 782681b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-\r
-#include <iostream>\r
-\r
-int main()\r
-{\r
-       std::cout << "Testing\n";\r
-       std::cout << "Has static_assert: " <<\r
-#ifdef HAS_CXX11_STATIC_ASSERT\r
-               "yes :)"\r
-#else\r
-               "no"\r
-#endif\r
-               << "\n";\r
-       std::cout << "Has variadic templates: " <<\r
-#ifdef HAS_CXX11_VARIADIC_TEMPLATES\r
-               "yes :)"\r
-#else\r
-               "no"\r
-#endif\r
-               << "\n";\r
-       return 0;\r
-}\r
-\r
diff --git a/cxx11/c++11-test-__func__-N2340.cpp b/cxx11/c++11-test-__func__-N2340.cpp
new file mode 100644 (file)
index 0000000..c10dd18
--- /dev/null
@@ -0,0 +1,8 @@
+#include <cstring>\r
+\r
+int main()\r
+{\r
+       if (!__func__) { return 1; }\r
+       if(std::strlen(__func__) <= 0) { return 1; }\r
+       return 0;\r
+}\r
diff --git a/cxx11/c++11-test-auto-N2546.cpp b/cxx11/c++11-test-auto-N2546.cpp
new file mode 100644 (file)
index 0000000..dbff414
--- /dev/null
@@ -0,0 +1,12 @@
+\r
+int main()\r
+{\r
+       auto i = 5;\r
+       auto f = 3.14159f;\r
+       auto d = 3.14159;\r
+       bool ret = (\r
+               (sizeof(f) < sizeof(d)) &&\r
+               (sizeof(i) == sizeof(int))\r
+       );\r
+       return ret ? 0 : 1;\r
+}\r
diff --git a/cxx11/c++11-test-constexpr-N2235.cpp b/cxx11/c++11-test-constexpr-N2235.cpp
new file mode 100644 (file)
index 0000000..9f969e4
--- /dev/null
@@ -0,0 +1,19 @@
+constexpr int square(int x)\r
+{\r
+       return x*x;\r
+}\r
+\r
+constexpr int the_answer()\r
+{\r
+       return 42;\r
+}\r
+\r
+int main()\r
+{\r
+       int test_arr[square(3)];\r
+       bool ret = (\r
+               (square(the_answer()) == 1764) &&\r
+               (sizeof(test_arr)/sizeof(test_arr[0]) == 9)\r
+       );\r
+       return ret ? 0 : 1;\r
+}\r
diff --git a/cxx11/c++11-test-cstdint.cpp b/cxx11/c++11-test-cstdint.cpp
new file mode 100644 (file)
index 0000000..58d4381
--- /dev/null
@@ -0,0 +1,10 @@
+#include <cstdint>\r
+int main()\r
+{\r
+       bool test = \r
+               (sizeof(int8_t) == 1) &&\r
+               (sizeof(int16_t) == 2) &&\r
+               (sizeof(int32_t) == 4) &&\r
+               (sizeof(int64_t) == 8);\r
+       return test ? 0 : 1;\r
+}\r
diff --git a/cxx11/c++11-test-decltype-N2343.cpp b/cxx11/c++11-test-decltype-N2343.cpp
new file mode 100644 (file)
index 0000000..d023885
--- /dev/null
@@ -0,0 +1,11 @@
+\r
+bool check_size(int i)\r
+{\r
+       return sizeof(int) == sizeof(decltype(i));\r
+}\r
+\r
+int main()\r
+{\r
+       bool ret = check_size(42);\r
+       return ret ? 0 : 1;\r
+}\r
diff --git a/cxx11/c++11-test-lambda-N2927.cpp b/cxx11/c++11-test-lambda-N2927.cpp
new file mode 100644 (file)
index 0000000..b86ad17
--- /dev/null
@@ -0,0 +1,5 @@
+int main()\r
+{\r
+       int ret = 0;\r
+       return ([&ret]() -> int { return ret; })();\r
+}\r
diff --git a/cxx11/c++11-test-long_long-N1811.cpp b/cxx11/c++11-test-long_long-N1811.cpp
new file mode 100644 (file)
index 0000000..2ae6988
--- /dev/null
@@ -0,0 +1,7 @@
+int main(void)\r
+{\r
+       long long l;\r
+       unsigned long long ul;\r
+\r
+       return ((sizeof(l) >= 8) && (sizeof(ul) >= 8)) ? 0 : 1;\r
+}\r
diff --git a/cxx11/c++11-test-nullptr-N2431.cpp b/cxx11/c++11-test-nullptr-N2431.cpp
new file mode 100644 (file)
index 0000000..6c5ae66
--- /dev/null
@@ -0,0 +1,5 @@
+int main()\r
+{\r
+       int* test = nullptr;\r
+       return test ? 1 : 0;\r
+}\r
diff --git a/cxx11/c++11-test-nullptr-N2431_fail_compile.cpp b/cxx11/c++11-test-nullptr-N2431_fail_compile.cpp
new file mode 100644 (file)
index 0000000..5747f1b
--- /dev/null
@@ -0,0 +1,5 @@
+int main()\r
+{\r
+       int i = nullptr;\r
+       return 1;\r
+}\r
diff --git a/cxx11/c++11-test-rvalue_references-N2118.cpp b/cxx11/c++11-test-rvalue_references-N2118.cpp
new file mode 100644 (file)
index 0000000..ef4e421
--- /dev/null
@@ -0,0 +1,15 @@
+int foo(int& lvalue)\r
+{\r
+       return 123;\r
+}\r
+\r
+int foo(int&& rvalue)\r
+{\r
+       return 321;\r
+}\r
+\r
+int main()\r
+{\r
+       int i = 42;\r
+       return ((foo(i) == 123) && (foo(42) == 321)) ? 0 : 1;\r
+}\r
diff --git a/cxx11/c++11-test-sizeof_member-N2253.cpp b/cxx11/c++11-test-sizeof_member-N2253.cpp
new file mode 100644 (file)
index 0000000..3049ed1
--- /dev/null
@@ -0,0 +1,14 @@
+struct foo {\r
+       char bar;\r
+       int baz;\r
+};\r
+\r
+int main(void)\r
+{\r
+       bool ret = (\r
+               (sizeof(foo::bar) == 1) &&\r
+               (sizeof(foo::baz) >= sizeof(foo::bar)) &&\r
+               (sizeof(foo) >= sizeof(foo::bar)+sizeof(foo::baz))\r
+       );\r
+       return ret ? 0 : 1;\r
+}\r
diff --git a/cxx11/c++11-test-static_assert-N1720.cpp b/cxx11/c++11-test-static_assert-N1720.cpp
new file mode 100644 (file)
index 0000000..eae3c9a
--- /dev/null
@@ -0,0 +1,5 @@
+int main()\r
+{\r
+       static_assert(0 < 1, "your ordering of integers is screwed");\r
+       return 0;\r
+}\r
diff --git a/cxx11/c++11-test-static_assert-N1720_fail_compile.cpp b/cxx11/c++11-test-static_assert-N1720_fail_compile.cpp
new file mode 100644 (file)
index 0000000..d97b679
--- /dev/null
@@ -0,0 +1,5 @@
+int main()\r
+{\r
+       static_assert(1 < 0, "this should fail");\r
+       return 0;\r
+}\r
diff --git a/cxx11/c++11-test-variadic_templates-N2555.cpp b/cxx11/c++11-test-variadic_templates-N2555.cpp
new file mode 100644 (file)
index 0000000..79fae84
--- /dev/null
@@ -0,0 +1,23 @@
+int Accumulate()\r
+{\r
+       return 0;\r
+}\r
+\r
+template<typename T, typename... Ts>\r
+int Accumulate(T v, Ts... vs)\r
+{\r
+       return v + Accumulate(vs...);\r
+}\r
+\r
+template<int... Is>\r
+int CountElements()\r
+{\r
+       return sizeof...(Is);\r
+}\r
+\r
+int main()\r
+{\r
+       int acc = Accumulate(1, 2, 3, 4, -5);\r
+       int count = CountElements<1,2,3,4,5>();\r
+       return ((acc == 5) && (count == 5)) ? 0 : 1;\r
+}\r
diff --git a/cxx11/demo.cpp b/cxx11/demo.cpp
new file mode 100644 (file)
index 0000000..782681b
--- /dev/null
@@ -0,0 +1,23 @@
+\r
+#include <iostream>\r
+\r
+int main()\r
+{\r
+       std::cout << "Testing\n";\r
+       std::cout << "Has static_assert: " <<\r
+#ifdef HAS_CXX11_STATIC_ASSERT\r
+               "yes :)"\r
+#else\r
+               "no"\r
+#endif\r
+               << "\n";\r
+       std::cout << "Has variadic templates: " <<\r
+#ifdef HAS_CXX11_VARIADIC_TEMPLATES\r
+               "yes :)"\r
+#else\r
+               "no"\r
+#endif\r
+               << "\n";\r
+       return 0;\r
+}\r
+\r
index e832c15b3ce25a8ef16c7a5035e63727075b63ba..e7763bbcfc67e44dfd80b17160728cbe36969c9b 100644 (file)
@@ -11,7 +11,7 @@
 #pragma once
 
 
-#include <inttypes.h>
+#include <stdint.h>
 #include <algorithm>
 #include <bitset>
 #include <cassert>
index 510da8fbf1fe0b0bab06deaae5a880ab8dd5bf9d..ac6a632c0bf0fba4cb16425d4e10341f0e2ca82f 100644 (file)
@@ -10,7 +10,7 @@
 
 #pragma once
 
-#include <inttypes.h>
+#include <stdint.h>
 #include <boost/shared_ptr.hpp>
 #include <boost/bind.hpp>
 #include <boost/function.hpp>
@@ -139,7 +139,7 @@ class EventManager : boost::noncopyable {
     return it->second;
   } 
 
-  // Functor used as a event signal callback that casts to E.
+  // Functor used as an event signal callback that casts to E.
   template <typename E>
   struct EventCallbackWrapper {
     EventCallbackWrapper(boost::function<void (const E &)> callback) : callback(callback) {}
index ad6a9bac5bdf06951a7f4b8fed3663cea74507ac..c2cead90b592ee38f316e60634ede4d0f5860140 100644 (file)
@@ -11,7 +11,7 @@
 #pragma once
 
 
-#include <inttypes.h>
+#include <stdint.h>
 #include <boost/noncopyable.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/unordered_map.hpp>