From fad394cde94725960d19339a3723b04699c09cee Mon Sep 17 00:00:00 2001 From: Jason Landini <123970616+landinjm@users.noreply.github.com> Date: Wed, 15 Jan 2025 16:44:34 -0500 Subject: [PATCH] Fix cmake for intel & clang compilers (#403) * Updating cmakelists. In the future we should make more use of macros * fixing template instantations * fix gitignore --- .gitignore | 1 + CMakeLists.txt | 52 +++++-- applications/CHAC_anisotropy/CMakeLists.txt | 138 +----------------- .../CHAC_anisotropyRegularized/CMakeLists.txt | 138 +----------------- .../CHAC_performance_test/CMakeLists.txt | 138 +----------------- .../CHiMaD_benchmark1a/CMakeLists.txt | 138 +----------------- .../CHiMaD_benchmark1b/CMakeLists.txt | 138 +----------------- .../CHiMaD_benchmark1c/CMakeLists.txt | 138 +----------------- .../CHiMaD_benchmark2a/CMakeLists.txt | 138 +----------------- .../CHiMaD_benchmark3a/CMakeLists.txt | 138 +----------------- .../CHiMaD_benchmark6a/CMakeLists.txt | 138 +----------------- .../CHiMaD_benchmark6b/CMakeLists.txt | 138 +----------------- .../CHiMaD_benchmark7a/CMakeLists.txt | 138 +----------------- .../CMakeLists.txt | 138 +----------------- applications/allenCahn/CMakeLists.txt | 138 +----------------- .../allenCahn_conserved/CMakeLists.txt | 132 +---------------- .../alloySolidification/CMakeLists.txt | 132 +---------------- .../CMakeLists.txt | 132 +---------------- applications/anisotropyFacet/CMakeLists.txt | 138 +----------------- applications/cahnHilliard/CMakeLists.txt | 138 +----------------- applications/corrosion/CMakeLists.txt | 138 +----------------- .../corrosion_microgalvanic/CMakeLists.txt | 138 +----------------- .../CMakeLists.txt | 138 +----------------- .../dendriticSolidification/CMakeLists.txt | 138 +----------------- applications/eshelbyInclusion/CMakeLists.txt | 138 +----------------- applications/fickianDiffusion/CMakeLists.txt | 138 +----------------- applications/grainGrowth/CMakeLists.txt | 138 +----------------- .../grainGrowth_dream3d/CMakeLists.txt | 138 +----------------- applications/mechanics/CMakeLists.txt | 138 +----------------- applications/nucleationModel/CMakeLists.txt | 138 +----------------- .../CMakeLists.txt | 138 +----------------- .../precipitateEvolution/CMakeLists.txt | 138 +----------------- .../spinodalDecomposition/CMakeLists.txt | 138 +----------------- .../CHAC_anisotropyRegularized/CMakeLists.txt | 138 +----------------- .../CHiMaD_benchmark6a/CMakeLists.txt | 138 +----------------- automatic_tests/allenCahn/CMakeLists.txt | 138 +----------------- automatic_tests/cahnHilliard/CMakeLists.txt | 138 +----------------- .../corrosion_microgalvanic/CMakeLists.txt | 138 +----------------- .../CMakeLists.txt | 138 +----------------- automatic_tests/grainGrowth/CMakeLists.txt | 138 +----------------- .../precipitateEvolution/CMakeLists.txt | 138 +----------------- .../spinodalDecomposition/CMakeLists.txt | 138 +----------------- cmake/setup_application.cmake | 138 ++++++++++++++++++ include/config.h.in | 4 + include/core/matrixFreePDE.h | 18 --- src/CMakeLists.txt | 12 ++ src/core/CMakeLists.txt | 29 ++++ .../boundary_conditions/boundaryConditions.cc | 18 +++ .../boundary_conditions/markBoundaries.cc | 18 +++ src/core/buildFields.cc | 18 +++ src/core/checkpoint.cc | 18 +++ src/core/init.cc | 18 +++ .../initial_conditions/initialConditions.cc | 18 +++ src/core/invM.cc | 18 +++ src/core/matrixFreePDE.cc | 18 +++ src/core/outputResults.cc | 18 +++ src/core/postprocessing/computeIntegral.cc | 18 +++ src/core/postprocessing/postprocessor.cc | 18 +++ src/core/reinit.cc | 18 +++ src/core/solvers/computeLHS.cc | 18 +++ src/core/solvers/computeRHS.cc | 18 +++ .../solvers/setNonlinearEqInitialGuess.cc | 18 +++ src/core/solvers/solve.cc | 18 +++ src/core/solvers/solveIncrement.cc | 20 ++- src/field_input/CMakeLists.txt | 5 + src/grains/CMakeLists.txt | 8 + src/grains/reassignGrains.cc | 18 +++ src/nucleation/CMakeLists.txt | 6 + src/nucleation/nucleation.cc | 18 +++ src/utilities/CMakeLists.txt | 5 + src/utilities/utilities.cc | 18 +++ tests/CMakeLists.txt | 2 +- 72 files changed, 732 insertions(+), 5412 deletions(-) create mode 100644 cmake/setup_application.cmake create mode 100644 src/CMakeLists.txt create mode 100644 src/core/CMakeLists.txt create mode 100644 src/field_input/CMakeLists.txt create mode 100644 src/grains/CMakeLists.txt create mode 100644 src/nucleation/CMakeLists.txt create mode 100644 src/utilities/CMakeLists.txt diff --git a/.gitignore b/.gitignore index cc966aa2..33d26c1c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ build/* CMakeFiles/ CMakeCache.txt *.cmake +!cmake/*.cmake Makefile .ninja* build.ninja diff --git a/CMakeLists.txt b/CMakeLists.txt index cb09866d..e76b40df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,9 +3,7 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) - -project(prisms_pf) +cmake_minimum_required(VERSION 3.8.0) file(STRINGS "${CMAKE_SOURCE_DIR}/VERSION" PRISMS_PF_VERSION LIMIT_COUNT 1) @@ -27,6 +25,14 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/CMakeCache.txt) "Please delete the file before running cmake again.") endif() +# Print the current cmake version +message(STATUS "CMake version: ${CMAKE_VERSION}") + +# Set the standard to C++17 +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + # Setup the build type (debug, release, debugrelease) if("${CMAKE_BUILD_TYPE}" STREQUAL "") set(CMAKE_BUILD_TYPE "DebugRelease" @@ -93,12 +99,41 @@ if(NOT DEAL_II_WITH_P4EST) set(DEALII_INSTALL_VALID OFF) endif() +if(NOT DEAL_II_WITH_MPI) + message(SEND_ERROR + "\n**deal.II was built without support for MPI!\n" + ) + set(DEALII_INSTALL_VALID OFF) +endif() + if(NOT DEALII_INSTALL_VALID) message(FATAL_ERROR "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" ) endif() +# Optional deal.II packages +set(PRISMS_PF_WITH_ZLIB OFF CACHE BOOL "Whether the user wants to compile PRISMS-PF with deal.II's zlib dependency, or not.") +message(STATUS "Using PRISMS_PF_WITH_ZLIB = '${PRISMS_PF_WITH_ZLIB}'") +if(PRISMS_PF_WITH_ZLIB) + if(DEAL_II_WITH_ZLIB) + message(STATUS " Found deal.II installation with zlib") + else() + message(FATAL_ERROR "deal.II installation with zlib not found. Disable PRISMS_PF_WITH_ZLIB or recompile deal.II with zlib.") + endif() +endif() + +set(PRISMS_PF_WITH_SUNDIALS OFF CACHE BOOL "Whether the user wants to compile PRISMS-PF with deal.II's SUNDIALS dependency, or not.") +message(STATUS "Using PRISMS_PF_WITH_SUNDIALS = '${PRISMS_PF_WITH_SUNDIALS}'") +if(PRISMS_PF_WITH_SUNDIALS) + if(DEAL_II_WITH_SUNDIALS) + message(STATUS " Found deal.II installation with SUNDIALS") + else() + message(FATAL_ERROR "deal.II installation with SUNDIALS not found. Disable PRISMS_PF_WITH_SUNDIALS or recompile deal.II with SUNDIALS.") + endif() +endif() + +# Load deal.II cached variables deal_ii_initialize_cached_variables() # Caliper @@ -108,7 +143,7 @@ if(PRISMS_PF_WITH_CALIPER) find_package(CALIPER) if(${CALIPER_FOUND}) include_directories(${CALIPER_INCLUDE_DIR}) - message(STATUS "Caliper found at ${CALIPER_DIR}") + message(STATUS " Caliper found at ${CALIPER_DIR}") else() message(FATAL_ERROR "Caliper not found. Disable PRISMS_PF_WITH_CALIPER or specify a hint to your installation directory with CALIPER_DIR") endif() @@ -128,6 +163,8 @@ message(STATUS "Configuring PRISMS-PF build targets") message(STATUS "=========================================================") message(STATUS "") +project(prisms_pf CXX) + # Generate config.h to enable and disable certain features within the source code. set(PRISMS_PF_SOURCE_DIR ${CMAKE_SOURCE_DIR}) @@ -137,12 +174,7 @@ configure_file( ) # Collect source files -file(GLOB_RECURSE PRISMS_PF_SOURCE_FILES "src/*.cc" "include/*.h") -file(GLOB_RECURSE PRISMS_PF_UNIT_TEST_FILES "unit_tests/*.cc" "contrib/catch/catch.hpp") - -# Setup include directories -include_directories(BEFORE ${CMAKE_BINARY_DIR}/include include) -include_directories(AFTER contrib/catch) +add_subdirectory(src) # Test stuff goes here diff --git a/applications/CHAC_anisotropy/CMakeLists.txt b/applications/CHAC_anisotropy/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/CHAC_anisotropy/CMakeLists.txt +++ b/applications/CHAC_anisotropy/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/CHAC_anisotropyRegularized/CMakeLists.txt b/applications/CHAC_anisotropyRegularized/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/CHAC_anisotropyRegularized/CMakeLists.txt +++ b/applications/CHAC_anisotropyRegularized/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/CHAC_performance_test/CMakeLists.txt b/applications/CHAC_performance_test/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/CHAC_performance_test/CMakeLists.txt +++ b/applications/CHAC_performance_test/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark1a/CMakeLists.txt b/applications/CHiMaD_benchmarks/CHiMaD_benchmark1a/CMakeLists.txt index 55972a1d..82a3b2a6 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark1a/CMakeLists.txt +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark1a/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark1b/CMakeLists.txt b/applications/CHiMaD_benchmarks/CHiMaD_benchmark1b/CMakeLists.txt index 55972a1d..82a3b2a6 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark1b/CMakeLists.txt +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark1b/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark1c/CMakeLists.txt b/applications/CHiMaD_benchmarks/CHiMaD_benchmark1c/CMakeLists.txt index 55972a1d..82a3b2a6 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark1c/CMakeLists.txt +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark1c/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark2a/CMakeLists.txt b/applications/CHiMaD_benchmarks/CHiMaD_benchmark2a/CMakeLists.txt index 55972a1d..82a3b2a6 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark2a/CMakeLists.txt +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark2a/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark3a/CMakeLists.txt b/applications/CHiMaD_benchmarks/CHiMaD_benchmark3a/CMakeLists.txt index 55972a1d..82a3b2a6 100755 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark3a/CMakeLists.txt +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark3a/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark6a/CMakeLists.txt b/applications/CHiMaD_benchmarks/CHiMaD_benchmark6a/CMakeLists.txt index 55972a1d..82a3b2a6 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark6a/CMakeLists.txt +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark6a/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark6b/CMakeLists.txt b/applications/CHiMaD_benchmarks/CHiMaD_benchmark6b/CMakeLists.txt index 55972a1d..82a3b2a6 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark6b/CMakeLists.txt +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark6b/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark7a/CMakeLists.txt b/applications/CHiMaD_benchmarks/CHiMaD_benchmark7a/CMakeLists.txt index 55972a1d..82a3b2a6 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark7a/CMakeLists.txt +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark7a/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/MgNd_precipitate_single_Bppp/CMakeLists.txt b/applications/MgNd_precipitate_single_Bppp/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/MgNd_precipitate_single_Bppp/CMakeLists.txt +++ b/applications/MgNd_precipitate_single_Bppp/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/allenCahn/CMakeLists.txt b/applications/allenCahn/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/allenCahn/CMakeLists.txt +++ b/applications/allenCahn/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/allenCahn_conserved/CMakeLists.txt b/applications/allenCahn_conserved/CMakeLists.txt index 916a7f00..9381699c 100644 --- a/applications/allenCahn_conserved/CMakeLists.txt +++ b/applications/allenCahn_conserved/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) diff --git a/applications/alloySolidification/CMakeLists.txt b/applications/alloySolidification/CMakeLists.txt index 916a7f00..9381699c 100644 --- a/applications/alloySolidification/CMakeLists.txt +++ b/applications/alloySolidification/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) diff --git a/applications/alloySolidification_uniform/CMakeLists.txt b/applications/alloySolidification_uniform/CMakeLists.txt index 916a7f00..9381699c 100644 --- a/applications/alloySolidification_uniform/CMakeLists.txt +++ b/applications/alloySolidification_uniform/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) diff --git a/applications/anisotropyFacet/CMakeLists.txt b/applications/anisotropyFacet/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/anisotropyFacet/CMakeLists.txt +++ b/applications/anisotropyFacet/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/cahnHilliard/CMakeLists.txt b/applications/cahnHilliard/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/cahnHilliard/CMakeLists.txt +++ b/applications/cahnHilliard/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/corrosion/CMakeLists.txt b/applications/corrosion/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/corrosion/CMakeLists.txt +++ b/applications/corrosion/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/corrosion_microgalvanic/CMakeLists.txt b/applications/corrosion_microgalvanic/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/corrosion_microgalvanic/CMakeLists.txt +++ b/applications/corrosion_microgalvanic/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/coupledCahnHilliardAllenCahn/CMakeLists.txt b/applications/coupledCahnHilliardAllenCahn/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/coupledCahnHilliardAllenCahn/CMakeLists.txt +++ b/applications/coupledCahnHilliardAllenCahn/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/dendriticSolidification/CMakeLists.txt b/applications/dendriticSolidification/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/dendriticSolidification/CMakeLists.txt +++ b/applications/dendriticSolidification/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/eshelbyInclusion/CMakeLists.txt b/applications/eshelbyInclusion/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/eshelbyInclusion/CMakeLists.txt +++ b/applications/eshelbyInclusion/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/fickianDiffusion/CMakeLists.txt b/applications/fickianDiffusion/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/fickianDiffusion/CMakeLists.txt +++ b/applications/fickianDiffusion/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/grainGrowth/CMakeLists.txt b/applications/grainGrowth/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/grainGrowth/CMakeLists.txt +++ b/applications/grainGrowth/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/grainGrowth_dream3d/CMakeLists.txt b/applications/grainGrowth_dream3d/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/grainGrowth_dream3d/CMakeLists.txt +++ b/applications/grainGrowth_dream3d/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/mechanics/CMakeLists.txt b/applications/mechanics/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/mechanics/CMakeLists.txt +++ b/applications/mechanics/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/nucleationModel/CMakeLists.txt b/applications/nucleationModel/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/nucleationModel/CMakeLists.txt +++ b/applications/nucleationModel/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/nucleationModel_preferential/CMakeLists.txt b/applications/nucleationModel_preferential/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/nucleationModel_preferential/CMakeLists.txt +++ b/applications/nucleationModel_preferential/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/precipitateEvolution/CMakeLists.txt b/applications/precipitateEvolution/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/precipitateEvolution/CMakeLists.txt +++ b/applications/precipitateEvolution/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/applications/spinodalDecomposition/CMakeLists.txt b/applications/spinodalDecomposition/CMakeLists.txt index 916a7f00..e54754f2 100644 --- a/applications/spinodalDecomposition/CMakeLists.txt +++ b/applications/spinodalDecomposition/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/automatic_tests/CHAC_anisotropyRegularized/CMakeLists.txt b/automatic_tests/CHAC_anisotropyRegularized/CMakeLists.txt index 4c390730..e54754f2 100644 --- a/automatic_tests/CHAC_anisotropyRegularized/CMakeLists.txt +++ b/automatic_tests/CHAC_anisotropyRegularized/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/automatic_tests/CHiMaD_benchmark6a/CMakeLists.txt b/automatic_tests/CHiMaD_benchmark6a/CMakeLists.txt index 4c390730..e54754f2 100644 --- a/automatic_tests/CHiMaD_benchmark6a/CMakeLists.txt +++ b/automatic_tests/CHiMaD_benchmark6a/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/automatic_tests/allenCahn/CMakeLists.txt b/automatic_tests/allenCahn/CMakeLists.txt index 4c390730..e54754f2 100644 --- a/automatic_tests/allenCahn/CMakeLists.txt +++ b/automatic_tests/allenCahn/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/automatic_tests/cahnHilliard/CMakeLists.txt b/automatic_tests/cahnHilliard/CMakeLists.txt index 4c390730..e54754f2 100644 --- a/automatic_tests/cahnHilliard/CMakeLists.txt +++ b/automatic_tests/cahnHilliard/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/automatic_tests/corrosion_microgalvanic/CMakeLists.txt b/automatic_tests/corrosion_microgalvanic/CMakeLists.txt index 4c390730..e54754f2 100644 --- a/automatic_tests/corrosion_microgalvanic/CMakeLists.txt +++ b/automatic_tests/corrosion_microgalvanic/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/automatic_tests/coupledCahnHilliardAllenCahn/CMakeLists.txt b/automatic_tests/coupledCahnHilliardAllenCahn/CMakeLists.txt index 4c390730..e54754f2 100644 --- a/automatic_tests/coupledCahnHilliardAllenCahn/CMakeLists.txt +++ b/automatic_tests/coupledCahnHilliardAllenCahn/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/automatic_tests/grainGrowth/CMakeLists.txt b/automatic_tests/grainGrowth/CMakeLists.txt index 4c390730..e54754f2 100644 --- a/automatic_tests/grainGrowth/CMakeLists.txt +++ b/automatic_tests/grainGrowth/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/automatic_tests/precipitateEvolution/CMakeLists.txt b/automatic_tests/precipitateEvolution/CMakeLists.txt index 4c390730..e54754f2 100644 --- a/automatic_tests/precipitateEvolution/CMakeLists.txt +++ b/automatic_tests/precipitateEvolution/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/automatic_tests/spinodalDecomposition/CMakeLists.txt b/automatic_tests/spinodalDecomposition/CMakeLists.txt index 4c390730..e54754f2 100644 --- a/automatic_tests/spinodalDecomposition/CMakeLists.txt +++ b/automatic_tests/spinodalDecomposition/CMakeLists.txt @@ -3,137 +3,11 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) -project(myapp) +include(${CMAKE_SOURCE_DIR}/../../cmake/setup_application.cmake) -message(STATUS "") -message(STATUS "=========================================================") -message(STATUS "Configuring PRISMS-PF application") -message(STATUS "=========================================================") -message(STATUS "") - -# Setup the build type (debug, release, debugrelease) -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE "DebugRelease" - CACHE STRING - "Choose the type of build, options are: Debug, Release and DebugRelease." - FORCE) -endif() - -# Convert build type into the debug and release builds, which may or may -# not be built. -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) - message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") -else() - message(FATAL_ERROR - "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_DEBUG "ON") -else() - set(PRISMS_PF_BUILD_DEBUG "OFF") -endif() - -if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR - "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") - set(PRISMS_PF_BUILD_RELEASE "ON") -else() - set(PRISMS_PF_BUILD_RELEASE "OFF") -endif() - -# Find deal.II installation -find_package(deal.II 9.6.0 QUIET - HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} - ) -if(NOT ${deal.II_FOUND}) - message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " - "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " - "recent version of deal.II." - ) -endif() - -message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'") - -set(DEALII_INSTALL_VALID ON) - -if(NOT DEAL_II_WITH_P4EST) - message(SEND_ERROR - "\n**deal.II was built without support for p4est!\n" - ) - set(DEALII_INSTALL_VALID OFF) -endif() - -if(NOT DEALII_INSTALL_VALID) - message(FATAL_ERROR - "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" - ) -endif() - -deal_ii_initialize_cached_variables() - -# Make and ninja build options -if(CMAKE_GENERATOR MATCHES "Ninja") - set(_make_command "$ ninja") -else() - set(_make_command " $ make") -endif() - -# Debug and release targets -if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") - add_custom_target(release - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to RELEASE mode..." - ) - - add_custom_target(debug - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG mode..." - ) - - add_custom_target(debugrelease - COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . - COMMAND ${CMAKE_COMMAND} -E echo "***" - COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" - COMMAND ${CMAKE_COMMAND} -E echo "***" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMENT "switching to DEBUG/RELEASE mode..." - ) -endif() - -# Add distclean target to clean build -add_custom_target(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - CMakeCache.txt cmake_install.cmake Makefile - build.ninja rules.ninja .ninja_deps .ninja_log - COMMENT "distclean invoked" - ) - -# Add postprocess.cc and nucleation.cc if they exist -if(EXISTS "postprocess.cc") - add_definitions(-DPOSTPROCESS_FILE_EXISTS) -endif() -if(EXISTS "nucleation.cc") - add_definitions(-DNUCLEATION_FILE_EXISTS) -endif() +project(myapp CXX) # Set location of files include_directories(${CMAKE_SOURCE_DIR}/../../include) @@ -143,12 +17,6 @@ include_directories(${CMAKE_SOURCE_DIR}) # Set the location of the main.cc file set(TARGET_SRC "${CMAKE_SOURCE_DIR}/../main.cc") -# Check if there has been updates to main library -set(dir ${PROJECT_SOURCE_DIR}/../../..) -EXECUTE_PROCESS(COMMAND "rm" "CMakeCache.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "cmake" "CMakeLists.txt" WORKING_DIRECTORY ${dir}) -EXECUTE_PROCESS(COMMAND "make" WORKING_DIRECTORY ${dir}) - # Set targets & link libraries for the build type if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON") add_executable(main_debug ${TARGET_SRC}) diff --git a/cmake/setup_application.cmake b/cmake/setup_application.cmake new file mode 100644 index 00000000..7105f897 --- /dev/null +++ b/cmake/setup_application.cmake @@ -0,0 +1,138 @@ +# General setup for a PRISMS-PF application + +message(STATUS "") +message(STATUS "=========================================================") +message(STATUS "Configuring PRISMS-PF application") +message(STATUS "=========================================================") +message(STATUS "") + +# Setup the build type (debug, release, debugrelease) +if("${CMAKE_BUILD_TYPE}" STREQUAL "") + set(CMAKE_BUILD_TYPE "DebugRelease" + CACHE STRING + "Choose the type of build, options are: Debug, Release and DebugRelease." + FORCE) +endif() + +# Convert build type into the debug and release builds, which may or may +# not be built. +if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR + "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR + "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease" ) + message(STATUS "Setting up PRISMS-PF application for ${CMAKE_BUILD_TYPE} mode.") +else() + message(FATAL_ERROR + "CMAKE_BUILD_TYPE must either be 'Release', 'Debug', or 'DebugRelease', but is set to '${CMAKE_BUILD_TYPE}'.") +endif() + +if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR + "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") + set(PRISMS_PF_BUILD_DEBUG "ON") +else() + set(PRISMS_PF_BUILD_DEBUG "OFF") +endif() + +if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR + "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") + set(PRISMS_PF_BUILD_RELEASE "ON") +else() + set(PRISMS_PF_BUILD_RELEASE "OFF") +endif() + + +# Find deal.II installation +find_package(deal.II 9.6.0 QUIET + HINTS ${DEAL_II_DIR} $ENV{DEAL_II_DIR} + ) +if(NOT ${deal.II_FOUND}) + message(FATAL_ERROR "\n*** Could not find a recent version of deal.II. ***\n" + "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake " + "or set an environment variable \"DEAL_II_DIR\" that contains a path to a " + "recent version of deal.II." + ) +endif() + +message(STATUS "Found deal.II version ${DEAL_II_PACKAGE_VERSION} at '${deal.II_DIR}'\n") + +set(DEALII_INSTALL_VALID ON) + +if(NOT DEAL_II_WITH_P4EST) + message(SEND_ERROR + "\n**deal.II was built without support for p4est!\n" + ) + set(DEALII_INSTALL_VALID OFF) +endif() + +if(NOT DEAL_II_WITH_MPI) + message(SEND_ERROR + "\n**deal.II was built without support for MPI!\n" + ) + set(DEALII_INSTALL_VALID OFF) +endif() + +if(NOT DEALII_INSTALL_VALID) + message(FATAL_ERROR + "\nPRISMS-PF requires a deal.II installation with certain features enabled!\n" + ) +endif() + +# Load deal.II cached variables +deal_ii_initialize_cached_variables() + +# Make and ninja build options +if(CMAKE_GENERATOR MATCHES "Ninja") + set(_make_command "$ ninja") +else() + set(_make_command " $ make") +endif() + +# Debug and release targets +if(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease") + add_custom_target(release + COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Release . + COMMAND ${CMAKE_COMMAND} -E echo "***" + COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Release mode. Now recompile with: ${_make_command}" + COMMAND ${CMAKE_COMMAND} -E echo "***" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + VERBATIM + COMMENT "switching to RELEASE mode..." + ) + + add_custom_target(debug + COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=Debug . + COMMAND ${CMAKE_COMMAND} -E echo "***" + COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug mode. Now recompile with: ${_make_command}" + COMMAND ${CMAKE_COMMAND} -E echo "***" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + VERBATIM + COMMENT "switching to DEBUG mode..." + ) + + add_custom_target(debugrelease + COMMAND ${CMAKE_COMMAND} -D CMAKE_BUILD_TYPE=DebugRelease . + COMMAND ${CMAKE_COMMAND} -E echo "***" + COMMAND ${CMAKE_COMMAND} -E echo "*** Switched to Debug and Release mode. Now recompile with: ${_make_command}" + COMMAND ${CMAKE_COMMAND} -E echo "***" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + VERBATIM + COMMENT "switching to DEBUG/RELEASE mode..." + ) +endif() + +# Add distclean target to clean build +add_custom_target(distclean + COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean + COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles + COMMAND ${CMAKE_COMMAND} -E remove + CMakeCache.txt cmake_install.cmake Makefile + build.ninja rules.ninja .ninja_deps .ninja_log + COMMENT "distclean invoked" + ) + +# Add postprocess.cc and nucleation.cc if they exist +if(EXISTS "postprocess.cc") + add_definitions(-DPOSTPROCESS_FILE_EXISTS) +endif() +if(EXISTS "nucleation.cc") + add_definitions(-DNUCLEATION_FILE_EXISTS) +endif() \ No newline at end of file diff --git a/include/config.h.in b/include/config.h.in index 2bd91465..622a2f0f 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -4,6 +4,10 @@ #cmakedefine PRISMS_PF_SOURCE_DIR "@PRISMS_PF_SOURCE_DIR@" // Optional features: +#cmakedefine PRISMS_PF_WITH_ZLIB + +#cmakedefine PRISMS_PF_WITH_SUNDIALS + #cmakedefine PRISMS_PF_WITH_CALIPER #endif diff --git a/include/core/matrixFreePDE.h b/include/core/matrixFreePDE.h index 5f034f00..bdc070cb 100644 --- a/include/core/matrixFreePDE.h +++ b/include/core/matrixFreePDE.h @@ -534,22 +534,4 @@ class MatrixFreePDE : public Subscriptor AdaptiveRefinement AMR; }; -template class MatrixFreePDE<2, 1>; -template class MatrixFreePDE<3, 1>; - -template class MatrixFreePDE<2, 2>; -template class MatrixFreePDE<3, 2>; - -template class MatrixFreePDE<3, 3>; -template class MatrixFreePDE<2, 3>; - -template class MatrixFreePDE<3, 4>; -template class MatrixFreePDE<2, 4>; - -template class MatrixFreePDE<3, 5>; -template class MatrixFreePDE<2, 5>; - -template class MatrixFreePDE<3, 6>; -template class MatrixFreePDE<2, 6>; - #endif diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 00000000..7fc829a1 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,12 @@ +# This file collects the source files for PRISMS-PF +set(PRISMS_PF_SOURCE_FILES) +foreach(TARGET IN ITEMS + core + field_input + grains + nucleation + utilities +) + add_subdirectory(${TARGET}) +endforeach() +set(PRISMS_PF_SOURCE_FILES ${PRISMS_PF_SOURCE_FILES} PARENT_SCOPE) \ No newline at end of file diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt new file mode 100644 index 00000000..2c8d5b1b --- /dev/null +++ b/src/core/CMakeLists.txt @@ -0,0 +1,29 @@ +# Manually specify files to be included +list(APPEND PRISMS_PF_SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/boundary_conditions/boundaryConditions.cc + ${CMAKE_CURRENT_SOURCE_DIR}/boundary_conditions/markBoundaries.cc + ${CMAKE_CURRENT_SOURCE_DIR}/boundary_conditions/vectorBCFunction.cc + ${CMAKE_CURRENT_SOURCE_DIR}/initial_conditions/initialConditions.cc + ${CMAKE_CURRENT_SOURCE_DIR}/postprocessing/computeIntegral.cc + ${CMAKE_CURRENT_SOURCE_DIR}/postprocessing/postprocessor.cc + ${CMAKE_CURRENT_SOURCE_DIR}/refinement/AdaptiveRefinement.cc + ${CMAKE_CURRENT_SOURCE_DIR}/solvers/computeLHS.cc + ${CMAKE_CURRENT_SOURCE_DIR}/solvers/computeRHS.cc + ${CMAKE_CURRENT_SOURCE_DIR}/solvers/setNonlinearEqInitialGuess.cc + ${CMAKE_CURRENT_SOURCE_DIR}/solvers/solve.cc + ${CMAKE_CURRENT_SOURCE_DIR}/solvers/solveIncrement.cc + ${CMAKE_CURRENT_SOURCE_DIR}/solvers/SolverParameters.cc + ${CMAKE_CURRENT_SOURCE_DIR}/buildFields.cc + ${CMAKE_CURRENT_SOURCE_DIR}/checkpoint.cc + ${CMAKE_CURRENT_SOURCE_DIR}/init.cc + ${CMAKE_CURRENT_SOURCE_DIR}/inputFileReader.cc + ${CMAKE_CURRENT_SOURCE_DIR}/invM.cc + ${CMAKE_CURRENT_SOURCE_DIR}/matrixFreePDE.cc + ${CMAKE_CURRENT_SOURCE_DIR}/outputResults.cc + ${CMAKE_CURRENT_SOURCE_DIR}/reinit.cc + ${CMAKE_CURRENT_SOURCE_DIR}/userInputParameters.cc + ${CMAKE_CURRENT_SOURCE_DIR}/variableAttributeLoader.cc + ${CMAKE_CURRENT_SOURCE_DIR}/variableAttributes.cc + ${CMAKE_CURRENT_SOURCE_DIR}/variableContainer.cc +) +set(PRISMS_PF_SOURCE_FILES ${PRISMS_PF_SOURCE_FILES} PARENT_SCOPE) \ No newline at end of file diff --git a/src/core/boundary_conditions/boundaryConditions.cc b/src/core/boundary_conditions/boundaryConditions.cc index 348a9a54..90b55028 100644 --- a/src/core/boundary_conditions/boundaryConditions.cc +++ b/src/core/boundary_conditions/boundaryConditions.cc @@ -312,3 +312,21 @@ MatrixFreePDE::set_rigid_body_mode_constraints( } } } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/boundary_conditions/markBoundaries.cc b/src/core/boundary_conditions/markBoundaries.cc index be410e5b..4723df5f 100644 --- a/src/core/boundary_conditions/markBoundaries.cc +++ b/src/core/boundary_conditions/markBoundaries.cc @@ -31,3 +31,21 @@ MatrixFreePDE::markBoundaries( } } } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; diff --git a/src/core/buildFields.cc b/src/core/buildFields.cc index 48ab71d5..497b7aed 100644 --- a/src/core/buildFields.cc +++ b/src/core/buildFields.cc @@ -21,3 +21,21 @@ MatrixFreePDE::buildFields() fields.push_back(Field(variable.var_type, variable.eq_type, variable.name)); } } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/checkpoint.cc b/src/core/checkpoint.cc index 00203948..096b5b45 100644 --- a/src/core/checkpoint.cc +++ b/src/core/checkpoint.cc @@ -273,3 +273,21 @@ MatrixFreePDE::verify_checkpoint_file_exists(const std::string &fil filename + "> does not appear to exist!")); } } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/init.cc b/src/core/init.cc index 1feadeff..f4fe66c8 100644 --- a/src/core/init.cc +++ b/src/core/init.cc @@ -443,3 +443,21 @@ MatrixFreePDE::compute_element_volume() } } } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; diff --git a/src/core/initial_conditions/initialConditions.cc b/src/core/initial_conditions/initialConditions.cc index f85e2139..923e72b3 100644 --- a/src/core/initial_conditions/initialConditions.cc +++ b/src/core/initial_conditions/initialConditions.cc @@ -421,3 +421,21 @@ MatrixFreePDE::applyInitialConditions() } } } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/invM.cc b/src/core/invM.cc index 2a4cc9d1..b98f0ae4 100644 --- a/src/core/invM.cc +++ b/src/core/invM.cc @@ -143,3 +143,21 @@ MatrixFreePDE::computeInvM() pcout << "computed vector mass matrix (using FE space for field: " << parabolicVectorFieldIndex << ")\n"; } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/matrixFreePDE.cc b/src/core/matrixFreePDE.cc index c80ca942..c73e7cbe 100644 --- a/src/core/matrixFreePDE.cc +++ b/src/core/matrixFreePDE.cc @@ -72,3 +72,21 @@ MatrixFreePDE::~MatrixFreePDE() delete residual; } } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/outputResults.cc b/src/core/outputResults.cc index 2a52cc47..68d1d9ed 100644 --- a/src/core/outputResults.cc +++ b/src/core/outputResults.cc @@ -221,3 +221,21 @@ MatrixFreePDE::outputResults() // log time computing_timer.leave_subsection("matrixFreePDE: output"); } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/postprocessing/computeIntegral.cc b/src/core/postprocessing/computeIntegral.cc index d142ed96..e8b2e5a0 100644 --- a/src/core/postprocessing/computeIntegral.cc +++ b/src/core/postprocessing/computeIntegral.cc @@ -45,3 +45,21 @@ MatrixFreePDE::computeIntegral( integratedField = value; } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/postprocessing/postprocessor.cc b/src/core/postprocessing/postprocessor.cc index c57b3d11..2f477573 100644 --- a/src/core/postprocessing/postprocessor.cc +++ b/src/core/postprocessing/postprocessor.cc @@ -67,3 +67,21 @@ MatrixFreePDE::getPostProcessedFields( pp_variable_list.integrate_and_distribute(dst); } } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/reinit.cc b/src/core/reinit.cc index 6a96693f..10085d93 100644 --- a/src/core/reinit.cc +++ b/src/core/reinit.cc @@ -203,3 +203,21 @@ MatrixFreePDE::reinit() computing_timer.leave_subsection("matrixFreePDE: reinitialization"); } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/solvers/computeLHS.cc b/src/core/solvers/computeLHS.cc index 57702e0c..b8b30ca1 100644 --- a/src/core/solvers/computeLHS.cc +++ b/src/core/solvers/computeLHS.cc @@ -90,3 +90,21 @@ MatrixFreePDE::getLHS( currentFieldIndex); } } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/solvers/computeRHS.cc b/src/core/solvers/computeRHS.cc index cff76274..e69b071a 100644 --- a/src/core/solvers/computeRHS.cc +++ b/src/core/solvers/computeRHS.cc @@ -116,3 +116,21 @@ MatrixFreePDE::getNonexplicitRHS( variable_list.integrate_and_distribute(dst); } } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/solvers/setNonlinearEqInitialGuess.cc b/src/core/solvers/setNonlinearEqInitialGuess.cc index 307b9fb6..17e52f16 100644 --- a/src/core/solvers/setNonlinearEqInitialGuess.cc +++ b/src/core/solvers/setNonlinearEqInitialGuess.cc @@ -200,3 +200,21 @@ MatrixFreePDE::getLaplaceLHS( mat.distribute_local_to_global(dst); } } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/solvers/solve.cc b/src/core/solvers/solve.cc index 06ed9123..48a083e3 100644 --- a/src/core/solvers/solve.cc +++ b/src/core/solvers/solve.cc @@ -152,3 +152,21 @@ MatrixFreePDE::solve() // log time computing_timer.leave_subsection("matrixFreePDE: solve"); } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/core/solvers/solveIncrement.cc b/src/core/solvers/solveIncrement.cc index 9449fcf1..58d91399 100644 --- a/src/core/solvers/solveIncrement.cc +++ b/src/core/solvers/solveIncrement.cc @@ -549,4 +549,22 @@ MatrixFreePDE::updateImplicitSolution(unsigned int fieldIndex, } return nonlinear_iteration_converged; -} \ No newline at end of file +} + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/field_input/CMakeLists.txt b/src/field_input/CMakeLists.txt new file mode 100644 index 00000000..90afb46c --- /dev/null +++ b/src/field_input/CMakeLists.txt @@ -0,0 +1,5 @@ +# Manually specify files to be included +list(APPEND PRISMS_PF_SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/field_input.cc +) +set(PRISMS_PF_SOURCE_FILES ${PRISMS_PF_SOURCE_FILES} PARENT_SCOPE) \ No newline at end of file diff --git a/src/grains/CMakeLists.txt b/src/grains/CMakeLists.txt new file mode 100644 index 00000000..53cf4a41 --- /dev/null +++ b/src/grains/CMakeLists.txt @@ -0,0 +1,8 @@ +# Manually specify files to be included +list(APPEND PRISMS_PF_SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/FloodFiller.cc + ${CMAKE_CURRENT_SOURCE_DIR}/OrderParameterRemapper.cc + ${CMAKE_CURRENT_SOURCE_DIR}/reassignGrains.cc + ${CMAKE_CURRENT_SOURCE_DIR}/SimplifiedGrainRepresentation.cc +) +set(PRISMS_PF_SOURCE_FILES ${PRISMS_PF_SOURCE_FILES} PARENT_SCOPE) \ No newline at end of file diff --git a/src/grains/reassignGrains.cc b/src/grains/reassignGrains.cc index d08300c2..8c09cd2a 100644 --- a/src/grains/reassignGrains.cc +++ b/src/grains/reassignGrains.cc @@ -110,3 +110,21 @@ MatrixFreePDE::reassignGrains() // end log computing_timer.leave_subsection("matrixFreePDE: reassignGrains"); } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/nucleation/CMakeLists.txt b/src/nucleation/CMakeLists.txt new file mode 100644 index 00000000..bca3c4f2 --- /dev/null +++ b/src/nucleation/CMakeLists.txt @@ -0,0 +1,6 @@ +# Manually specify files to be included +list(APPEND PRISMS_PF_SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/nucleation.cc + ${CMAKE_CURRENT_SOURCE_DIR}/parallelNucleationList.cc +) +set(PRISMS_PF_SOURCE_FILES ${PRISMS_PF_SOURCE_FILES} PARENT_SCOPE) \ No newline at end of file diff --git a/src/nucleation/nucleation.cc b/src/nucleation/nucleation.cc index 9322565c..55deab9f 100644 --- a/src/nucleation/nucleation.cc +++ b/src/nucleation/nucleation.cc @@ -586,3 +586,21 @@ MatrixFreePDE::weightedDistanceFromNucleusCenter( } return weighted_dist; } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/src/utilities/CMakeLists.txt b/src/utilities/CMakeLists.txt new file mode 100644 index 00000000..be0c80f3 --- /dev/null +++ b/src/utilities/CMakeLists.txt @@ -0,0 +1,5 @@ +# Manually specify files to be included +list(APPEND PRISMS_PF_SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/utilities.cc +) +set(PRISMS_PF_SOURCE_FILES ${PRISMS_PF_SOURCE_FILES} PARENT_SCOPE) \ No newline at end of file diff --git a/src/utilities/utilities.cc b/src/utilities/utilities.cc index 7a793247..81ee5234 100644 --- a/src/utilities/utilities.cc +++ b/src/utilities/utilities.cc @@ -17,3 +17,21 @@ MatrixFreePDE::getFieldIndex(std::string _name) pcout << "\nutilities.h: field '" << _name.c_str() << "' not initialized\n"; exit(-1); } + +template class MatrixFreePDE<2, 1>; +template class MatrixFreePDE<3, 1>; + +template class MatrixFreePDE<2, 2>; +template class MatrixFreePDE<3, 2>; + +template class MatrixFreePDE<3, 3>; +template class MatrixFreePDE<2, 3>; + +template class MatrixFreePDE<3, 4>; +template class MatrixFreePDE<2, 4>; + +template class MatrixFreePDE<3, 5>; +template class MatrixFreePDE<2, 5>; + +template class MatrixFreePDE<3, 6>; +template class MatrixFreePDE<2, 6>; \ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4bbf9be9..e0dc0eb8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -3,7 +3,7 @@ # Adapted from the ASPECT CMake file ## -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.8.0) project(prisms_pf_unit_tests)