cmake: Allow to build without fortran
This commit is contained in:
parent
5f998efd7b
commit
b2b9d17146
|
@ -183,13 +183,15 @@ if (NOT MSVC)
|
||||||
if(SMP)
|
if(SMP)
|
||||||
target_link_libraries(${OpenBLAS_LIBNAME} pthread)
|
target_link_libraries(${OpenBLAS_LIBNAME} pthread)
|
||||||
target_link_libraries(${OpenBLAS_LIBNAME}_static pthread)
|
target_link_libraries(${OpenBLAS_LIBNAME}_static pthread)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#build test and ctest
|
if (NOT NOFORTRAN)
|
||||||
add_subdirectory(test)
|
#build test and ctest
|
||||||
if(NOT NO_CBLAS)
|
add_subdirectory(test)
|
||||||
add_subdirectory(ctest)
|
if(NOT NO_CBLAS)
|
||||||
endif()
|
add_subdirectory(ctest)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(${OpenBLAS_LIBNAME} PROPERTIES
|
set_target_properties(${OpenBLAS_LIBNAME} PROPERTIES
|
||||||
|
|
|
@ -150,10 +150,12 @@ if (NEED_PIC)
|
||||||
set(CCOMMON_OPT "${CCOMMON_OPT} -fPIC")
|
set(CCOMMON_OPT "${CCOMMON_OPT} -fPIC")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (${F_COMPILER} STREQUAL "SUN")
|
if (NOT NOFORTRAN)
|
||||||
set(FCOMMON_OPT "${FCOMMON_OPT} -pic")
|
if (${F_COMPILER} STREQUAL "SUN")
|
||||||
else ()
|
set(FCOMMON_OPT "${FCOMMON_OPT} -pic")
|
||||||
set(FCOMMON_OPT "${FCOMMON_OPT} -fPIC")
|
else ()
|
||||||
|
set(FCOMMON_OPT "${FCOMMON_OPT} -fPIC")
|
||||||
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue