mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-22 12:08:43 -04:00
Merged from WSJT-X v1.8 branch:
------------------------------------------------------------------------ r7977 | bsomervi | 2017-08-02 01:19:07 +0100 (Wed, 02 Aug 2017) | 1 line Adjust the CMake script to allow for a rewritten FindOpenMP script in CMake v3.9 ------------------------------------------------------------------------ r7978 | bsomervi | 2017-08-02 02:14:52 +0100 (Wed, 02 Aug 2017) | 1 line Fix a typo in r7977 ------------------------------------------------------------------------ git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7979 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
e0b507d6e6
commit
55c2e1845d
@ -898,8 +898,10 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fexceptions -frtti")
|
||||
if (NOT APPLE)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pragmas")
|
||||
if (${OPENMP_FOUND})
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
if (OpenMP_C_FLAGS)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
endif ()
|
||||
endif ()
|
||||
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fdata-sections -ffunction-sections")
|
||||
set (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -fdata-sections -ffunction-sections")
|
||||
@ -1107,9 +1109,14 @@ target_link_libraries (wsjt_fort ${FFTW3_LIBRARIES})
|
||||
if (${OPENMP_FOUND} OR APPLE)
|
||||
add_library (wsjt_fort_omp STATIC ${wsjt_FSRCS})
|
||||
target_link_libraries (wsjt_fort_omp ${FFTW3_LIBRARIES})
|
||||
if (OpenMP_C_FLAGS)
|
||||
set_target_properties (wsjt_fort_omp
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${OpenMP_C_FLAGS}"
|
||||
)
|
||||
endif ()
|
||||
set_target_properties (wsjt_fort_omp
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${OpenMP_C_FLAGS}"
|
||||
Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp
|
||||
)
|
||||
file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp)
|
||||
@ -1249,10 +1256,15 @@ if (${OPENMP_FOUND} OR APPLE)
|
||||
$<$<COMPILE_LANGUAGE:Fortran>:-fopenmp> # assumes GNU style Fortran compiler
|
||||
)
|
||||
else (APPLE)
|
||||
if (OpenMP_C_FLAGS)
|
||||
set_target_properties (jt9
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${OpenMP_C_FLAGS}"
|
||||
LINK_FLAGS "${OpenMP_C_FLAGS}"
|
||||
)
|
||||
endif ()
|
||||
set_target_properties (jt9
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${OpenMP_C_FLAGS}"
|
||||
LINK_FLAGS "${OpenMP_C_FLAGS}"
|
||||
Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp
|
||||
)
|
||||
endif (APPLE)
|
||||
@ -1295,9 +1307,13 @@ if (APPLE)
|
||||
target_link_libraries (wsjtx wsjt_fort wsjt_cxx wsjt_qt wsjt_qtmm ${hamlib_LIBRARIES} ${FFTW3_LIBRARIES})
|
||||
else ()
|
||||
target_link_libraries (wsjtx wsjt_fort_omp wsjt_cxx wsjt_qt wsjt_qtmm ${hamlib_LIBRARIES} ${FFTW3_LIBRARIES})
|
||||
if (OpenMP_C_FLAGS)
|
||||
set_target_properties (wsjtx PROPERTIES
|
||||
COMPILE_FLAGS "${OpenMP_C_FLAGS}"
|
||||
LINK_FLAGS "${OpenMP_C_FLAGS}"
|
||||
)
|
||||
endif ()
|
||||
set_target_properties (wsjtx PROPERTIES
|
||||
COMPILE_FLAGS "${OpenMP_C_FLAGS}"
|
||||
LINK_FLAGS "${OpenMP_C_FLAGS}"
|
||||
Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp
|
||||
)
|
||||
if (WIN32)
|
||||
|
Loading…
Reference in New Issue
Block a user