diff --git a/CMakeLists.txt b/CMakeLists.txt index 226ef108..7feeddd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,9 @@ list (APPEND opm-core_INCLUDE_DIRS "${opm-core_INCLUDE_DIR}") set (opm-core_MODULE_DIR "${PROJECT_SOURCE_DIR}/cmake/Modules") list (APPEND CMAKE_MODULE_PATH ${opm-core_MODULE_DIR}) +# use tricks to do faster builds +include (UseFastBuilds) + # macro to set standard variables (INCLUDE_DIRS, LIBRARIES etc.) include (OpmFind) diff --git a/cmake/Modules/UseFastBuilds.cmake b/cmake/Modules/UseFastBuilds.cmake new file mode 100644 index 00000000..cd954a93 --- /dev/null +++ b/cmake/Modules/UseFastBuilds.cmake @@ -0,0 +1,8 @@ +# - Try to build faster depending on the compiler + +# faster builds by using a pipe instead of temp files +include (AddOptions) +if (CMAKE_COMPILER_IS_GNUCXX) + add_options (ALL_LANGUAGES ALL_BUILDS "-pipe") +endif (CMAKE_COMPILER_IS_GNUCXX) +