# and if successfull return TRUE:
SETUP_THREADING(${var})
- # We have to disable a bunch of warnings:
- ENABLE_IF_AVAILABLE(CMAKE_CXX_FLAGS "-Wno-long-long")
-
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/contrib/tbb/tbb30_104oss/include
)
#
# Add necessary definitions:
#
-
IF(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
- SET(TBB_COMPILE_FLAGS "${TBB_COMPILE_FLAGS} -DDO_ITT_NOTIFY")
+ ADD_FLAGS(TBB_COMPILE_FLAGS "-DDO_ITT_NOTIFY")
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- SET(TBB_COMPILE_FLAGS "${TBB_COMPILE_FLAGS} -DTBB_USE_DEBUG")
+ ADD_FLAGS(TBB_COMPILE_FLAGS "-DTBB_USE_DEBUG")
ENDIF()
IF(DEAL_II_USE_MT_POSIX)
- SET(TBB_COMPILE_FLAGS "${TBB_COMPILE_FLAGS} -DUSE_PTHREAD")
+ ADD_FLAGS(TBB_COMPILE_FLAGS "-DUSE_PTHREAD")
+ENDIF()
+
+IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
+ ADD_FLAGS(TBB_COMPILE_FLAGS "-DUSE_WINTHREAD")
ENDIF()
+
+#
+# We have to disable a bunch of warnings:
+#
+ENABLE_IF_AVAILABLE(TBB_COMPILE_FLAGS "-Wno-parentheses")
+ENABLE_IF_AVAILABLE(TBB_COMPILE_FLAGS "-Wno-long-long")
+
+
SET_TARGET_PROPERTIES(obj_tbb PROPERTIES
COMPILE_FLAGS ${TBB_COMPILE_FLAGS})