Michele Caini пре 6 година
родитељ
комит
93b09836da

+ 9 - 7
.github/workflows/build.yml

@@ -5,7 +5,7 @@ on: [push, pull_request]
 jobs:
 
   linux:
-    timeout-minutes: 5
+    timeout-minutes: 10
 
     strategy:
       matrix:
@@ -29,16 +29,18 @@ jobs:
       run: ctest --timeout 5 -C Debug -j4
 
   windows:
-    timeout-minutes: 5
+    timeout-minutes: 10
 
     strategy:
       matrix:
         os: [windows-latest, windows-2016]
+        toolset: [clang-cl, default]
         include:
-          - os: windows-latest
-            generator: Visual Studio 16 2019
+          - toolset: clang-cl
+            toolset_option: -T"ClangCl"
+        exclude:
           - os: windows-2016
-            generator: Visual Studio 15 2017
+            toolset: clang-cl
 
     runs-on: ${{ matrix.os }}
 
@@ -47,7 +49,7 @@ jobs:
     - name: Compile tests
       working-directory: build
       run: |
-        cmake -DBUILD_TESTING=ON -DBUILD_LIB=ON -DCMAKE_CXX_FLAGS=/W1 -G"${{ matrix.generator }}" ..
+        cmake -DBUILD_TESTING=ON -DBUILD_LIB=ON ${{ matrix.toolset_option }} ..
         cmake --build . -j 4
     - name: Run tests
       working-directory: build
@@ -56,7 +58,7 @@ jobs:
       run: ctest --timeout 5 -C Debug -j4
 
   macos:
-    timeout-minutes: 5
+    timeout-minutes: 10
     runs-on: macOS-latest
 
     steps:

+ 1 - 1
.github/workflows/coverage.yml

@@ -5,7 +5,7 @@ on: [push, pull_request]
 jobs:
 
   codecov:
-    timeout-minutes: 30
+    timeout-minutes: 10
     runs-on: ubuntu-latest
 
     steps:

+ 1 - 1
.github/workflows/deploy.yml

@@ -8,7 +8,7 @@ on:
 jobs:
 
   conan:
-    timeout-minutes: 5
+    timeout-minutes: 10
     runs-on: ubuntu-latest
 
     steps:

+ 0 - 12
CMakeLists.txt

@@ -36,7 +36,6 @@ message("*")
 
 option(USE_LIBCPP "Use libc++ by adding -stdlib=libc++ flag if availbale." ON)
 option(USE_ASAN "Use address sanitizer by adding -fsanitize=address -fno-omit-frame-pointer flags" OFF)
-option(USE_COMPILE_OPTIONS "Use compile options from EnTT." ON)
 
 #
 # Compiler stuff
@@ -88,17 +87,6 @@ if(USE_ASAN)
     target_link_libraries(EnTT INTERFACE $<$<AND:$<CONFIG:Debug>,$<NOT:$<PLATFORM_ID:Windows>>>:-fsanitize=address -fno-omit-frame-pointer>)
 endif()
 
-if(USE_COMPILE_OPTIONS)
-    target_compile_options(
-        EnTT
-        INTERFACE $<$<AND:$<CONFIG:Debug>,$<NOT:$<PLATFORM_ID:Windows>>>:-O0 -g>
-        # it seems that -O3 ruins a bit the performance when using clang ...
-        INTERFACE $<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:Clang>,$<OR:$<PLATFORM_ID:Darwin>,$<PLATFORM_ID:Linux>>>:-O2>
-        # ... on the other side, GCC is incredibly comfortable with it.
-        INTERFACE $<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:GNU>>:-O3>
-    )
-endif()
-
 if(HAS_LIBCPP)
     target_compile_options(EnTT BEFORE INTERFACE -stdlib=libc++)
 endif()

+ 1 - 0
TODO

@@ -36,3 +36,4 @@
   - can implicitly generate types for meta benefit from a similar approach?
 * detect family on a macro based model
 * is it possible to make named type constraints namespace-free?
