Browse Source

cmake: Allow to build without fortran

pull/1338/head
Pavel Grunt 8 years ago
parent
commit
b2b9d17146
2 changed files with 15 additions and 11 deletions
  1. +9
    -7
      CMakeLists.txt
  2. +6
    -4
      cmake/system.cmake

+ 9
- 7
CMakeLists.txt 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()

#build test and ctest
add_subdirectory(test)
if(NOT NO_CBLAS)
add_subdirectory(ctest)
endif()
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


+ 6
- 4
cmake/system.cmake 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 ()



Loading…
Cancel
Save