Skip to content

Commit

Permalink
CMake knows compiler flags
Browse files Browse the repository at this point in the history
  • Loading branch information
MarDiehl committed Dec 27, 2023
1 parent e1ca6bb commit af7f73f
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ else()
endif()
add_definitions("-D${DAMASK_SOLVER}")

set(CMAKE_Fortran_PREPROCESS "ON")

# EXPERIMENTAL: This might help to detect HDF5 and FFTW3 in the future if PETSc is not aware of them
set(ENV{PKG_CONFIG_PATH} "$ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/externalpackages:$ENV{PKG_CONFIG_PATH}")
pkg_check_modules(HDF5 hdf5)
Expand Down
3 changes: 0 additions & 3 deletions cmake/Compiler-GNU.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ set (STANDARD_CHECK "-std=f2018 -pedantic-errors" )

#------------------------------------------------------------------------------------------------
# Fine tuning compilation options
set (COMPILE_FLAGS "${COMPILE_FLAGS} -cpp")
# preprocessor

set (COMPILE_FLAGS "${COMPILE_FLAGS} -fPIE")
# position independent code

Expand Down
3 changes: 0 additions & 3 deletions cmake/Compiler-Intel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ set (LINKER_FLAGS "${LINKER_FLAGS} -shared-intel")

#------------------------------------------------------------------------------------------------
# Fine tuning compilation options
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fpp")
# preprocessor

set (COMPILE_FLAGS "${COMPILE_FLAGS} -no-ftz")
# disable flush underflow to zero, will be set if -O[1,2,3]

Expand Down
3 changes: 0 additions & 3 deletions cmake/Compiler-IntelLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ set (LINKER_FLAGS "${LINKER_FLAGS} -shared-intel -fc=ifx")

#------------------------------------------------------------------------------------------------
# Fine tuning compilation options
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fpp")
# preprocessor

set (COMPILE_FLAGS "${COMPILE_FLAGS} -no-ftz")
# disable flush underflow to zero, will be set if -O[1,2,3]

Expand Down
2 changes: 0 additions & 2 deletions cmake/Compiler-LLVMFlang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ endif ()

#------------------------------------------------------------------------------------------------
# Fine tuning compilation options
set (COMPILE_FLAGS "${COMPILE_FLAGS} -cpp")
# preprocessor

0 comments on commit af7f73f

Please sign in to comment.