mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-21 06:52:33 -04:00
Adjust the CMake script to allow for a rewritten FindOpenMP script in CMake v3.9
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx-1.8@7977 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
c3edd713fd
commit
4d78c87ce0
@ -893,9 +893,11 @@ 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})
|
||||
if (OpenMP_C_CLAGS})
|
||||
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")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fdata-sections -ffunction-sections")
|
||||
@ -1102,9 +1104,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
|
||||
Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp
|
||||
)
|
||||
file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp)
|
||||
@ -1244,10 +1251,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
|
||||
Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp
|
||||
)
|
||||
endif (APPLE)
|
||||
@ -1290,9 +1302,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
|
||||
Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp
|
||||
)
|
||||
if (WIN32)
|
||||
|
Loading…
x
Reference in New Issue
Block a user