Skip to content

Commit a1ff7cd

Browse files
committed
CMakeLists.txt. GSL will only be searched for in case we are linking axionlib
1 parent d8ec95b commit a1ff7cd

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

CMakeLists.txt

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,17 +188,24 @@ else ()
188188
set(REST_MPFR OFF)
189189
endif (${REST_MPFR} MATCHES "ON")
190190

191-
# GSL #### Find GSL
192-
find_package(GSL REQUIRED)
191+
if( ((${REST_ALL_LIBS} MATCHES "ON") AND (NOT DEFINED RESTLIB_AXION)) OR (${RESTLIB_AXION} MATCHES "ON") )
192+
# GSL #### Find GSL
193+
find_package(GSL REQUIRED)
193194

194-
# Include GSL directories
195-
set(external_include_dirs ${external_include_dirs} ${GSL_INCLUDE_DIRS})
195+
# Include GSL directories
196+
set(external_include_dirs ${external_include_dirs} ${GSL_INCLUDE_DIRS})
196197

197-
# Link GSL libraries
198-
set(external_libs ${external_libs};${GSL_LIBRARIES})
198+
# Link GSL libraries
199+
set(external_libs ${external_libs};${GSL_LIBRARIES})
199200

200-
message(STATUS "Found GSL libraries : ${GSL_LIBRARIES}")
201-
message(STATUS "GSL headers : ${GSL_INCLUDE_DIRS}")
201+
message(STATUS "Found GSL libraries : ${GSL_LIBRARIES}")
202+
message(STATUS "GSL headers : ${GSL_INCLUDE_DIRS}")
203+
204+
set(REST_GSL ON)
205+
else ()
206+
set(REST_GSL OFF)
207+
message(STATUS "GSL libraries not required")
208+
endif( ((${REST_ALL_LIBS} MATCHES "ON") AND (NOT DEFINED RESTLIB_AXION)) OR (${RESTLIB_AXION} MATCHES "ON") )
202209

203210
# CURL #####
204211
find_library(CURL_LIB curl)

0 commit comments

Comments
 (0)