Although this is an invalid naming (it just read CMAKE_CXX_FLAGS) it is
just way too easy to accidentally use it...
git-svn-id: https://svn.dealii.org/trunk@31850
0785d39b-7218-0410-832d-
ea1e28bc413d
UNSET(ENV{CXXFLAGS})
UNSET(ENV{LDFLAGS})
+#
+# Also respect DEAL_II_CXX_FLAGS - it just too easy to accientally write
+# DEAL_II_CXX_FLAGS instead of CMAKE_CXX_FLAGS... (this was a poor design
+# choice, I know...)
+#
+IF(NOT "${DEAL_II_CXX_FLAGS}" STREQUAL "")
+ MESSAGE(STATUS
+ "Appending \${DEAL_II_CXX_FLAGS} to saved \${CMAKE_CXX_FLAGS}"
+ )
+ SET(CMAKE_CXX_FLAGS_SAVED "${CMAKE_CXX_FLAGS_SAVED} ${DEAL_II_CXX_FLAGS}")
+ENDIF()
+
+
########################################################################
# #
#
MESSAGE(STATUS "")
-IF(NOT "${CMAKE_CXX_FLAGS_SAVED}" STREQUAL "${DEAL_II_CXX_FLAGS_SAVED}")
+IF(NOT "${CMAKE_CXX_FLAGS_SAVED}" STREQUAL "${CACHED_CMAKE_CXX_FLAGS_SAVED}")
# Rerun this test if cxx flags changed:
UNSET(DEAL_II_HAVE_USABLE_CXX_FLAGS CACHE)
ENDIF()
-SET(DEAL_II_CXX_FLAGS_SAVED "${CMAKE_CXX_FLAGS_SAVED}" CACHE INTERNAL "" FORCE)
+SET(CACHED_CMAKE_CXX_FLAGS_SAVED "${CMAKE_CXX_FLAGS_SAVED}" CACHE INTERNAL "" FORCE)
# Initialize all CMAKE_REQUIRED_* variables a this point:
RESET_CMAKE_REQUIRED()
MESSAGE(FATAL_ERROR "\n"
"Configuration error: Cannot compile with the user supplied CXX flags:\n"
"${CMAKE_CXX_FLAGS_SAVED}\n"
+ "Please check the CMake variable CMAKE_CXX_FLAGS and the\n"
+ "environment variable CXXFLAGS\n\n"
)
ENDIF()
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams