Commit 2454aafa authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Fix test dependency options to ignore python when testing is disabled

parent 3401dd09
Loading
Loading
Loading
Loading
+3 −12
Original line number Diff line number Diff line
@@ -114,6 +114,8 @@ if((NOT BUILD_SHARED_LIBS) AND (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE))
  set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()

include(CTest)

adios_option(Blosc     "Enable support for Blosc transforms" AUTO)
adios_option(BZip2     "Enable support for BZip2 transforms" AUTO)
adios_option(ZFP       "Enable support for ZFP transforms" AUTO)
@@ -222,22 +224,11 @@ endif()
#------------------------------------------------------------------------------#
# Testing
#------------------------------------------------------------------------------#
if(DEFINED BUILD_TESTING)
  set(ADIOS2_BUILD_TESTING_DEFAULT ${BUILD_TESTING})
else()
  set(ADIOS2_BUILD_TESTING_DEFAULT ON)
endif()
unset(BUILD_TESTING)
option(ADIOS2_BUILD_TESTING "Build the ADIOS2 testing tree" 
  ${ADIOS2_BUILD_TESTING_DEFAULT})

cmake_dependent_option(ADIOS2_RUN_MPI_MPMD_TESTS
  "Enable the parallel MPMD tests" ON
  "ADIOS2_BUILD_TESTING;ADIOS2_HAVE_MPI" OFF)
  "BUILD_TESTING;ADIOS2_HAVE_MPI" OFF)
mark_as_advanced(ADIOS2_RUN_MPI_MPMD_TESTS)

include(CTest)
set(BUILD_TESTING ${ADIOS2_BUILD_TESTING})
if(BUILD_TESTING)
  find_program(DIFF_EXECUTABLE diff)
  if(DIFF_EXECUTABLE)
+1 −1
Original line number Diff line number Diff line
@@ -43,5 +43,5 @@ $ cd <your adios source>
$ git pull
$ mkdir build.lean
$ cd build.lean
$ cmake -DCMAKE_INSTALL_PREFIX=/opt/adios/lean -DADIOS2_USE_MPI=OFF -DADIOS2_USE_Fortran=OFF -DADIOS2_USE_Python=OFF -DADIOS2_BUILD_EXAMPLES_EXPERIMENTAL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DADIOS2_ENABLE_PIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DADIOS2_BUILD_TESTING=OFF -DADIOS2_USE_SST=OFF -DADIOS2_USE_BZip2=OFF -DADIOS2_USE_DataMan=OFF  ..
$ cmake -DCMAKE_INSTALL_PREFIX=/opt/adios/lean -DADIOS2_USE_MPI=OFF -DADIOS2_USE_Fortran=OFF -DADIOS2_USE_Python=OFF -DADIOS2_BUILD_EXAMPLES_EXPERIMENTAL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DADIOS2_ENABLE_PIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_TESTING=OFF -DADIOS2_USE_SST=OFF -DADIOS2_USE_BZip2=OFF -DADIOS2_USE_DataMan=OFF  ..
+1 −1
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ if(Python_FOUND)
endif()

# Even if no python support, we still want the interpreter for tests
if(NOT Python_Interpreter_FOUND)
if(BUILD_TESTING AND NOT Python_Interpreter_FOUND)
  find_package(Python REQUIRED COMPONENTS Interpreter)
endif()

+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ ExternalProject_Add(adios2
    -DCMAKE_BUILD_TYPE=Release
    -DBUILD_SHARED_LIBS=ON
    -DADIOS2_BUILD_EXAMPLES=OFF
    -DADIOS2_BUILD_TESTING=OFF
    -DBUILD_TESTING=OFF
    -DADIOS2_USE_Python=ON
    -DPYTHON_EXECUTABLE=$ENV{PYTHON}
    -DADIOS2_USE_MPI=ON
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ RUN git clone https://github.com/ornladios/adios2.git source && \
    module load mpi && \
    cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX=/opt/adios/${adios_ver_dir} \
      -DADIOS2_BUILD_TESTING=OFF \
      -DBUILD_TESTING=OFF \
      -DADIOS2_BUILD_EXAMPLES=OFF \
      ../source && \
    make -j$(grep -c '^processor' /proc/cpuinfo) install && \
Loading