diff --git a/CMakeLists.txt b/CMakeLists.txt index 1cb09a2eb..2e8e9e646 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,11 @@ if(NOT GPROF) set(GPROF NO) endif() +#CONDITIONAL FLAG to turn on TESTING_MODE +if(NOT TESTING_MODE) + set(TESTING_MODE YES) +endif() + #Creates the Graphitti project with the correct languages, depending on if using GPU or not #If using CUDA, also verify the CUDA package and set the required CUDA variables if(ENABLE_CUDA) @@ -72,6 +77,11 @@ if(GPROF) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg") endif() +if(TESTING_MODE) + message("-- Setting TESTING_MODE: ON") + add_definitions(-DTESTING_MODE) +endif() + #HDF5 Support, finds HDF5 package for C and C++ and links the hdf5 libraries to the executable \ # later in the file. find_package(HDF5 COMPONENTS C CXX) diff --git a/Simulator/Core/Graphitti_Main.cpp b/Simulator/Core/Graphitti_Main.cpp index 318e0a664..bf8bdb1f3 100644 --- a/Simulator/Core/Graphitti_Main.cpp +++ b/Simulator/Core/Graphitti_Main.cpp @@ -35,6 +35,10 @@ using namespace std; /// @return -1 if error, else 0 if success. int main(int argc, char *argv[]) { +#ifdef TESTING_MODE + cout << "Testing mode is ON \n"; +#endif + // Clear logging files at the start of each simulation fstream("Output/Debug/logging.txt", ios::out | ios::trunc); fstream("Output/Debug/vertices.txt", ios::out | ios::trunc);