Skip to content

Commit

Permalink
Merge pull request #1530 from andrew-platt/f/cmake_bugfix_PR1010
Browse files Browse the repository at this point in the history
Bugfixes for PR #1010 (CMake)
  • Loading branch information
andrew-platt committed Apr 18, 2023
2 parents 9c64eed + f2a3bc2 commit fec5f76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/map/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ endif()
file(GLOB MAP_CLIB_SOURCES src/*.c src/*.cc src/*/*.c src/*/*.cc)
file(GLOB MAP_C_HEADERS src/*.h src/*/*.h)

add_library(mapcpplib_obj OBJECT ${MAP_CLIB_SOURCES} src/MAP_Types.f90 src/MAP_Fortran_Types.f90)
add_library(mapcpplib_obj OBJECT ${MAP_CLIB_SOURCES})

target_include_directories(mapcpplib_obj PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/bstring>
Expand All @@ -52,7 +52,7 @@ set(MAP_F_SOURCES
src/MAP_Fortran_Types.f90
)

add_library(maplib_obj OBJECT src/map.f90)
add_library(maplib_obj OBJECT ${MAP_F_SOURCES})
target_link_libraries(maplib_obj mapcpplib_obj nwtclibs_obj)

add_library(maplib $<TARGET_OBJECTS:mapcpplib_obj> $<TARGET_OBJECTS:maplib_obj>)
Expand Down
2 changes: 1 addition & 1 deletion modules/nwtc-library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ if (USE_LOCAL_STATIC_LAPACK)
endif()

add_library(nwtclibs_obj OBJECT ${NWTCLIBS_SOURCES})
target_link_libraries(nwtclibs_obj nwtcbaselib_obj ${LAPACK_LIBRARIES} ${CMAKE_DL_LIBS})
target_link_libraries(nwtclibs_obj nwtcbaselib_obj nwtcsyslib_obj ${LAPACK_LIBRARIES} ${CMAKE_DL_LIBS})
if (USE_LOCAL_STATIC_LAPACK)
add_dependencies(nwtclibs_obj lapack)
endif()
Expand Down

0 comments on commit fec5f76

Please sign in to comment.