From 6fd2bc1eeb81d20d6d6cd37c0edff299e425c2e2 Mon Sep 17 00:00:00 2001 From: Rob Falgout Date: Fri, 18 Mar 2016 08:16:00 -0700 Subject: [PATCH] Fixed a CMake compile problem and modified a couple of autotest scripts Added "make distclean" to the end of both the 'basictest.sh' and 'cmaketest.sh' autotest scripts to avoid situations where previously compiled test drivers are accidentally used in a test where the build failed. --- AUTOTEST/basictest.sh | 4 ++++ AUTOTEST/cmaketest.sh | 12 +++++++++++- src/CMakeLists.txt | 6 +++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/AUTOTEST/basictest.sh b/AUTOTEST/basictest.sh index c7e23c562..b6a13540f 100755 --- a/AUTOTEST/basictest.sh +++ b/AUTOTEST/basictest.sh @@ -99,3 +99,7 @@ for errfile in $( find $output_dir ! -size 0 -name "*.err" ) do echo $errfile >&2 done + +# Clean up +( cd $src_dir; make distclean ) + diff --git a/AUTOTEST/cmaketest.sh b/AUTOTEST/cmaketest.sh index 8f84ce08c..a1c82253c 100755 --- a/AUTOTEST/cmaketest.sh +++ b/AUTOTEST/cmaketest.sh @@ -13,6 +13,8 @@ testname=`basename $0 .sh` +drivers="ij new_ij sstruct struct ams_driver maxwell_unscaled sstruct_fac ij_mv struct_migrate" + # Echo usage information case $1 in -h|-help) @@ -94,7 +96,7 @@ make $mopts install cd $src_dir/test/cmbuild cmake .. make $mopts -mv -f ij new_ij sstruct struct ams_driver maxwell_unscaled sstruct_fac ij_mv struct_migrate .. +mv -f $drivers .. cd $test_dir @@ -115,3 +117,11 @@ for errfile in $( find $output_dir ! -size 0 -name "*.err" ) do echo $errfile >&2 done + +# Clean up +cd $src_dir +rm -fr `echo cmbuild/* | sed 's/[^ ]*README.txt//g'` +rm -fr `echo test/cmbuild/* | sed 's/[^ ]*README.txt//g'` +rm -fr hypre +( cd $src_dir/test; rm -f $drivers; cleantest.sh ) + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3422c0f5f..e3aa78ece 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -773,7 +773,11 @@ if (HYPRE_USING_OPENMP) endif (HYPRE_USING_OPENMP) # Turn optimization off for this file -set_source_files_properties (lapack/dlamch.c PROPERTIES COMPILE_FLAGS /Od) +if (MSVC) + set_source_files_properties (lapack/dlamch.c PROPERTIES COMPILE_FLAGS /Od) +else () + set_source_files_properties (lapack/dlamch.c PROPERTIES COMPILE_FLAGS -O0) +endif () if (MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS)