Commit b7c0a782 authored by Cianciosa, Mark's avatar Cianciosa, Mark
Browse files

Remove fortran library from findnetcdf.

parent 7e9704b0
Loading
Loading
Loading
Loading
+4 −19
Original line number Diff line number Diff line
@@ -14,19 +14,10 @@ find_path (NetCDF_C_INCLUDE_DIR
           DOC "netcdf C include directories")
mark_as_advanced (NetCDF_C_INCLUDE_DIR)

find_path (NetCDF_Fortran_INCLUDE_DIR
           NAMES netcdf.inc
           DOC "netcdf Fortran include directories")
mark_as_advanced (NetCDF_Fortran_INCLUDE_DIR)

find_library (NetCDF_C_LIBRARY
              NAMES netcdf
              DOC "netcdf C library")
mark_as_advanced (NetCDF_C_LIBRARY)
find_library (NetCDF_Fortran_LIBRARY
              NAMES netcdff
              DOC "netcdf Fortran library")
mark_as_advanced (NetCDF_Fortran_LIBRARY)

if (NetCDF_C_INCLUDE_DIR)
    file (STRINGS "${NetCDF_C_INCLUDE_DIR}/netcdf_meta.h" _netcdf_version_lines
@@ -45,12 +36,12 @@ endif ()

include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (NetCDF
                                   REQUIRED_VARS NetCDF_C_LIBRARY NetCDF_Fortran_LIBRARY NetCDF_C_INCLUDE_DIR NetCDF_Fortran_INCLUDE_DIR
                                   REQUIRED_VARS NetCDF_C_LIBRARY NetCDF_C_INCLUDE_DIR
                                   VERSION_VAR NetCDF_VERSION)

if (NetCDF_FOUND)
    set (NetCDF_INCLUDE_DIRS ${NetCDF_C_INCLUDE_DIR} ${NetCDF_F_INCLUDE_DIR})
    set (NetCDF_LIBRARIES "${NetCDF_C_LIBRARY} ${NetCDF_Fortran_LIBRARY}")
    set (NetCDF_INCLUDE_DIRS ${NetCDF_C_INCLUDE_DIR})
    set (NetCDF_LIBRARIES "${NetCDF_C_LIBRARY}")

    if (NOT TARGET NetCDF::NetCDF_C)
       add_library (NetCDF::NetCDF_C UNKNOWN IMPORTED)
@@ -58,16 +49,10 @@ if (NetCDF_FOUND)
                              IMPORTED_LOCATION "${NetCDF_C_LIBRARY}"
                              INTERFACE_INCLUDE_DIRECTORIES ${NetCDF_C_INCLUDE_DIR})
    endif ()
    if (NOT TARGET NetCDF::NetCDF_Fortran)
       add_library (NetCDF::NetCDF_Fortran UNKNOWN IMPORTED)
       set_target_properties (NetCDF::NetCDF_Fortran PROPERTIES
                              IMPORTED_LOCATION "${NetCDF_Fortran_LIBRARY}"
                              INTERFACE_INCLUDE_DIRECTORIES ${NetCDF_Fortran_INCLUDE_DIR})
    endif ()

    if (NOT TARGET NetCDF::NetCDF)
        add_library (NetCDF::NetCDF INTERFACE IMPORTED)
        target_link_libraries (NetCDF::NetCDF INTERFACE NetCDF::NetCDF_Fortran NetCDF::NetCDF_C)
        target_link_libraries (NetCDF::NetCDF INTERFACE NetCDF::NetCDF_C)
        target_include_directories (NetCDF::NetCDF INTERFACE ${NetCDF_INCLUDE_DIRS})
    endif ()
endif ()
+0 −90
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
		C73BBE8229F820810027BB7F /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C71342682947F36100672AD4 /* Metal.framework */; };
		C79141B622DAAD0C00E0BA0D /* xrays.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C79141B522DAAD0C00E0BA0D /* xrays.cpp */; };
		C7D371132A0595A40074676E /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C71342682947F36100672AD4 /* Metal.framework */; };
		C7D371222A05D84F0074676E /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C71342682947F36100672AD4 /* Metal.framework */; };
		C7E5644528A2A1AA000F31A2 /* backend_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C7931E7328074F540033B488 /* backend_test.cpp */; };
		C7E5645128A2A1DD000F31A2 /* dispersion_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C7931E6B28073BCA0033B488 /* dispersion_test.cpp */; };
		C7E5645D28A2A21D000F31A2 /* solver_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C7931E6C28073BCA0033B488 /* solver_test.cpp */; };
