opm-simulators/cmake/Modules/UseFastBuilds.cmake
Roland Kaufmann 52a36f77fa Recognize Clang to be a GCC-compatible compiler
Clang aims to be compatible with GCC when it comes to command-line
parameters. Where we enable functionality based on the presence of
a GCC-compiler, we can use the same functionality with Clang.

This patch introduces a new variable CXX_COMPAT_GCC which is true if
the compiler handles the same options as GCC, and this variable is
subsequently used in tests instead of CMAKE_COMPILER_IS_GNUCXX (which
remains if we need to test if we really have GCC, e.g. for version)
2013-08-14 23:39:05 +02:00

12 lines
256 B
CMake

# - Try to build faster depending on the compiler
# faster builds by using a pipe instead of temp files
include (AddOptions)
include (UseCompVer)
is_compiler_gcc_compatible ()
if (CXX_COMPAT_GCC)
add_options (ALL_LANGUAGES ALL_BUILDS "-pipe")
endif ()