2
2
##
3
3
## S E R I A L B O X
4
4
##
5
- ## This file is distributed under terms of BSD license.
5
+ ## This file is distributed under terms of BSD license.
6
6
## See LICENSE.txt for more information.
7
7
##
8
8
##===------------------------------------------------------------------------------------------===##
@@ -71,7 +71,7 @@ function( serialbox_alias_targets )
71
71
# serialbox_alias_targets( alias target_shared target_static align )
72
72
#
73
73
# Creates ALIAS target for given targets. Prefer target_shared if availabe
74
- #
74
+ #
75
75
set ( _alias ${ARGV0} )
76
76
set ( _target_shared ${ARGV1} )
77
77
set ( _target_static ${ARGV2} )
@@ -107,7 +107,7 @@ endfunction()
107
107
# Find Serialbox libraries
108
108
#====--------------------------------------------------------------------------------------------===
109
109
110
- # Import library targets
110
+ # Import library targets
111
111
if ( NOT @PROJECT_NAME @_TARGETS_EXPORTED )
112
112
include ("${CMAKE_CURRENT_LIST_DIR} /SerialboxTargets.cmake" )
113
113
set ( ${PROJECT_NAME} _TARGETS_EXPORTED TRUE )
@@ -151,57 +151,46 @@ if(NOT(DEFINED SERIALBOX_NO_EXTERNAL_LIBS))
151
151
#
152
152
# Pthreads
153
153
#
154
- message ( STATUS "Serialbox: find_depencency( Threads )" )
154
+ message ( STATUS "Serialbox: find_dependency( Threads)" )
155
155
find_dependency(Threads)
156
156
157
- #
158
- # Boost (Serialbox always uses the shared Boost libraries)
159
- #
160
- get_property (SHARED_LIB_SUPPORT GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS )
161
- if (SHARED_LIB_SUPPORT)
162
- set (Boost_USE_STATIC_LIBS OFF )
163
- set (Boost_USE_STATIC_RUNTIME OFF )
164
- set (Boost_USE_MULTITHREADED ON )
165
- endif ()
166
-
167
157
set (BOOST_LIBRARYDIR "${SERIALBOX_BOOST_LIBRARY_DIRS} " )
168
158
set (BOOST_INCLUDEDIR "${SERIALBOX_BOOST_INCLUDE_DIRS} " )
169
159
set (Boost_NO_SYSTEM_PATHS "ON" ) # Force boost to search locations specified above
170
160
171
- message ( STATUS "Serialbox: find_depencency( Boost ${SERIALBOX_BOOST_VERSION} EXACT COMPONENTS ${SERIALBOX_REQUIRED_BOOST_COMPONENTS} } " )
172
- find_dependency(Boost
173
- ${SERIALBOX_BOOST_VERSION} EXACT COMPONENTS ${SERIALBOX_REQUIRED_BOOST_COMPONENTS} )
161
+ message ( STATUS "Serialbox: find_dependency( Boost ${SERIALBOX_BOOST_VERSION} COMPONENTS ${SERIALBOX_REQUIRED_BOOST_COMPONENTS} ) " )
162
+ find_dependency(Boost
163
+ ${SERIALBOX_BOOST_VERSION} COMPONENTS ${SERIALBOX_REQUIRED_BOOST_COMPONENTS} )
174
164
if (Boost_FOUND)
175
165
list (APPEND SERIALBOX_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} )
176
166
else ()
177
-
178
167
# Give some diagnostic infos
179
168
set (WARN_STR "Serialbox: Boost (${SERIALBOX_BOOST_VERSION} ) NOT found!" )
180
-
169
+
181
170
if (DEFINED Boost_LIB_VERSION)
182
171
string (REPLACE "_" "." FOUND_BOOST_VERSION ${Boost_LIB_VERSION} )
183
- list (APPEND WARN_STR " (Found Boost ${FOUND_BOOST_VERSION} )" )
172
+ list (APPEND WARN_STR " (Found Boost ${FOUND_BOOST_VERSION} )" )
184
173
endif ()
185
-
174
+
186
175
list (APPEND WARN_STR "\n Required components:" )
187
-
176
+
188
177
foreach (component ${SERIALBOX_REQUIRED_BOOST_COMPONENTS} )
189
178
list (APPEND WARN_STR "\n - ${component} " )
190
179
endforeach ()
191
-
180
+
192
181
message (WARNING ${WARN_STR} "\n " )
193
182
endif ()
194
-
183
+
195
184
#
196
185
# OpenSSL
197
186
#
198
187
if (SERIALBOX_HAS_OPENSSL)
199
188
find_package (OpenSSL QUIET )
200
- if (NOT OpenSSL_FOUND)
189
+ if (NOT OpenSSL_FOUND)
201
190
message (WARNING "Serialbox depends on the OpenSSL libraries" )
202
191
endif ()
203
192
endif ()
204
-
193
+
205
194
#
206
195
# NetCDF
207
196
#
@@ -210,7 +199,7 @@ if(NOT(DEFINED SERIALBOX_NO_EXTERNAL_LIBS))
210
199
if (NETCDF_ROOT_ENV)
211
200
set (NETCDF_ROOT ${NETCDF_ROOT_ENV} CACHE PATH "NetCDF install path." )
212
201
endif ()
213
-
202
+
214
203
if (NOT (DEFINED NETCDF_ROOT))
215
204
find_path (NETCDF_ROOT NAMES include /netcdf.h)
216
205
else ()
@@ -222,7 +211,7 @@ if(NOT(DEFINED SERIALBOX_NO_EXTERNAL_LIBS))
222
211
if (NETCDF_LIBRARIES)
223
212
mark_as_advanced (NETCDF_LIBRARIES)
224
213
else ()
225
- message (WARNING
214
+ message (WARNING
226
215
"Serialbox depends on the NetCDF-4 libraries. (Try setting NETCDF_ROOT in the env)" )
227
216
endif ()
228
217
endif ()
@@ -233,4 +222,3 @@ endif()
233
222
#====--------------------------------------------------------------------------------------------===
234
223
find_file (SERIALBOX_PPSER pp_ser.py @PACKAGE_PYTHON_INSTALL_DIR@/pp_ser)
235
224
include (@PACKAGE_CMAKE_INSTALL_DIR@/SerialboxTooling.cmake)
236
-
0 commit comments