@@ -55,15 +54,6 @@
			);
			runOnlyForDeploymentPostprocessing = 1;
		};
		C7D371162A05B7230074676E /* CopyFiles */ = {
			isa = PBXCopyFilesBuildPhase;
			buildActionMask = 2147483647;
			dstPath = /usr/share/man/man1/;
			dstSubfolderSpec = 0;
			files = (
			);
			runOnlyForDeploymentPostprocessing = 1;
		};
		C7E5643C28A2A16F000F31A2 /* CopyFiles */ = {
			isa = PBXCopyFilesBuildPhase;
			buildActionMask = 2147483647;
@@ -186,7 +176,6 @@
		C7B677DA29E464AE00D3ADC6 /* cpu_context.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = cpu_context.hpp; sourceTree = "<group>"; };
		C7CEA0042948D02A00F61D09 /* timing.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = timing.hpp; sourceTree = "<group>"; };
		C7CEA0052948EB0F00F61D09 /* cuda_context.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = cuda_context.hpp; sourceTree = "<group>"; };
		C7D371182A05B7230074676E /* efit_test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = efit_test; sourceTree = BUILT_PRODUCTS_DIR; };
		C7E5643E28A2A16F000F31A2 /* backend_test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = backend_test; sourceTree = BUILT_PRODUCTS_DIR; };
		C7E5644A28A2A1C5000F31A2 /* dispersion_test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = dispersion_test; sourceTree = BUILT_PRODUCTS_DIR; };
		C7E5645628A2A204000F31A2 /* solver_test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = solver_test; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -231,14 +220,6 @@
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		C7D371152A05B7230074676E /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
			files = (
				C7D371222A05D84F0074676E /* Metal.framework in Frameworks */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		C7E5643B28A2A16F000F31A2 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
@@ -352,7 +333,6 @@
				C7FA0E0329590EF300A31E4D /* jit_test */,
				C73BBE6F29F72BC50027BB7F /* trigonometry_test */,
				C73BBE7B29F816E50027BB7F /* piecewise_test */,
				C7D371182A05B7230074676E /* efit_test */,
			);
			name = Products;
			sourceTree = "<group>";
@@ -492,23 +472,6 @@
			productReference = C79141B322DAAD0C00E0BA0D /* graph_driver */;
			productType = "com.apple.product-type.tool";
		};
		C7D371172A05B7230074676E /* efit_test */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = C7D3711C2A05B7230074676E /* Build configuration list for PBXNativeTarget "efit_test" */;
			buildPhases = (
				C7D371142A05B7230074676E /* Sources */,
				C7D371152A05B7230074676E /* Frameworks */,
				C7D371162A05B7230074676E /* CopyFiles */,
			);
			buildRules = (
			);
			dependencies = (
			);
			name = efit_test;
			productName = efit_test.cpp;
			productReference = C7D371182A05B7230074676E /* efit_test */;
			productType = "com.apple.product-type.tool";
		};
		C7E5643D28A2A16F000F31A2 /* backend_test */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = C7E5644228A2A16F000F31A2 /* Build configuration list for PBXNativeTarget "backend_test" */;
@@ -684,9 +647,6 @@
					C79141B222DAAD0C00E0BA0D = {
						CreatedOnToolsVersion = 10.2.1;
					};
					C7D371172A05B7230074676E = {
						CreatedOnToolsVersion = 14.3;
					};
					C7E5643D28A2A16F000F31A2 = {
						CreatedOnToolsVersion = 13.4;
					};
@@ -742,7 +702,6 @@
				C7FA0E0229590EF300A31E4D /* jit_test */,
				C73BBE6E29F72BC50027BB7F /* trigonometry_test */,
				C73BBE7A29F816E50027BB7F /* piecewise_test */,
				C7D371172A05B7230074676E /* efit_test */,
			);
		};
/* End PBXProject section */
@@ -780,13 +739,6 @@
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		C7D371142A05B7230074676E /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		C7E5643A28A2A16F000F31A2 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
@@ -1124,39 +1076,6 @@
			};
			name = Release;
		};
		C7D3711D2A05B7230074676E /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
				"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
				CODE_SIGN_STYLE = Automatic;
				GCC_PREPROCESSOR_DEFINITIONS = (
					"NC_FILE=\\\"/Users/m4c/Projects/graph_framework/graph_tests/efit.nc\\\"",
					"DEBUG=1",
					"$(inherited)",
				);
				MACOSX_DEPLOYMENT_TARGET = 13.3;
				PRODUCT_NAME = "$(TARGET_NAME)";
			};
			name = Debug;
		};
		C7D3711E2A05B7230074676E /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
				"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
				CODE_SIGN_STYLE = Automatic;
				GCC_PREPROCESSOR_DEFINITIONS = (
					"NC_FILE=\\\"/Users/m4c/Projects/graph_framework/graph_tests/efit.nc\\\"",
					USE_METAL,
					"CXX=\\\"c++\\\"",
					"$(inherited)",
				);
				MACOSX_DEPLOYMENT_TARGET = 13.3;
				PRODUCT_NAME = "$(TARGET_NAME)";
			};
			name = Release;
		};
		C7E5644328A2A16F000F31A2 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
@@ -1435,15 +1354,6 @@
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
		C7D3711C2A05B7230074676E /* Build configuration list for PBXNativeTarget "efit_test" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				C7D3711D2A05B7230074676E /* Debug */,
				C7D3711E2A05B7230074676E /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
		C7E5644228A2A16F000F31A2 /* Build configuration list for PBXNativeTarget "backend_test" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (