dongli / fortran-datetime

Another Fortran datetime library
14 stars 7 forks source link

compilation with ifort #2

Closed mpagowski closed 6 years ago

mpagowski commented 6 years ago

%ifort -V Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 18.0.0.128 Build 20170811 Copyright (C) 1985-2017 Intel Corporation. All rights reserved.

in fortran-datetime/build %cmake .. CMake Warning at CMakeLists.txt:21 (find_package): By not providing "FindFortranUnitTest.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "FortranUnitTest", but CMake did not find one.

Could not find a package configuration file provided by "FortranUnitTest" with any of the following names:

FortranUnitTestConfig.cmake
fortranunittest-config.cmake

Add the installation prefix of "FortranUnitTest" to CMAKE_PREFIX_PATH or set "FortranUnitTest_DIR" to a directory containing one of the above files. If "FortranUnitTest" provides a separate development package or SDK, be sure it has been installed.

CMake Error at CMakeLists.txt:48 (export): export Unknown arguments. -- Configuring incomplete, errors occurred! See also "/scratch3/BMC/chem-var/pagowski/codes/fortran-datetime/build/CMakeFiles/CMakeOutput.log".

What am I doing wrong?

dongli commented 6 years ago

@mpagowski The fortran-unit-test is another library that I have written. If you only want to use fortran-datetime, you can specify -DCMAKE_BUILD_TYPE=Release when run cmake command. This will drop the dependency on fortran-unite-test.

mpagowski commented 6 years ago

Still a problem after -DCMAKE_BUILD_TYPE=Release CMake Error at CMakeLists.txt:48 (export):

l.48: export (EXPORT FortranDatetimeTargets FILE "${CMAKE_CURRENT_BINARY_DIR}/FortranDatetime/FortranDatetimeTargets.cmake" )

dongli commented 6 years ago

What is the error output?

mpagowski commented 6 years ago

in ./build after cmake -DCMAKE_INSTALL_PREFIX:PATH=~/codes/fortran-datetime -DCMAKE_BUILD_TYPE=Release ..

CMakeOutput.log

dongli commented 6 years ago

@mpagowski Sorry, I am not an expert on CMake (just use it), I couldn't tell where is wrong in your CMakeOutput.log. Could print the console output of cmake command?

mpagowski commented 6 years ago

The error is CMake Error at CMakeLists.txt:48 (export): export Unknown arguments.

l.48 of CMakeLists.txt is export (EXPORT FortranDatetimeTargets FILE "${CMAKE_CURRENT_BINARY_DIR}/FortranDatetime/FortranDatetimeTargets.cmake" )

apparently, this is somehow undefined

dongli commented 6 years ago

@mpagowski Maybe it is caused by CMake version? Which version of CMake do you use?

FYI: https://cmake.org/cmake/help/v3.0/command/export.html

mpagowski commented 6 years ago

cmake version 2.8.12.2

mpagowski commented 6 years ago

Will check, that may be the reason

mpagowski commented 6 years ago

I built it fine with cmake 3.9.0

dongli commented 6 years ago

Nice to here that! I will close this issue then.