+* stomp -> merge (naming is hard as heck, it's known thing)

+ 1 - 1
src/entt/signal/emitter.hpp

@@ -179,7 +179,7 @@ public:
         friend class emitter;
 
         /*! @brief Default constructor. */
-        connection() ENTT_NOEXCEPT = default;
+        connection() noexcept(noexcept(typename event_handler<Event>::connection_type{})) = default;
 
         /**
          * @brief Creates a connection that wraps its underlying instance.

+ 18 - 17
test/CMakeLists.txt

@@ -5,25 +5,26 @@
 include_directories($<TARGET_PROPERTY:EnTT,INTERFACE_INCLUDE_DIRECTORIES>)
 add_compile_options($<TARGET_PROPERTY:EnTT,INTERFACE_COMPILE_OPTIONS>)
 
-macro(SETUP_LIBRARY_TARGET LIB_TARGET)
-    set_target_properties(${LIB_TARGET} PROPERTIES CXX_EXTENSIONS OFF)
-    target_compile_definitions(${LIB_TARGET} PRIVATE $<TARGET_PROPERTY:EnTT,INTERFACE_COMPILE_DEFINITIONS>)
-    target_compile_features(${LIB_TARGET} PRIVATE $<TARGET_PROPERTY:EnTT,INTERFACE_COMPILE_FEATURES>)
-    target_compile_options(${LIB_TARGET} PRIVATE $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-pedantic -Wall -Wshadow>)
-    target_compile_options(${LIB_TARGET} PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/EHsc /W2>)
+macro(SETUP_TARGET TARGET_NAME)
+    set_target_properties(${TARGET_NAME} PROPERTIES CXX_EXTENSIONS OFF)
+    target_link_libraries(${TARGET_NAME} PRIVATE EnTT)
+
+    target_compile_options(
+        ${TARGET_NAME}
+        PRIVATE $<$<AND:$<CONFIG:Debug>,$<NOT:$<PLATFORM_ID:Windows>>>:-O0 -g -pedantic -Wall -Wshadow>
+        PRIVATE $<$<AND:$<CONFIG:Release>,$<NOT:$<PLATFORM_ID:Windows>>>:-O2 -pedantic -Wall -Wshadow>
+        PRIVATE $<$<AND:$<CONFIG:Debug>,$<PLATFORM_ID:Windows>>:/EHsc /W1>
+        PRIVATE $<$<AND:$<CONFIG:Release>,$<PLATFORM_ID:Windows>>:/EHsc /W1 /O2>
+    )
 endmacro()
 
 add_library(odr OBJECT odr.cpp)
-SETUP_LIBRARY_TARGET(odr)
+SETUP_TARGET(odr)
 
 macro(SETUP_AND_ADD_TEST TEST_NAME TEST_SOURCE)
     add_executable(${TEST_NAME} $<TARGET_OBJECTS:odr> ${TEST_SOURCE})
-    set_target_properties(${TEST_NAME} PROPERTIES CXX_EXTENSIONS OFF)
-    target_link_libraries(${TEST_NAME} PRIVATE EnTT GTest::Main Threads::Threads)
-    target_compile_definitions(${TEST_NAME} PRIVATE $<TARGET_PROPERTY:EnTT,INTERFACE_COMPILE_DEFINITIONS>)
-    target_compile_features(${TEST_NAME} PRIVATE $<TARGET_PROPERTY:EnTT,INTERFACE_COMPILE_FEATURES>)
-    target_compile_options(${TEST_NAME} PRIVATE $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-pedantic -Wall -Wshadow>)
-    target_compile_options(${TEST_NAME} PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/EHsc /W2>)
+    target_link_libraries(${TEST_NAME} PRIVATE GTest::Main Threads::Threads)
+    SETUP_TARGET(${TEST_NAME})
     add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME})
 endmacro()
 
@@ -41,10 +42,10 @@ if(BUILD_LIB)
     add_library(another_module_shared SHARED lib/another_module.cpp)
     add_library(another_module_static STATIC lib/another_module.cpp)
 
-    SETUP_LIBRARY_TARGET(a_module_shared)
-    SETUP_LIBRARY_TARGET(a_module_static)
-    SETUP_LIBRARY_TARGET(another_module_shared)
-    SETUP_LIBRARY_TARGET(another_module_static)
+    SETUP_TARGET(a_module_shared)
+    SETUP_TARGET(a_module_static)
+    SETUP_TARGET(another_module_shared)
+    SETUP_TARGET(another_module_static)
 
     SETUP_AND_ADD_TEST(lib_shared lib/lib.cpp)
     target_link_libraries(lib_shared PRIVATE a_module_shared another_module_shared)