File tree Expand file tree Collapse file tree 4 files changed +6
-18
lines changed
Expand file tree Collapse file tree 4 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -2,17 +2,17 @@ cmake_minimum_required(VERSION 2.8.10...3.26.0)
22
33project (Base9 CXX C)
44
5- list ( APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR} /cmake" )
5+ list (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR} /cmake" )
66
77set (CMAKE_REQUIRED_INCLUDES "/usr/local/include" )
88
99include (CheckIncludeFiles)
10-
1110check_include_files (math.h HAS_MATH)
12- check_include_files ("gsl/gsl_blas.h;gsl/gsl_math.h;gsl/gsl_eigen.h;gsl/gsl_statistics.h;gsl/gsl_linalg.h;gsl/gsl_spline.h;gsl/gsl_errno.h" HAS_GSL_BLAS)
1311check_include_files (getopt.h HAS_GETOPT)
1412check_include_files (unistd.h HAS_UNISTD)
1513
14+ find_package (GSL REQUIRED)
15+
1616include (CheckFunctionExists)
1717set (CMAKE_REQUIRED_LIBRARIES "m" )
1818check_function_exists (exp exp HAS_EXP)
@@ -119,18 +119,6 @@ MARK_AS_ADVANCED(
119119#####################################
120120# Project specific code starts here #
121121#####################################
122- find_library (GSL_LOC
123- gsl
124- ENV LD_LIBRARY_PATH)
125-
126- find_library (GSLCBLAS_LOC
127- gslcblas
128- ENV LD_LIBRARY_PATH)
129-
130- MARK_AS_ADVANCED (
131- GSL_LOC
132- GSLCBLAS_LOC)
133-
134122# Additional include and link directories
135123include_directories (base9)
136124include_directories (yaml-cpp/include )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ include_directories( ${YAML_CPP_INCLUDE_DIRS} "/usr/local/include" )
66
77add_executable (multiPopMcmc ${MULTIPOPMCMC_FILES} )
88
9- target_link_libraries (multiPopMcmc base9 m ${GSL_LOC} ${GSLCBLAS_LOC} yaml-cpp)
9+ target_link_libraries (multiPopMcmc base9 m GSL::gsl GSL::gslcblas yaml-cpp)
1010
1111install (TARGETS multiPopMcmc
1212 DESTINATION bin)
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ include_directories( ${YAML_CPP_INCLUDE_DIRS} "/usr/local/include" )
66
77add_executable (sampleMass ${SAMPLEWDMASS_FILES} )
88
9- target_link_libraries (sampleMass base9 m yaml-cpp ${GSL_LOC} ${GSLCBLAS_LOC} )
9+ target_link_libraries (sampleMass base9 m yaml-cpp GSL::gsl GSL::gslcblas )
1010
1111install (TARGETS sampleMass
1212 DESTINATION bin)
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ include_directories( ${YAML_CPP_INCLUDE_DIRS} "/usr/local/include" )
66
77add_executable (singlePopMcmc ${MPIMCMC_FILES} )
88
9- target_link_libraries (singlePopMcmc base9 m ${GSL_LOC} ${GSLCBLAS_LOC} yaml-cpp)
9+ target_link_libraries (singlePopMcmc base9 m GSL::gsl GSL::gslcblas yaml-cpp)
1010
1111install (TARGETS singlePopMcmc
1212 DESTINATION bin)
You can’t perform that action at this time.
0 commit comments