Skip to content

Commit

Permalink
Fixes compilation with mtln
Browse files Browse the repository at this point in the history
  • Loading branch information
lmdiazangulo committed Dec 14, 2024
1 parent e395752 commit 5acfccd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 23 deletions.
36 changes: 13 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ else()
set(SEMBA_FDTD_MAIN_LIB OFF)
endif()

if(SEMBA_FDTD_ENABLE_SMBJSON)
add_definitions(-DCompileWithSMBJSON)
endif()
if (SEMBA_FDTD_ENABLE_MTLN)
add_definitions(-DCompileWithMTLN)
endif()
add_definitions(
-DCompileWithInt2
-DCompileWithReal4
-DCompileWithOpenMP
)

include("${CMAKE_CURRENT_SOURCE_DIR}/set_precompiled_libraries.cmake")

if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
Expand All @@ -42,23 +54,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
endif()
endif()

if (SEMBA_FDTD_ENABLE_MTLN OR SEMBA_FDTD_ENABLE_SMBJSON)
set (FHASH_SOURCES_FOLDER "external/fhash/src/")
add_library(fhash
${FHASH_SOURCES_FOLDER}/fhash.f90
${FHASH_SOURCES_FOLDER}/fhash_sll.f90
${FHASH_SOURCES_FOLDER}/fhash_data_container.f90
${FHASH_SOURCES_FOLDER}/fhash_tbl.f90
${FHASH_SOURCES_FOLDER}/fhash_tbl_iter.f90
${FHASH_SOURCES_FOLDER}/fhash_fnv.f90
${FHASH_SOURCES_FOLDER}/fhash_key/base.f90
${FHASH_SOURCES_FOLDER}/fhash_key/int32.f90
${FHASH_SOURCES_FOLDER}/fhash_key/int64.f90
${FHASH_SOURCES_FOLDER}/fhash_key/char.f90
${FHASH_SOURCES_FOLDER}/fhash_key/int32_1d.f90
${FHASH_SOURCES_FOLDER}/fhash_key/int64_1d.f90
)
endif()
add_subdirectory(external)

add_library(semba-types
"src_main_pub/nfde_types.F90"
Expand All @@ -69,7 +65,6 @@ add_library(semba-types
)

if(SEMBA_FDTD_ENABLE_SMBJSON)
add_definitions(-DCompileWithSMBJSON)
add_subdirectory(src_json_parser)
set(SMBJSON_LIBRARIES smbjson)
endif()
Expand Down Expand Up @@ -138,10 +133,5 @@ include_directories(${CMAKE_BINARY_DIR}/mod)
include_directories(${HDF5_INCLUDE_DIRS})
include_directories(${FHASH_INCLUDES})

add_definitions(
-DCompileWithInt2
-DCompileWithReal4
-DCompileWithOpenMP
)


18 changes: 18 additions & 0 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

if (SEMBA_FDTD_ENABLE_MTLN OR SEMBA_FDTD_ENABLE_SMBJSON)
set (FHASH_SOURCES_FOLDER "fhash/src/")
add_library(fhash
${FHASH_SOURCES_FOLDER}/fhash.f90
${FHASH_SOURCES_FOLDER}/fhash_sll.f90
${FHASH_SOURCES_FOLDER}/fhash_data_container.f90
${FHASH_SOURCES_FOLDER}/fhash_tbl.f90
${FHASH_SOURCES_FOLDER}/fhash_tbl_iter.f90
${FHASH_SOURCES_FOLDER}/fhash_fnv.f90
${FHASH_SOURCES_FOLDER}/fhash_key/base.f90
${FHASH_SOURCES_FOLDER}/fhash_key/int32.f90
${FHASH_SOURCES_FOLDER}/fhash_key/int64.f90
${FHASH_SOURCES_FOLDER}/fhash_key/char.f90
${FHASH_SOURCES_FOLDER}/fhash_key/int32_1d.f90
${FHASH_SOURCES_FOLDER}/fhash_key/int64_1d.f90
)
endif()

0 comments on commit 5acfccd

Please sign in to comment.