Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing CMakeLists.txt for intel compilers #388

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

cmake_minimum_required(VERSION 3.1.0)

project(prisms_pf)

file(STRINGS "${CMAKE_SOURCE_DIR}/VERSION" PRISMS_PF_VERSION LIMIT_COUNT 1)

message(STATUS "")
Expand Down Expand Up @@ -93,6 +91,13 @@ 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"
Expand All @@ -115,6 +120,16 @@ message(STATUS "Configuring PRISMS-PF build targets")
message(STATUS "=========================================================")
message(STATUS "")

# Set name of project with deal.II variables loaded in. This lets us find the
# right compilers.
project(prisms_pf CXX)
message(STATUS "")

# Ensure C++17 is used
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Generate config.h to enable and disable certain features within the source code.
set(PRISMS_PF_SOURCE_DIR ${CMAKE_SOURCE_DIR})

Expand Down Expand Up @@ -227,13 +242,19 @@ string(REPLACE "-Wno-deprecated-declarations" "" DEAL_II_WARNING_FLAGS "${DEAL_I
# Set additional compiler flags
set(PRISMS_PF_ADDITIONAL_CXX_FLAGS "" CACHE STRING "Additional CMAKE_CXX_FLAGS applied after the deal.II options.")

# Add default flags if PRISMS_PF_ADDITIONAL_CXX_FLAGS is empty
if(PRISMS_PF_ADDITIONAL_CXX_FLAGS STREQUAL "")
set(PRISMS_PF_ADDITIONAL_CXX_FLAGS "-Wall -Wextra -Wpedantic -Wunused-variable -Wdisabled-optimization -std=c++17" CACHE STRING "Default CXX flags" FORCE)
endif()

if(NOT PRISMS_PF_ADDITIONAL_CXX_FLAGS STREQUAL "")
message(STATUS "Appending PRISMS_PF_ADDITIONAL_CXX_FLAGS: '${PRISMS_PF_ADDITIONAL_CXX_FLAGS}':")
string(APPEND DEAL_II_CXX_FLAGS_DEBUG " ${PRISMS_PF_ADDITIONAL_CXX_FLAGS}")
string(APPEND DEAL_II_CXX_FLAGS_RELEASE " ${PRISMS_PF_ADDITIONAL_CXX_FLAGS}")
message(STATUS " DEAL_II_WARNING_FLAGS: ${DEAL_II_WARNING_FLAGS}")
message(STATUS " DEAL_II_CXX_FLAGS_DEBUG: ${DEAL_II_CXX_FLAGS_DEBUG}")
message(STATUS " DEAL_II_CXX_FLAGS_RELEASE: ${DEAL_II_CXX_FLAGS_RELEASE}")
message(STATUS "")
endif()

if(${PRISMS_PF_BUILD_DEBUG} STREQUAL "ON")
Expand Down
18 changes: 16 additions & 2 deletions applications/CHAC_anisotropy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

cmake_minimum_required(VERSION 3.1.0)

project(myapp)

message(STATUS "")
message(STATUS "=========================================================")
message(STATUS "Configuring PRISMS-PF application")
Expand Down Expand Up @@ -69,6 +67,13 @@ 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"
Expand All @@ -77,6 +82,15 @@ endif()

deal_ii_initialize_cached_variables()

# Set name of project with deal.II variables loaded in. This lets us find the
# right compilers.
project(myapp CXX)

# Ensure C++17 is used
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Make and ninja build options
if(CMAKE_GENERATOR MATCHES "Ninja")
set(_make_command "$ ninja")
Expand Down
18 changes: 16 additions & 2 deletions applications/CHAC_anisotropyRegularized/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

cmake_minimum_required(VERSION 3.1.0)

project(myapp)

message(STATUS "")
message(STATUS "=========================================================")
message(STATUS "Configuring PRISMS-PF application")
Expand Down Expand Up @@ -69,6 +67,13 @@ 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"
Expand All @@ -77,6 +82,15 @@ endif()

deal_ii_initialize_cached_variables()

# Set name of project with deal.II variables loaded in. This lets us find the
# right compilers.
project(myapp CXX)

# Ensure C++17 is used
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Make and ninja build options
if(CMAKE_GENERATOR MATCHES "Ninja")
set(_make_command "$ ninja")
Expand Down
18 changes: 16 additions & 2 deletions applications/CHAC_performance_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

cmake_minimum_required(VERSION 3.1.0)

project(myapp)

message(STATUS "")
message(STATUS "=========================================================")
message(STATUS "Configuring PRISMS-PF application")
Expand Down Expand Up @@ -69,6 +67,13 @@ 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"
Expand All @@ -77,6 +82,15 @@ endif()

deal_ii_initialize_cached_variables()

# Set name of project with deal.II variables loaded in. This lets us find the
# right compilers.
project(myapp CXX)

# Ensure C++17 is used
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Make and ninja build options
if(CMAKE_GENERATOR MATCHES "Ninja")
set(_make_command "$ ninja")
Expand Down
18 changes: 16 additions & 2 deletions applications/CHiMaD_benchmarks/CHiMaD_benchmark1a/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

cmake_minimum_required(VERSION 3.1.0)

project(myapp)

message(STATUS "")
message(STATUS "=========================================================")
message(STATUS "Configuring PRISMS-PF application")
Expand Down Expand Up @@ -69,6 +67,13 @@ 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"
Expand All @@ -77,6 +82,15 @@ endif()

deal_ii_initialize_cached_variables()

# Set name of project with deal.II variables loaded in. This lets us find the
# right compilers.
project(myapp CXX)

# Ensure C++17 is used
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Make and ninja build options
if(CMAKE_GENERATOR MATCHES "Ninja")
set(_make_command "$ ninja")
Expand Down
18 changes: 16 additions & 2 deletions applications/CHiMaD_benchmarks/CHiMaD_benchmark1b/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

cmake_minimum_required(VERSION 3.1.0)

project(myapp)

message(STATUS "")
message(STATUS "=========================================================")
message(STATUS "Configuring PRISMS-PF application")
Expand Down Expand Up @@ -69,6 +67,13 @@ 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"
Expand All @@ -77,6 +82,15 @@ endif()

deal_ii_initialize_cached_variables()

# Set name of project with deal.II variables loaded in. This lets us find the
# right compilers.
project(myapp CXX)

# Ensure C++17 is used
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Make and ninja build options
if(CMAKE_GENERATOR MATCHES "Ninja")
set(_make_command "$ ninja")
Expand Down
18 changes: 16 additions & 2 deletions applications/CHiMaD_benchmarks/CHiMaD_benchmark1c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

cmake_minimum_required(VERSION 3.1.0)

project(myapp)

message(STATUS "")
message(STATUS "=========================================================")
message(STATUS "Configuring PRISMS-PF application")
Expand Down Expand Up @@ -69,6 +67,13 @@ 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"
Expand All @@ -77,6 +82,15 @@ endif()

deal_ii_initialize_cached_variables()

# Set name of project with deal.II variables loaded in. This lets us find the
# right compilers.
project(myapp CXX)

# Ensure C++17 is used
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Make and ninja build options
if(CMAKE_GENERATOR MATCHES "Ninja")
set(_make_command "$ ninja")
Expand Down
18 changes: 16 additions & 2 deletions applications/CHiMaD_benchmarks/CHiMaD_benchmark2a/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

cmake_minimum_required(VERSION 3.1.0)

project(myapp)

message(STATUS "")
message(STATUS "=========================================================")
message(STATUS "Configuring PRISMS-PF application")
Expand Down Expand Up @@ -69,6 +67,13 @@ 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"
Expand All @@ -77,6 +82,15 @@ endif()

deal_ii_initialize_cached_variables()

# Set name of project with deal.II variables loaded in. This lets us find the
# right compilers.
project(myapp CXX)

# Ensure C++17 is used
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Make and ninja build options
if(CMAKE_GENERATOR MATCHES "Ninja")
set(_make_command "$ ninja")
Expand Down
18 changes: 16 additions & 2 deletions applications/CHiMaD_benchmarks/CHiMaD_benchmark3a/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

cmake_minimum_required(VERSION 3.1.0)

project(myapp)

message(STATUS "")
message(STATUS "=========================================================")
message(STATUS "Configuring PRISMS-PF application")
Expand Down Expand Up @@ -69,6 +67,13 @@ 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"
Expand All @@ -77,6 +82,15 @@ endif()

deal_ii_initialize_cached_variables()

# Set name of project with deal.II variables loaded in. This lets us find the
# right compilers.
project(myapp CXX)

# Ensure C++17 is used
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Make and ninja build options
if(CMAKE_GENERATOR MATCHES "Ninja")
set(_make_command "$ ninja")
Expand Down
Loading
Loading