Skip to content

Commit 6e6d395

Browse files
committed
CMakeLists.txt: remove rpath handling
1 parent 909d6a8 commit 6e6d395

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

CMakeLists.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ set (CPRNC_Fortran_MODS ${CMAKE_CURRENT_BINARY_DIR}/compare_vars_mod.mod
2525
${CMAKE_CURRENT_BINARY_DIR}/prec.mod)
2626

2727
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
28-
set(CMAKE_MACOSX_RPATH 1)
29-
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
3028

3129
# Compiler-specific compile options
3230
if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
@@ -78,21 +76,7 @@ endforeach ()
7876

7977
#===== NetCDF-Fortran =====
8078
INCLUDE(FindNetCDF)
81-
find_library(netcdf_fortran_lib netcdff HINTS ${NetCDF_Fortran_ROOT})
82-
#message (STATUS "netcdf_fortran_lib == ${netcdf_fortran_lib}")
83-
get_filename_component(netcdf_fortran_lib_location ${netcdf_fortran_lib} DIRECTORY)
84-
#message (STATUS "netcdf_fortran_lib_location == ${netcdf_fortran_lib_location}")
85-
SET(CMAKE_INSTALL_RPATH "${netcdf_fortran_lib_location};${netcdf_c_lib_location}")
86-
87-
find_library(netcdf_c_lib netcdf HINTS ${NetCDF_C_LIBRARY})
88-
#message (STATUS "netcdf_c_lib == ${netcdf_c_lib}")
89-
get_filename_component(netcdf_c_lib_location ${netcdf_c_lib} DIRECTORY)
90-
#message (STATUS "netcdf_c_lib_location == ${netcdf_c_lib_location}")
91-
92-
list(APPEND CMAKE_BUILD_RPATH ${netcdf_fortran_lib_location} ${netcdf_c_lib_location})
93-
#message("CMAKE_BUILD_RPATH is ${CMAKE_BUILD_RPATH}")
9479
add_executable (cprnc ${CPRNC_Fortran_SRCS} ${CPRNC_GenF90_SRCS})
95-
#message("Setting include dir ${NetCDF_Fortran_INCLUDE_DIRS}")
9680
target_include_directories(cprnc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${NetCDF_Fortran_INCLUDE_DIRS})
9781

9882
add_dependencies (cprnc genf90)

0 commit comments

Comments
 (0)