#
# Threading Building Blocks library
#
-SET(FEATURE_TBB_HAVE_BUNDLED TRUE)
-SET(TBB_FOLDER "${CMAKE_SOURCE_DIR}/bundled/tbb30_104oss")
-OPTION(DEAL_II_FORCE_BUNDLED_TBB
- "Always use the bundled tbb library instead of an external one."
- OFF)
+IF(NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
+ SET(FEATURE_TBB_HAVE_BUNDLED TRUE)
+ SET(TBB_FOLDER "${CMAKE_SOURCE_DIR}/bundled/tbb30_104oss")
+ OPTION(DEAL_II_FORCE_BUNDLED_TBB
+ "Always use the bundled tbb library instead of an external one."
+ OFF)
+ENDIF()
IF(FEATURE_TBB_BUNDLED_CONFIGURED)
ADD_SUBDIRECTORY(${TBB_FOLDER}/src)
tbb/tbb_thread.cpp
)
-DEAL_II_ADD_LIBRARY(obj_tbb OBJECT ${src_tbb})
-
#
# Add necessary definitions:
#
LIST(APPEND obj_tbb_DEFINITIONS "USE_PTHREAD")
ENDIF()
-IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
- LIST(APPEND obj_tbb_DEFINITIONS "-DUSE_WINTHREAD")
+IF(CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
+ MESSAGE(FATAL_ERROR "No support for internal tbb and CYGWIN atm.")
+ #LIST(APPEND obj_tbb_DEFINITIONS
+ # "USE_WINTHREAD"
+ # "_WIN32"
+ # "__MSVCRT_VERSION__=0x0700"
+ # )
+ #ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-msse")
+ #ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-mthreads")
ENDIF()
+DEAL_II_ADD_LIBRARY(obj_tbb OBJECT ${src_tbb})
+
DEAL_II_ADD_DEFINITIONS(obj_tbb ${obj_tbb_DEFINITIONS})
ENDIF()
ENDIF()
+
+#
+# Disable shared libraries on cygwin targets for the moment. Shared
+# libraries on Windows are a bit buggy atm.
+#
+# - Matthias Maier, 2012
+#
+IF(CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
+ MESSAGE(WARNING "\n"
+ "BUILD_SHARED_LIBS forced to OFF\n\n"
+ )
+ SET(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
+ENDIF()
+
CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H)
+CHECK_INCLUDE_FILE("sys/resource.h" HAVE_SYS_RESOURCE_H)
+
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE("sys/syscall.h" HAVE_SYS_SYSCALL_H)
CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H)
+
#
# Check for various posix specific functions:
#
# Configuration for functionparser
#
-OPTION(DEAL_II_WITH_FUNCTIONPARSER
- "Build deal.II with support for functionparser."
- OFF)
-
-
MACRO(FEATURE_FUNCTIONPARSER_FIND_EXTERNAL var)
MESSAGE(STATUS
"No module available for finding functionparser externally."
MACRO(FEATURE_METIS_FIND_EXTERNAL var)
FIND_PACKAGE(METIS)
- IF(METIS_FOUND AND METIS_MAJOR GREATER 4)
- SET(${var} TRUE)
- ELSE()
- MESSAGE(WARNING "\n"
- "Could not find a sufficient modern metis installation: "
- "Version 5.x required!\n\n"
- )
- UNSET(METIS_LIBRARY CACHE)
- UNSET(METIS_INCLUDE_DIR CACHE)
- UNSET(METIS_DIR CACHE)
- UNSET(METIS_FOUND CACHE)
+ IF(METIS_FOUND)
+ IF(AND METIS_MAJOR GREATER 4)
+ SET(${var} TRUE)
+ ELSE()
+ MESSAGE(WARNING "\n"
+ "Could not find a sufficient modern metis installation: "
+ "Version 5.x required!\n\n"
+ )
+ UNSET(METIS_LIBRARY CACHE)
+ UNSET(METIS_INCLUDE_DIR CACHE)
+ UNSET(METIS_DIR CACHE)
+ UNSET(METIS_FOUND CACHE)
+ ENDIF()
ENDIF()
ENDMACRO()
PROJECT(step-1)
-DEAL_II_IMPORT_LIBRARY()
-
ADD_EXECUTABLE(step-1 step-1.cc)
DEAL_II_SETUP_TARGET(step-1)
/* Defined if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H
+/* Defined if you have the <sys/resource.h> header file */
+#cmakedefine HAVE_SYS_RESOURCE_H
+
/* Defined if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H
#include <deal.II/base/memory_consumption.h>
#include <deal.II/base/thread_management.h>
-// include sys/resource.h for rusage(). Mac OS X needs sys/time.h then
-// as well (strange), so include that, too.
-#ifndef DEAL_II_MSVC
+#if defined(HAVE_SYS_RESOURCE_H) and defined(HAVE_UNISTD_H)
# include <sys/resource.h>
# include <unistd.h>
#endif
void
LogStream::print_line_head()
{
-#ifndef DEAL_II_MSVC
+#if defined(HAVE_SYS_RESOURCE_H) and defined(HAVE_UNISTD_H)
rusage usage;
double utime = 0.;
if (print_utime)
#
# TODO: Remove this dependency when lapack_templates is removed
#
-ADD_DEPENDENCIES(obj_lac.inst lapack_templates)
+#ADD_DEPENDENCIES(obj_lac.inst lapack_templates)
#ifdef HAVE_ISNAN
isnan(check_value) ||
#else
-# if HAVE_UNDERSCORE_ISNAN
+# ifdef HAVE_UNDERSCORE_ISNAN
// on Microsoft Windows, the
// function is called _isnan
_isnan(check_value) ||