Skip to content

Commit

Permalink
Merge pull request #2596 from chuckatkins/fix-python-test-dep
Browse files Browse the repository at this point in the history
Fix test dependency options to ignore python when testing is disabled
  • Loading branch information
Chuck Atkins authored Jan 22, 2021
2 parents a7d9507 + 2454aaf commit dd822e3
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 22 deletions.
15 changes: 3 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bindings/Matlab/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..

2 changes: 1 addition & 1 deletion cmake/DetectOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion scripts/conda/adios2/superbuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/images/centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/images/centos8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/images/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ RUN git clone https://github.com/ornladios/adios2.git source && \
. /etc/profile && \
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 && \
Expand Down
2 changes: 1 addition & 1 deletion scripts/runconf/runconf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cmake -DCMAKE_INSTALL_PREFIX=${PWD}/install \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DADIOS2_BUILD_TESTING=${VALUE} \
-DBUILD_TESTING=${VALUE} \
-DADIOS2_BUILD_EXAMPLES=${VALUE} \
-DADIOS2_USE_Endian_Reverse=OFF \
${ADIOS2_SOURCE}
Expand Down
6 changes: 3 additions & 3 deletions scripts/runconf/runconf_olcf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if [ `hostname | cut -c 1-5` == "titan" ]; then
-DADIOS2_USE_Python=OFF \
-DADIOS2_BUILD_EXAMPLES_EXPERIMENTAL=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DADIOS2_BUILD_TESTING=OFF \
-DBUILD_TESTING=OFF \
${EXTERNAL_OPTS} \
${SRCDIR}

Expand Down Expand Up @@ -118,7 +118,7 @@ elif [ `hostname -f | cut -c 1-9` == "summitdev" ]; then
-DADIOS2_USE_Python=OFF \
-DADIOS2_BUILD_EXAMPLES_EXPERIMENTAL=OFF \
-DCMAKE_BUILD_TYPE=Debug \
-DADIOS2_BUILD_TESTING=ON \
-DBUILD_TESTING=ON \
-DADIOS2_USE_DataMan=OFF \
${EXTERNAL_OPTS} \
${SRCDIR}
Expand Down Expand Up @@ -156,7 +156,7 @@ elif [ `hostname -f | cut -c 1-4` == "rhea" ]; then
-DADIOS2_USE_SST=OFF \
-DADIOS2_BUILD_EXAMPLES_EXPERIMENTAL=OFF \
-DCMAKE_BUILD_TYPE=Debug \
-DADIOS2_BUILD_TESTING=ON \
-DBUILD_TESTING=ON \
-DADIOS2_USE_DataMan=OFF \
${EXTERNAL_OPTS} \
${SRCDIR}
Expand Down

0 comments on commit dd822e3

Please sign in to comment.