Skip to content

Commit

Permalink
Merge branch 'kokkos-config-207' (TriBITSPub#207, trilinos/Trilinos#1400
Browse files Browse the repository at this point in the history
)

Build/Test Cases Summary
Enabled Packages:
Enabled all Packages
0) MPI_DEBUG => passed: passed=265,notpassed=0 (0.68 min)
1) SERIAL_RELEASE => passed: passed=265,notpassed=0 (0.61 min)
2) MPI_DEBUG_CMAKE-3.6.2 => passed: passed=286,notpassed=0 (0.63 min)
3) SERIAL_RELEASE_CMAKE-3.6.2 => passed: passed=286,notpassed=0 (0.58 min)
Other local commits for this build/test group: e3d86d5, 6fa3d69
  • Loading branch information
bartlettroscoe committed Nov 30, 2017
2 parents b6406c6 + e3d86d5 commit 1fd597c
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
48 changes: 48 additions & 0 deletions test/core/ExamplesUnitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2675,6 +2675,54 @@ IF (TribitsExampleProject_SimpleTpl_RPATH_CMAKE_SKIP_INSTALL_RPATH_run_NAMES
ENDIF()


#
# Test cmake/ProjectCompilerPostConfig.cmake
#

TRIBITS_ADD_ADVANCED_TEST( TribitsExampleProject_ProjectCompilerPostConfig
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
XHOSTTYPE Darwin

TEST_0
MESSAGE "Copy TribitsExampleProject so that we can copy in cmake/ProjectCompilerPostConfig.cmake."
CMND cp
ARGS -r ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject .

TEST_1
MESSAGE "Copy in dummy cmake/ProjectCompilerPostConfig.cmake."
CMND cp
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/DummyProjectCompilerPostConfig.cmake
TribitsExampleProject/cmake/ProjectCompilerPostConfig.cmake

TEST_2
MESSAGE "Configure SimpleCxx and trace includes"
CMND ${CMAKE_COMMAND}
ARGS
${TribitsExampleProject_COMMON_CONFIG_ARGS}
-DTribitsExProj_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
-DTribitsExProj_ENABLE_Fortran=OFF
-DTribitsExProj_ENABLE_DEBUG=OFF
-DTribitsExProj_TRACE_FILE_PROCESSING=ON
-DTribitsExProj_ENABLE_SimpleCxx=ON
TribitsExampleProject
PASS_REGULAR_EXPRESSION_ALL
"-- File Trace: PROJECT INCLUDE .*/cmake/ProjectCompilerPostConfig[.]cmake"
"Configuring done"
"Generating done"
ALWAYS_FAIL_ON_NONZERO_RETURN

TEST_3
MESSAGE "VERBOSE Build the simplecxx lib and verify that the new compiler flags is added "
CMND make
ARGS VERBOSE=1 simplecxx
PASS_REGULAR_EXPRESSION_ALL
"DDUMMY_DEFINE_JUST_TO_TSET_COMILER_POST_CONFIG"
ALWAYS_FAIL_ON_NONZERO_RETURN

)


########################################################################
# TribitsExampleProject + TribitsExampleProjectAddons
########################################################################
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDUMMY_DEFINE_JUST_TO_TSET_COMILER_POST_CONFIG")
12 changes: 12 additions & 0 deletions tribits/core/package_arch/TribitsGlobalMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1808,6 +1808,18 @@ MACRO(TRIBITS_SETUP_ENV)
ENABLE_LANGUAGE(Fortran)
ENDIF()

# Do some project-specific tweaks for compiler options, etc.
SET(PROJECT_COMPILER_CONFIG_FILE
# Can be used for things like Kokkos.
"${${PROJECT_NAME}_SOURCE_DIR}/cmake/ProjectCompilerPostConfig.cmake"
CACHE FILEPATH
"Allow for project-specific compiler settings."
)
IF (EXISTS "${PROJECT_COMPILER_CONFIG_FILE}")
TRIBITS_TRACE_FILE_PROCESSING(PROJECT INCLUDE "${PROJECT_COMPILER_CONFIG_FILE}")
INCLUDE("${PROJECT_COMPILER_CONFIG_FILE}")
ENDIF()

# Set up for strong compiler warnings and warnings as errors

INCLUDE(TribitsSetupBasicCompileLinkFlags)
Expand Down

0 comments on commit 1fd597c

Please sign in to comment.