1 cmake_minimum_required(VERSION 3.9)
4 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
5 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
6 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
8 # force the executable to be put out of Debug/Release dir
9 # because gmake build of fortran will not be in a config
10 # directory, and for easier testing we want the exe and .dll
11 # to be in the same directory.
12 get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
14 foreach(config ${CMAKE_CONFIGURATION_TYPES})
15 string(TOUPPER "${config}" config)
16 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${config}
17 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
21 add_subdirectory(subdir)
22 include_directories(${VSGNUFortran_BINARY_DIR}/subdir/fortran)
23 add_subdirectory(c_code)
24 # use a cmake script to run the executable so that PATH
25 # can be set with the MinGW/bin in it, and the fortran
26 # runtime libraries can be found.
27 configure_file(runtest.cmake.in runtest.cmake @ONLY)