-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from LLNL/develop
Cfits file format support.
- Loading branch information
Showing
58 changed files
with
1,760 additions
and
1,959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,30 @@ | ||
cmake_minimum_required (VERSION 3.5.1) | ||
project(umap VERSION 0.0.2) | ||
project(umap | ||
VERSION 0.0.3 | ||
LANGUAGES CXX C | ||
) | ||
|
||
configure_file( | ||
"${PROJECT_SOURCE_DIR}/config/config.h.in" | ||
"${PROJECT_BINARY_DIR}/config/config.h" | ||
) | ||
|
||
if (NOT CMAKE_BUILD_TYPE) | ||
message(STATUS "No build type selected, default to Debug") | ||
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (default Debug)" FORCE) | ||
endif() | ||
OPTION (ENABLE_CFITS "Build umap with Logging enabled" Off) | ||
OPTION (ENABLE_FITS_TESTS "Build FITS-based Tests (requires qfits library)" Off) | ||
OPTION (ENABLE_TESTS "Selects whether tests are built." On) | ||
OPTION (ENABLE_LOGGING "Build umap with Logging enabled" On) | ||
OPTION (ENABLE_STATS "Enable display statistics on exit" Off) | ||
|
||
OPTION (BUILD_FITS "Build FITS-based Tests (requires qfits library)" FALSE) | ||
include(cmake/BuildEnv.cmake) | ||
include(cmake/BuildType.cmake) | ||
include(cmake/SetupUmapThirdParty.cmake) | ||
|
||
set (FLAGS_ALL "-Wall") | ||
set (FLAGS_DEBUG_ALL "-g -O0 -DDEBUG") | ||
set (FLAGS_RELEASE_ALL "-O3") | ||
set(UMAP_ENABLE_LOGGING ${ENABLE_LOGGING}) | ||
set(UMAP_ENABLE_CFITS ${ENABLE_CFITS}) | ||
set(UMAP_DISPLAY_STATS ${ENABLE_STATS}) | ||
|
||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ${FLAGS_ALL}") | ||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${FLAGS_ALL}") | ||
set (CMAKE_CXX_FLAGS_DEBUG "${FLAGS_DEBUG_ALL}") | ||
set (CMAKE_C_FLAGS_DEBUG "${FLAGS_DEBUG_ALL}") | ||
set (CMAKE_CXX_FLAGS_RELEASE "${FLAGS_RELEASE_ALL}") | ||
set (CMAKE_C_FLAGS_RELEASE "${FLAGS_RELEASE_ALL}") | ||
configure_file( | ||
${PROJECT_SOURCE_DIR}/config/config.h.in | ||
${PROJECT_BINARY_DIR}/include/config.h) | ||
|
||
add_subdirectory(src) | ||
|
||
OPTION (ENABLE_TESTS "Selects whether tests are built." TRUE) | ||
if (ENABLE_TESTS) | ||
if ( ENABLE_TESTS ) | ||
add_subdirectory(tests) | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Set up the language supported for the build environment | ||
set (CMAKE_CXX_STANDARD 11) | ||
set (CMAKE_C_STANDARD 99) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Set a default build type if none was specified | ||
set( default_build_type "Release" ) | ||
if ( EXISTS "${CMAKE_SOURCE_DIR}/.git" ) | ||
set( default_build_type "Debug" ) | ||
endif() | ||
|
||
if ( NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES ) | ||
message(STATUS "Setting build type to '${default_build_type}' as none was specified.") | ||
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE | ||
STRING "Choose the type of build." FORCE) | ||
# Set the possible values of build type for cmake-gui | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" | ||
"MinSizeRel" "RelWithDebInfo") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
if ( ENABLE_CFITS ) | ||
find_library( CFITS_LIBRARY | ||
libcfitsio.a | ||
PATHS ${CFITS_LIBRARY_PATH} | ||
) | ||
|
||
if ( NOT CFITS_LIBRARY ) | ||
message( FATAL_ERROR "Could not find CFITS library, make sure CFITS_LIBRARY_PATH is set properly") | ||
endif() | ||
|
||
find_path( CFITS_INCLUDE_DIR | ||
fitsio.h | ||
PATHS ${CFITS_INCLUDE_PATH} | ||
) | ||
|
||
if ( NOT CFITS_INCLUDE_DIR ) | ||
message(FATAL_ERROR "Could not find CFITS include directory, make sure CFITS_INCLUDE_PATH is set properly") | ||
endif() | ||
|
||
include_directories( ${CFITS_INCLUDE_DIR} ) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.