SP: Minor corrections to CMake template for RAJA examples.
@@ -24,6 +24,10 @@ cmake_minimum_required(VERSION 2.8)
# Specify project name
PROJECT(@SOLVER@_CXX_serial_examples)
+# Use same compilers you used to build SUNDIALS to build examples
+set(CMAKE_C_COMPILER @CMAKE_C_COMPILER@)
+set(CMAKE_CXX_COMPILER @CMAKE_CXX_COMPILER@)
+
set(CMAKE_CXX_STANDARD 11)
find_package(CUDA)
@@ -45,7 +49,7 @@ SET(SUNDIALS_INC_DIR
"Location of SUNDIALS header files")
# Add path to SUNDIALS header files
-INCLUDE_DIRECTORIES(${SUNDIALS_INC_DIR})
+INCLUDE_DIRECTORIES(${SUNDIALS_INC_DIR} @MPI_CXX_HEADER_DIR@)
# Set search path for SUNDIALS libraries
SET(SUNDIALS_LIB_DIR @libdir@)
@@ -77,6 +81,6 @@ FOREACH(example ${examples})
CUDA_ADD_EXECUTABLE(${example} ${example}.cu ${examples_dependencies})
# libraries to link against
- TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS} -L@RAJA_LIB_DIR@ -lRAJA)
+ TARGET_LINK_LIBRARIES(${example} ${SUNDIALS_LIBS} @MPI_CXX_LIBRARIES@ -L@RAJA_LIB_DIR@ -lRAJA)
ENDFOREACH(example ${examples})
