#
# ./check/check_for_compiler_bugs.cmake
#
-# and enable language features:
-#
# ./check/check_for_cxx_features.cmake
#
-# TODO: There is a bit of ambiguity. Clarify with Wolfgang.
-#
#
# ######################
#
# For the moment we assume that CC and CXX are the same compiler.
-# (We only need CC for the compilation of the bundled umfpack library.)
+# We need CC for the compilation of the bundled umfpack library only...
# So, give a prominent error message in case CC and CXX differ:
#
IF(NOT ( ${CMAKE_C_COMPILER_ID} STREQUAL ${CMAKE_CXX_COMPILER_ID} AND
)
ENDIF()
+
+
#
# Setup CMAKE_CXX_FLAGS<_RELEASE|_DEBUG>:
#
ENDIF(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
+
#
# Setup CMAKE_C_FLAGS<_RELEASE|_DEBUG>:
#
SET(CMAKE_C_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
#
-# Strip some CXX-only flags
+# Strip some -W* flags and all CXX-only flags.
+# This is mainly to silence the build of contrib UMFPACK.
#
-
+STRIP_FLAG(CMAKE_C_FLAGS "-Wall")
STRIP_FLAG(CMAKE_C_FLAGS "-Wsynth")
+STRIP_FLAG(CMAKE_C_FLAGS "-Wsign-compare")
STRIP_FLAG(CMAKE_C_FLAGS_RELEASE "-felide-constructors")
umfpack_triplet_to_col.c
)
-#
-# Disable some warning for the compilation of UMFPACK:
-#
-ENABLE_IF_SUPPORTED(obj_umfpack_COMPILE_FLAGS "-Wno-pragmas")
-ENABLE_IF_SUPPORTED(obj_umfpack_COMPILE_FLAGS "-Wno-sign-compare")
-
#-------------------------------------------------------------------------------
# compile each int and long routine (with no real/complex version)
#-------------------------------------------------------------------------------
ADD_LIBRARY(obj_umfpack_I_UMF OBJECT ${src_umfpack_UMF})
-SET_TARGET_PROPERTIES(obj_umfpack_I_UMF PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDINT")
+SET_TARGET_PROPERTIES(obj_umfpack_I_UMF PROPERTIES COMPILE_FLAGS "-DDINT")
ADD_LIBRARY(obj_umfpack_L_UMF OBJECT ${src_umfpack_UMF})
-SET_TARGET_PROPERTIES(obj_umfpack_L_UMF PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDLONG")
+SET_TARGET_PROPERTIES(obj_umfpack_L_UMF PROPERTIES COMPILE_FLAGS "-DDLONG")
ADD_LIBRARY(obj_umfpack_I_UMFPACK OBJECT ${src_umfpack_UMFPACK})
-SET_TARGET_PROPERTIES(obj_umfpack_I_UMFPACK PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDINT")
+SET_TARGET_PROPERTIES(obj_umfpack_I_UMFPACK PROPERTIES COMPILE_FLAGS "-DDINT")
ADD_LIBRARY(obj_umfpack_L_UMFPACK OBJECT ${src_umfpack_UMFPACK})
-SET_TARGET_PROPERTIES(obj_umfpack_L_UMFPACK PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDLONG")
+SET_TARGET_PROPERTIES(obj_umfpack_L_UMFPACK PROPERTIES COMPILE_FLAGS "-DDLONG")
#-------------------------------------------------------------------------------
# compile each routine in the DI version
#-------------------------------------------------------------------------------
ADD_LIBRARY(obj_umfpack_DI_TSOLVE OBJECT umf_ltsolve.c umf_utsolve.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DI_TSOLVE PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDINT -DCONJUGATE_SOLVE")
+SET_TARGET_PROPERTIES(obj_umfpack_DI_TSOLVE PROPERTIES COMPILE_FLAGS "-DDINT -DCONJUGATE_SOLVE")
ADD_LIBRARY(obj_umfpack_DI_TRIPLET_MAP_NOX OBJECT umf_triplet.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DI_TRIPLET_MAP_NOX PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDINT -DDO_MAP")
+SET_TARGET_PROPERTIES(obj_umfpack_DI_TRIPLET_MAP_NOX PROPERTIES COMPILE_FLAGS "-DDINT -DDO_MAP")
ADD_LIBRARY(obj_umfpack_DI_TRIPLET_MAP_X OBJECT umf_triplet.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DI_TRIPLET_MAP_X PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDINT -DDO_MAP -DDO_VALUES")
+SET_TARGET_PROPERTIES(obj_umfpack_DI_TRIPLET_MAP_X PROPERTIES COMPILE_FLAGS "-DDINT -DDO_MAP -DDO_VALUES")
ADD_LIBRARY(obj_umfpack_DI_TRIPLET_NOMAP_X OBJECT umf_triplet.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DI_TRIPLET_NOMAP_X PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDINT -DDO_VALUES")
+SET_TARGET_PROPERTIES(obj_umfpack_DI_TRIPLET_NOMAP_X PROPERTIES COMPILE_FLAGS "-DDINT -DDO_VALUES")
ADD_LIBRARY(obj_umfpack_DI_STORE OBJECT umf_store_lu.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DI_STORE PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDINT -DDROP")
+SET_TARGET_PROPERTIES(obj_umfpack_DI_STORE PROPERTIES COMPILE_FLAGS "-DDINT -DDROP")
ADD_LIBRARY(obj_umfpack_DI_ASSEMBLE OBJECT umf_assemble.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DI_ASSEMBLE PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDINT -DFIXQ")
+SET_TARGET_PROPERTIES(obj_umfpack_DI_ASSEMBLE PROPERTIES COMPILE_FLAGS "-DDINT -DFIXQ")
ADD_LIBRARY(obj_umfpack_DI_SOLVE OBJECT umfpack_solve.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DI_SOLVE PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDINT -DWSOLVE")
+SET_TARGET_PROPERTIES(obj_umfpack_DI_SOLVE PROPERTIES COMPILE_FLAGS "-DDINT -DWSOLVE")
#-------------------------------------------------------------------------------
# compile each routine in the DL version
#-------------------------------------------------------------------------------
ADD_LIBRARY(obj_umfpack_DL_TSOLVE OBJECT umf_ltsolve.c umf_utsolve.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DL_TSOLVE PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDLONG -DCONJUGATE_SOLVE")
+SET_TARGET_PROPERTIES(obj_umfpack_DL_TSOLVE PROPERTIES COMPILE_FLAGS "-DDLONG -DCONJUGATE_SOLVE")
ADD_LIBRARY(obj_umfpack_DL_TRIPLET_MAP_NOX OBJECT umf_triplet.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DL_TRIPLET_MAP_NOX PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDLONG -DDO_MAP")
+SET_TARGET_PROPERTIES(obj_umfpack_DL_TRIPLET_MAP_NOX PROPERTIES COMPILE_FLAGS "-DDLONG -DDO_MAP")
ADD_LIBRARY(obj_umfpack_DL_TRIPLET_MAP_X OBJECT umf_triplet.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DL_TRIPLET_MAP_X PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDLONG -DDO_MAP -DDO_VALUES")
+SET_TARGET_PROPERTIES(obj_umfpack_DL_TRIPLET_MAP_X PROPERTIES COMPILE_FLAGS "-DDLONG -DDO_MAP -DDO_VALUES")
ADD_LIBRARY(obj_umfpack_DL_TRIPLET_NOMAP_X OBJECT umf_triplet.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DL_TRIPLET_NOMAP_X PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDLONG -DDO_VALUES")
+SET_TARGET_PROPERTIES(obj_umfpack_DL_TRIPLET_NOMAP_X PROPERTIES COMPILE_FLAGS "-DDLONG -DDO_VALUES")
ADD_LIBRARY(obj_umfpack_DL_STORE OBJECT umf_store_lu.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DL_STORE PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDLONG -DDROP")
+SET_TARGET_PROPERTIES(obj_umfpack_DL_STORE PROPERTIES COMPILE_FLAGS "-DDLONG -DDROP")
ADD_LIBRARY(obj_umfpack_DL_ASSEMBLE OBJECT umf_assemble.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DL_ASSEMBLE PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDLONG -DFIXQ")
+SET_TARGET_PROPERTIES(obj_umfpack_DL_ASSEMBLE PROPERTIES COMPILE_FLAGS "-DDLONG -DFIXQ")
ADD_LIBRARY(obj_umfpack_DL_SOLVE OBJECT umfpack_solve.c)
-SET_TARGET_PROPERTIES(obj_umfpack_DL_SOLVE PROPERTIES COMPILE_FLAGS "${obj_umfpack_COMPILE_FLAGS} -DDLONG -DWSOLVE")
+SET_TARGET_PROPERTIES(obj_umfpack_DL_SOLVE PROPERTIES COMPILE_FLAGS "-DDLONG -DWSOLVE")
#-------------------------------------------------------------------------------
# Create the generic routines (GN) using a generic rule