Просмотр исходного кода

test: pass NOMINMAX where cr.h is included

Michele Caini 6 лет назад
Родитель
Сommit
962b068c92
2 измененных файлов с 3 добавлено и 1 удалено
  1. 1 0
      TODO
  2. 2 1
      test/CMakeLists.txt

+ 1 - 0
TODO

@@ -30,6 +30,7 @@
     * meta: use type_id, remove import, everything should work transparently
     * type_id_enabled and fallback on old-fashioned families otherwise
     * add discard pool functionality (+ test)
+  - clean up target_compile_definitions test/CMakeLists.txt (_EXPORT/_IMPORT)
   - use type_id also for groups, get rid of extent and subfunctions, is it possible?
   - reintroduce old-fashion family and add a new family-like thing with generators
   - families should be defined as out-of-class to guarantee the same identifiers for the same types

+ 2 - 1
test/CMakeLists.txt

@@ -60,9 +60,10 @@ macro(SETUP_PLUGIN_TEST TEST_NAME)
     SETUP_TARGET(_${TEST_NAME}_plugin)
     SETUP_BASIC_TEST(lib_${TEST_NAME}_plugin plugin/${TEST_NAME}/main.cpp)
     target_link_libraries(lib_${TEST_NAME}_plugin PRIVATE ${CMAKE_DL_LIBS})
-    target_compile_definitions(lib_${TEST_NAME}_plugin PRIVATE PLUGIN="$<TARGET_FILE:_${TEST_NAME}_plugin>")
     target_include_directories(lib_${TEST_NAME}_plugin PRIVATE ${CR_SRC_DIR})
+    target_compile_definitions(lib_${TEST_NAME}_plugin PRIVATE NOMINMAX PLUGIN="$<TARGET_FILE:_${TEST_NAME}_plugin>")
     target_include_directories(_${TEST_NAME}_plugin PRIVATE ${CR_SRC_DIR})
+    target_compile_definitions(_${TEST_NAME}_plugin PRIVATE NOMINMAX)
 endmacro()
 
 # Test benchmark