From 8a03232dc2d574f615690b61588c34c8ebc5eda0 Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Wed, 12 Apr 2023 13:36:42 -0600 Subject: [PATCH 1/2] cmake: fix for nwtclib_obj compile --- modules/nwtc-library/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nwtc-library/CMakeLists.txt b/modules/nwtc-library/CMakeLists.txt index 3d11e20005..e0f2e241f8 100644 --- a/modules/nwtc-library/CMakeLists.txt +++ b/modules/nwtc-library/CMakeLists.txt @@ -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() From f2a3bc2a3b7368da6af270d8583782a5ad62cf82 Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Wed, 12 Apr 2023 13:37:52 -0600 Subject: [PATCH 2/2] cmake: fix cmakelists.txt for map The _Types.f90 were collected in the wrong library. This was causing cmake + Visual studio to fail in building (VS treated the mapcpplib build as cpp only and ignored the .f90 files) --- modules/map/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/map/CMakeLists.txt b/modules/map/CMakeLists.txt index ff9a7fe8b0..0108ea5cec 100644 --- a/modules/map/CMakeLists.txt +++ b/modules/map/CMakeLists.txt @@ -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 $ @@ -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 $ $)