Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Aug 26, 2020
1 parent 7ddbfe7 commit 7b874db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
16 changes: 7 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This is part of the PIO library.

# This is the CMake build file for the main directory.

# Jim Edwards

cmake_minimum_required (VERSION 2.8.12)
project (PIO C Fortran)
#cmake_policy(VERSION 3.5.2)
Expand Down Expand Up @@ -198,7 +204,7 @@ endif ()
# System Name
string (TOUPPER "${CMAKE_SYSTEM_NAME}" CMAKE_SYSTEM_NAME_CAPS)
set (CMAKE_SYSTEM_DIRECTIVE "${CMAKE_SYSTEM_NAME_CAPS}"
CACHE STRING "System name preprocessor directive" FORCE)
CACHE STRING "System name preprocessor directive")

# C Compiler Name
string (TOUPPER "${CMAKE_C_COMPILER_ID}" CMAKE_C_COMPILER_NAME)
Expand Down Expand Up @@ -447,16 +453,8 @@ configure_file (
)

# Configure test scripts.
cmake_print_variables(WITH_MPIEXEC)
if (NOT WITH_MPIEXEC)
set(WITH_MPIEXEC mpiexec)
endif()
set(MPIEXEC "${WITH_MPIEXEC}" CACHE INTERNAL "")
set_property(GLOBAL PROPERTY WITH_MPIEXEC "${WITH_MPIEXEC}")
cmake_print_variables(MPIEXEC)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/tests/cunit/run_tests.sh.in
${CMAKE_CURRENT_BINARY_DIR}/tests/cunit/run_tests.sh @ONLY)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/examples/c/run_tests.sh.in
${CMAKE_CURRENT_BINARY_DIR}/examples/c/run_tests.sh @ONLY)
10 changes: 4 additions & 6 deletions cmake/LibMPI.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# This provides cmake_print_variables() function for debugging.
include(CMakePrintHelpers)
# This is part of the PIO library.

# THis file contains CMake code related to MPI.

# Jim Edwards
include (CMakeParseArguments)

# Find Valgrind to perform memory leak check
Expand Down Expand Up @@ -94,11 +96,9 @@ function (add_mpi_test TESTNAME)
platform_name (PLATFORM)

get_property(WITH_MPIEXEC GLOBAL PROPERTY WITH_MPIEXEC)
cmake_print_variables(WITH_MPIEXEC MPIEXEC exec_file num_procs)
if (WITH_MPIEXEC)
set(MPIEXEC "${WITH_MPIEXEC}")
endif ()
cmake_print_variables(WITH_MPIEXEC MPIEXEC exec_file num_procs)

# Default ("unknown" platform) execution
if (PLATFORM STREQUAL "unknown")
Expand All @@ -116,8 +116,6 @@ function (add_mpi_test TESTNAME)

endif ()

cmake_print_variables(EXE_CMD)

# Add the test to CTest
add_test(NAME ${TESTNAME} COMMAND ${EXE_CMD})

Expand Down

0 comments on commit 7b874db

Please sign in to comment.