mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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)
12 lines
256 B
CMake
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 ()
|
|
|