cmake_minimum_required(VERSION 3.13) enable_testing() project(oneMKL_Example) enable_language (Fortran) # ifort # (CMAKE_Fortran_FLAGS_RELEASE "/nologo /O2 /heap-arrays50 /libs:static /threads") # (CMAKE_Fortran_FLAGS_DEBUG "/nologo /debug:full /Od /heap-arrays50 /libs:static /threads /dbglibs") find_package(MKL CONFIG REQUIRED) message(STATUS "${MKL_IMPORTED_TARGETS}") #Provides available list of targets based on input add_executable(myapp gesvd.f90) #dgemm_example.c target_compile_options(myapp PUBLIC $) target_include_directories(myapp PUBLIC $) target_link_libraries(myapp PUBLIC $) add_test(NAME mytest COMMAND myapp) if(MKL_ENV) set_tests_properties(mytest PROPERTIES ENVIRONMENT "${MKL_ENV}") endif()