Description
Dear all,
I have tried to add the Intel issue DPD200416083 as a run-time error test, but I failed due to my ignorance of CMake. I followed ths hint of Damian substituting add_compile_time_test
with add_test
, resulting in the following CMake file:
...
if("${gfortran_compiler}")
...
elseif("${intel_compiler}")
add_test(intel-issue-DPD200416083 src/intel/issue-DPD200416083 oop-caf f90)
...
Evidently, I missed something fundamental because I obtain the following results:
→ make build
→ cd build
→ FC=ifort cmake .. -DCMAKE_INSTALL_PREFIX=${PWD}
-- The C compiler identification is GNU 6.2.1
-- The Fortran compiler identification is Intel 17.0.1.20161005
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working Fortran compiler: /opt/arch/intel-2017-beta/compilers_and_libraries_2017.1.132/linux/bin/intel64/ifort
-- Check for working Fortran compiler: /opt/arch/intel-2017-beta/compilers_and_libraries_2017.1.132/linux/bin/intel64/ifort -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /opt/arch/intel-2017-beta/compilers_and_libraries_2017.1.132/linux/bin/intel64/ifort supports Fortran 90
-- Checking whether /opt/arch/intel-2017-beta/compilers_and_libraries_2017.1.132/linux/bin/intel64/ifort supports Fortran 90 -- yes
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stefano/fortran/AdHoc/build
→ make
→ make install
make: *** No rule to make target 'install'. Stop.
→ make test
Running tests...
Test project /home/stefano/fortran/AdHoc/build
Start 1: intel-issue-DPD200416083
Could not find executable src/intel/issue-DPD200416083
Looked in the following places:
src/intel/issue-DPD200416083
src/intel/issue-DPD200416083
src/intel/Release/issue-DPD200416083
src/intel/Release/issue-DPD200416083
src/intel/Debug/issue-DPD200416083
src/intel/Debug/issue-DPD200416083
src/intel/MinSizeRel/issue-DPD200416083
src/intel/MinSizeRel/issue-DPD200416083
src/intel/RelWithDebInfo/issue-DPD200416083
src/intel/RelWithDebInfo/issue-DPD200416083
src/intel/Deployment/issue-DPD200416083
src/intel/Deployment/issue-DPD200416083
src/intel/Development/issue-DPD200416083
src/intel/Development/issue-DPD200416083
Unable to find executable: src/intel/issue-DPD200416083
1/1 Test #1: intel-issue-DPD200416083 .........***Not Run 0.00 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 0.00 sec
The following tests FAILED:
1 - intel-issue-DPD200416083 (Not Run)
Errors while running CTest
make: *** [Makefile:62: test] Error 8
As you can see the CMake configuration does not generate the make rule install
and if I run the rule test
my Intel test is not generated (the sources are not copied and the executable is not created).
I think that I have to add the logic to copy the sources and create the executable into the build directory, something along the line of the logic contained into the file AddCompileTimeTest.cmake, but I am really unaware about the CMake syntax/rules/logics...
Do you have any hints?
OT: in the main CMakeLists.txt there are references to the build of OpenCoarrays, is it (maybe) a refuse?