Skip to content

Commit 3d0e790

Browse files
committed
Fixing #3 by adding SOVERSION and removing GSL cblas dependency, also some further clean-up
1 parent 752077d commit 3d0e790

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

CMakeLists.txt

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,16 @@ find_package(Casacore REQUIRED COMPONENTS casa ms tables measures)
1010

1111
find_library(GSL_LIB NAMES gsl)
1212
find_path(GSL_INCLUDE_DIR NAMES gsl/gsl_version.h)
13-
find_library(GSL_CBLAS_LIB NAMES gslcblas)
1413

1514
find_package(Threads REQUIRED)
1615

1716
find_package(Boost COMPONENTS system REQUIRED)
1817

19-
include(CheckCXXCompilerFlag)
20-
CHECK_CXX_COMPILER_FLAG("-pedantic -Wno-long-long -Werror=vla" COMPILER_SUPPORTS_PEDANTIC)
21-
if(COMPILER_SUPPORTS_PEDANTIC)
22-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-long-long -Werror=vla")
23-
endif(COMPILER_SUPPORTS_PEDANTIC)
24-
2518
include_directories(${CASACORE_INCLUDE_DIRS})
2619
include_directories(${Boost_INCLUDE_DIR})
2720
include_directories(${GSL_INCLUDE_DIR})
2821

29-
set(CMAKE_CXX_FLAGS "-O3 -Wall -DNDEBUG -march=native --std=c++11")
22+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -DNDEBUG -march=native --std=c++11")
3023

3124
add_library(dyscostman-object OBJECT
3225
aftimeblockencoder.cpp
@@ -42,13 +35,14 @@ set_property(TARGET dyscostman-object PROPERTY POSITION_INDEPENDENT_CODE 1)
4235
# Note: casapy fails if Casa is linked in the storage manager, so we have to trust that
4336
# casapy's version of casacore is binary compatible with this storage manager's casacore.
4437
add_library(dyscostman SHARED $<TARGET_OBJECTS:dyscostman-object>)
45-
target_link_libraries(dyscostman ${GSL_LIB} ${GSL_CBLAS_LIB} ${CASACORE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
38+
set_target_properties(dyscostman PROPERTIES SOVERSION 0)
39+
target_link_libraries(dyscostman ${GSL_LIB} ${CASACORE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
4640

4741
add_executable(dscompress dscompress.cpp stopwatch.cpp)
48-
target_link_libraries(dscompress dyscostman ${GSL_LIB} ${GSL_CBLAS_LIB} ${CASACORE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
42+
target_link_libraries(dscompress dyscostman ${GSL_LIB} ${CASACORE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
4943

5044
add_executable(decompress decompress.cpp)
51-
target_link_libraries(decompress dyscostman ${GSL_LIB} ${GSL_CBLAS_LIB} ${CASACORE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
45+
target_link_libraries(decompress dyscostman ${GSL_LIB} ${CASACORE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
5246

5347
# add target to generate API documentation with Doxygen
5448
find_package(Doxygen)

0 commit comments

Comments
 (0)