Commit ca4c6804 authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Updating CMake to allow for Fortran to be turned off.

parent cb806d85
Pipeline #52720 failed with stage
in 3 minutes and 50 seconds
......@@ -14,15 +14,16 @@ SET(CXXHDR
SET(CXXLIB ${SUBPACKAGE_FULLNAME})
TRIBITS_ADD_LIBRARY(${CXXLIB} SOURCES ${CXXSRC} NOINSTALLHEADERS ${CXXHDR})
ADD_COMPILE_OPTIONS("-ffree-line-length-none")
SET(F90SRC
sparse_grids_I.f90
sparse_grids_M.f90
)
SET(F90LIB ${SUBPACKAGE_FULLNAME}_F90)
TRIBITS_ADD_LIBRARY(${F90LIB} SOURCES ${F90SRC})
TARGET_LINK_LIBRARIES(${F90LIB} ${CXXLIB})
IF(${PROJECT_NAME}_ENABLE_Fortran)
ADD_COMPILE_OPTIONS("-ffree-line-length-none")
SET(F90SRC
sparse_grids_I.f90
sparse_grids_M.f90
)
SET(F90LIB ${SUBPACKAGE_FULLNAME}_F90)
TRIBITS_ADD_LIBRARY(${F90LIB} SOURCES ${F90SRC})
TARGET_LINK_LIBRARIES(${F90LIB} ${CXXLIB})
ENDIF()
TRIBITS_ADD_TEST_DIRECTORIES(tests)
......
INCLUDE(SetDefault)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/..)
SET(FTESTS)
LIST(APPEND FTESTS
tstConstrainedSparseGrids.f90
tstSparseGrids.f90
)
IF(${PROJECT_NAME}_ENABLE_Fortran)
SET(FTESTS)
LIST(APPEND FTESTS
tstConstrainedSparseGrids.f90
tstSparseGrids.f90
)
#handle the fortran tests
foreach(test ${FTESTS})
#handle the fortran tests
FOREACH(test ${FTESTS})
get_filename_component(name ${test} NAME_WE)
TRIBITS_ADD_EXECUTABLE_AND_TEST(${name}
SOURCES ${test}
COMM serial
LINKER_LANGUAGE Fortran
TIMEOUT 14400
)
ENDFOREACH()
\ No newline at end of file
GET_FILENAME_COMPONENT(name ${test} NAME_WE)
TRIBITS_ADD_EXECUTABLE_AND_TEST(${name}
SOURCES ${test}
COMM serial
LINKER_LANGUAGE Fortran
TIMEOUT 14400
)
ENDFOREACH()
ENDIF()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment