Skip to content

Commit

Permalink
Update project name and version in CMake (#496)
Browse files Browse the repository at this point in the history
- Change project name from "ISCE" to "isce3"
- Change project version from "3.0" to "0.1.0"
- Change names of the C++ and CUDA libraries from "libisce" and
  "libiscecuda" to "libisce3" and "libisce3-cuda"
- Add name and soname links to each library
  • Loading branch information
gmgunter authored and GitHub Enterprise committed Jul 22, 2020
1 parent 1fa31ea commit 1f76c70
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .cmake/IsceCuda.cmake

This file was deleted.

17 changes: 11 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ if (POLICY CMP0076)
cmake_policy(SET CMP0076 NEW)
endif()

project(ISCE VERSION 3.0
LANGUAGES CXX)
project(isce3
VERSION 0.1.0
LANGUAGES CXX
)

find_program(CCACHE ccache)
if(CCACHE)
Expand All @@ -30,7 +32,10 @@ set(ISCE_CUDA_ARCHS "Auto" CACHE STRING
- \"\" (empty) to use default compilation options")

# add local .cmake directory to CMAKE_MODULE_PATH
list(APPEND CMAKE_MODULE_PATH ${ISCE_SOURCE_DIR}/.cmake)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/.cmake)

# Set the name for the isce3 C++ library.
set(LISCE ${PROJECT_NAME})

# import some helper functions
include(IsceCudaHelper)
Expand Down Expand Up @@ -59,10 +64,10 @@ if (WITH_CUDA)

# specify target CUDA device architecture(s)
set_cuda_arch_flags("${ISCE_CUDA_ARCHS}")
endif()

# Set the name for the ISCE C++ library
set(LISCE isce.${ISCE_VERSION_MAJOR}.${ISCE_VERSION_MINOR})
# Set the name for the isce3 CUDA library.
set(LISCECUDA ${PROJECT_NAME}-cuda)
endif()

set(CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo;Coverage" CACHE STRING "" FORCE)
if(NOT CMAKE_BUILD_TYPE)
Expand Down
7 changes: 7 additions & 0 deletions cxx/isce3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ foreach(HEADER ${HEADERS})
COMPONENT isce_libs)
endforeach()

# Specify API version and build version (used to generate name and soname
# symlinks on Unix systems).
set_target_properties(${LISCE} PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION}
)

# Install shared library
install(TARGETS ${LISCE}
EXPORT isce3-targets
Expand Down
10 changes: 7 additions & 3 deletions cxx/isce3/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Get name of ISCE CUDA library
include(IsceCuda)

include(Sources.cmake)
include(Headers.cmake)

Expand Down Expand Up @@ -28,6 +25,13 @@ target_link_libraries(${LISCECUDA} PUBLIC
${CUDAFFT_LIBRARY}
)

# Specify API version and build version (used to generate name and soname
# symlinks on Unix systems).
set_target_properties(${LISCECUDA} PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION}
)

# Install public headers
foreach(HEADER ${HEADERS})
get_filename_component(DIR ${HEADER} DIRECTORY)
Expand Down
1 change: 0 additions & 1 deletion python/extensions/cython/isce/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ target_include_directories(
${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
)

include(IsceCuda)
target_link_libraries(iscecudaextension PUBLIC ${LISCECUDA} ${LISCE} m)

install(
Expand Down
1 change: 0 additions & 1 deletion python/extensions/pybind_isce3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ target_include_directories(${ISCEEXTENSION} PUBLIC ${CMAKE_CURRENT_LIST_DIR}/..)
target_link_libraries(${ISCEEXTENSION} PUBLIC ${LISCE})

if(WITH_CUDA)
include(IsceCuda)
target_link_libraries(${ISCEEXTENSION} PUBLIC ${LISCECUDA})
endif()

Expand Down
1 change: 0 additions & 1 deletion tests/cxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ if(WITH_CUDA)
list(TRANSFORM CUDA_TESTFILES PREPEND isce3/cuda/)

# Get name of ISCE CUDA library
include(IsceCuda)
list(APPEND LIBS ${LISCECUDA})
list(APPEND TESTFILES ${CUDA_TESTFILES})
endif()
Expand Down

0 comments on commit 1f76c70

Please sign in to comment.