File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,18 @@ if(NOT WCSLIB_FOUND)
3737 find_library (WCSLIB_LIBRARY wcs
3838 HINTS ${WCSLIB_ROOT_DIR} PATH_SUFFIXES lib)
3939 find_library (M_LIBRARY m)
40- mark_as_advanced (WCSLIB_INCLUDE_DIR WCSLIB_LIBRARY M_LIBRARY)
40+
41+ file (STRINGS "${WCSLIB_INCLUDE_DIR} /wcslib/wcsconfig.h" TLINE
42+ REGEX "^#[\t ]*define[\t ]+WCSLIB_VERSION[\t ]+[0-9.]+$" )
43+
44+ string (REGEX REPLACE "^^#[\t ]*define[\t ]+WCSLIB_VERSION[\t ]+([0-9.]+)$" "\\ 1"
45+ WCSLIB_VERSION_STRING "${TLINE} " )
46+
47+ mark_as_advanced (WCSLIB_INCLUDE_DIR WCSLIB_LIBRARY WCSLIB_VERSION_STRING M_LIBRARY)
4148
4249 include (FindPackageHandleStandardArgs)
4350 find_package_handle_standard_args(WCSLIB DEFAULT_MSG
44- WCSLIB_LIBRARY M_LIBRARY WCSLIB_INCLUDE_DIR)
51+ WCSLIB_LIBRARY M_LIBRARY WCSLIB_INCLUDE_DIR WCSLIB_VERSION_STRING )
4552
4653 set (WCSLIB_INCLUDE_DIRS ${WCSLIB_INCLUDE_DIR} )
4754 set (WCSLIB_LIBRARIES ${WCSLIB_LIBRARY} ${M_LIBRARY} )
Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ if(NOT PHYPP_FOUND)
5050 if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5))
5151 add_definitions (-Wno-old-style-cast)
5252 endif ()
53+ if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.8))
54+ add_definitions (-Wno-double-promote)
55+ endif ()
5356
5457 add_definitions (-std=c++11)
5558 add_definitions (-ftemplate-backtrace-limit=0)
@@ -132,6 +135,10 @@ if(NOT PHYPP_FOUND)
132135 else ()
133136 set (PHYPP_INCLUDE_DIRS ${PHYPP_INCLUDE_DIRS} ${WCSLIB_INCLUDE_DIRS} )
134137 set (PHYPP_LIBRARIES ${PHYPP_LIBRARIES} ${WCSLIB_LIBRARIES} )
138+
139+ if (WCSLIB_VERSION_STRING VERSION_LESS 5.0)
140+ add_definitions (-DWCSLIB_NO_DIS)
141+ endif ()
135142 endif ()
136143
137144 # handle conditional FFTW support
You can’t perform that action at this time.
0 commit comments