cmake: Allow to build without fortran

This commit is contained in:
Pavel Grunt 2017-10-30 10:45:54 +01:00
parent 5f998efd7b
commit b2b9d17146
2 changed files with 14 additions and 10 deletions

View File

@ -183,13 +183,15 @@ if (NOT MSVC)
if(SMP)
target_link_libraries(${OpenBLAS_LIBNAME} pthread)
target_link_libraries(${OpenBLAS_LIBNAME}_static pthread)
endif()
endif()
#build test and ctest
add_subdirectory(test)
if(NOT NO_CBLAS)
add_subdirectory(ctest)
endif()
if (NOT NOFORTRAN)
#build test and ctest
add_subdirectory(test)
if(NOT NO_CBLAS)
add_subdirectory(ctest)
endif()
endif()
endif()
set_target_properties(${OpenBLAS_LIBNAME} PROPERTIES

View File

@ -150,10 +150,12 @@ if (NEED_PIC)
set(CCOMMON_OPT "${CCOMMON_OPT} -fPIC")
endif ()
if (${F_COMPILER} STREQUAL "SUN")
set(FCOMMON_OPT "${FCOMMON_OPT} -pic")
else ()
set(FCOMMON_OPT "${FCOMMON_OPT} -fPIC")
if (NOT NOFORTRAN)
if (${F_COMPILER} STREQUAL "SUN")
set(FCOMMON_OPT "${FCOMMON_OPT} -pic")
else ()
set(FCOMMON_OPT "${FCOMMON_OPT} -fPIC")
endif ()
endif ()
endif ()