Added VERBOSE CMake option and made various prints optional to clean the output. VERBOSE is by off by default, pass cmake -DVERBOSE=ON to re-enable various non-critical warning and status prints (important warnings are still visible regardless of the flag).

This commit is contained in:
jpekkila
2020-08-21 21:19:42 +03:00
parent 9f676a6d5d
commit d966afe830
11 changed files with 55 additions and 17 deletions

View File

@@ -42,6 +42,7 @@ option(DOUBLE_PRECISION "Generates double precision code." OF
option(BUILD_SAMPLES "Builds projects in samples subdirectory." ON)
option(MPI_ENABLED "Enables additional functions for MPI communciation." OFF)
option(MULTIGPU_ENABLED "Enables multi-GPU on a single node. Uses peer-to-peer communication instead of MPI. Affects Legacy & Node layers only." ON)
option(VERBOSE "Enables various status and warning messages" OFF)
## Options (DEPRECATED)
# option(BUILD_DEBUG "Builds the program with extensive error checking" OFF)
@@ -77,6 +78,9 @@ add_custom_target(dsl_headers ALL DEPENDS ${DSL_HEADERS})
if (DOUBLE_PRECISION)
add_definitions(-DAC_DOUBLE_PRECISION=1)
endif ()
if (VERBOSE)
add_definitions(-DAC_VERBOSE=1)
endif ()
if (MPI_ENABLED)
find_package(MPI REQUIRED COMPONENTS C)
include_directories(${MPI_C_INCLUDE_DIRS})