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

Remove CONTIGUOUS from dist_spec_control_argument #98

Merged
merged 12 commits into from
Jul 19, 2024
Prev Previous commit
Next Next commit
Tidy
  • Loading branch information
wdeconinck committed Jul 15, 2024
commit 2fdc7ffacf08df80dc8d737b3c9c377b34b8b91a
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ ecbuild_add_option( FEATURE TRANSI
DESCRIPTION "Compile TransI C-interface to trans"
CONDITION HAVE_DOUBLE_PRECISION )

if( CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
if( CMAKE_Fortran_COMPILER_VERSION VERSION_LESS_EQUAL 19)
set( COMPILER_HAS_CONTIG_ISSUES True)
endif()
elseif( CMAKE_Fortran_COMPILER_ID MATCHES "GNU" )
if( CMAKE_Fortran_COMPILER_VERSION VERSION_EQUAL "9.2" OR CMAKE_Fortran_COMPILER_VERSION VERSION_EQUAL "12.2.0" )
set( COMPILER_HAS_CONTIG_ISSUES True)
endif()
endif()

ectrans_find_lapack()

### Add sources and tests
Expand Down
13 changes: 13 additions & 0 deletions cmake/ectrans_compile_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ elseif( CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
ecbuild_add_fortran_flags("-fast-transcendentals -fp-model precise -fp-speculation=safe")
endif()

if( NOT DEFINED ECTRANS_HAVE_CONTIGUOUS_ISSUE )
if( CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
if( CMAKE_Fortran_COMPILER_VERSION VERSION_LESS_EQUAL 19)
set( ECTRANS_HAVE_CONTIGUOUS_ISSUE True )
endif()
elseif( CMAKE_Fortran_COMPILER_ID MATCHES "GNU" )
if( CMAKE_Fortran_COMPILER_VERSION VERSION_EQUAL "9.2"
OR CMAKE_Fortran_COMPILER_VERSION VERSION_EQUAL "12.2.0" )
set( ECTRANS_HAVE_CONTIGUOUS_ISSUE True )
endif()
endif()
endif()

macro( ectrans_add_compile_options )
set( options )
set( single_value_args FLAGS )
Expand Down
8 changes: 4 additions & 4 deletions src/trans/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,6 @@ foreach( prec dp sp )
PUBLIC_LIBS ectrans_common ectrans_${prec}_includes
)

if( COMPILER_HAS_CONTIG_ISSUES )
target_compile_definitions( ectrans_${prec} PRIVATE CONTIG_BUGGY_COMPILER)
endif()

ectrans_target_fortran_module_directory(
TARGET ectrans_${prec}
MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/module/ectrans_${prec}
Expand All @@ -247,6 +243,10 @@ foreach( prec dp sp )
target_compile_definitions( ectrans_${prec} PRIVATE WITH_FFTW )
ecbuild_debug("target_link_libraries( ectrans_${prec} PRIVATE ${LAPACK_LIBRARIES} )")
target_link_libraries( ectrans_${prec} PRIVATE ${LAPACK_LIBRARIES} )
if( ECTRANS_HAVE_CONTIGUOUS_ISSUE )
ecbuild_debug("target_compile_definitions( ectrans_${prec} PRIVATE CONTIG_BUGGY_COMPILER)")
target_compile_definitions( ectrans_${prec} PRIVATE CONTIG_BUGGY_COMPILER)
endif()

if( HAVE_OMP )
ecbuild_debug("target_link_libraries( ectrans_${prec} PRIVATE OpenMP::OpenMP_Fortran )")
Expand Down
Loading