Skip to content

Commit

Permalink
Modify and update CMake (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
spdomin authored Sep 25, 2023
1 parent 7f2be16 commit 2de1b42
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################ BASE ######################################
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required (VERSION 3.23.0)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
cmake_policy(SET CMP0057 NEW)

Expand All @@ -13,6 +13,11 @@ option(ENABLE_PARAVIEW_CATALYST
option(ENABLE_WARNINGS "Add -Wall to show compiler warnings" ON)
option(ENABLE_EXTRA_WARNINGS "Add -Wextra to show even more compiler warnings" OFF)

########################### NALU-first #####################################
# Set Nalu's compilers, CMAKE_FIND_LIBRARY_PREFIXES
# and CMAKE_FIND_LIBRARY_SUFFIXES, etc, after inheriting settings from Trilinos
project(Nalu CXX Fortran)

########################## TRILINOS ####################################
message(" Trilinos_DIR = ${Trilinos_DIR}")
set(CMAKE_PREFIX_PATH ${Trilinos_DIR} ${CMAKE_PREFIX_PATH})
Expand Down Expand Up @@ -51,10 +56,6 @@ else(Trilinos_BUILD_SHARED_LIBS)
set(Nalu_LIBRARY_TYPE STATIC)
endif(Trilinos_BUILD_SHARED_LIBS)

# Set Nalu's compilers, CMAKE_FIND_LIBRARY_PREFIXES
# and CMAKE_FIND_LIBRARY_SUFFIXES, etc, after inheriting settings from Trilinos
project(Nalu CXX Fortran)

############################ YAML ######################################
set(CMAKE_PREFIX_PATH ${YAML_DIR} ${CMAKE_PREFIX_PATH})
find_package(YAML-CPP QUIET)
Expand All @@ -76,7 +77,7 @@ else()
message(FATAL_ERROR "YAML-CPP NOT FOUND")
endif()

########################### NALU #####################################
########################### NALU-second #####################################

# Add any extra flags based on compiler and/or OS
message("-- CMAKE_SYSTEM_NAME = ${CMAKE_SYSTEM_NAME}")
Expand Down

0 comments on commit 2de1b42

Please sign in to comment.