FindOpenMP requires C or CXX language to be enabled
miroi opened this issue · 6 comments
miroi commented
Hi,
the "test/fc_omp " is crashing due to:
ilias@adf1:~/Work/programming/autocmake/test/fc_omp/build-2017-05-18-22-22-53/.cmake ..
CMake Error at /usr/share/cmake/Modules/FindOpenMP.cmake:169 (message):
FindOpenMP requires C or CXX language to be enabled
Call Stack (most recent call first):
/home/milias/Work/programming/autocmake/modules/omp.cmake:26 (find_package)
CMakeLists.txt:24 (include)
-- Configuring incomplete, errors occurred!
See also "/home/milias/Work/programming/autocmake/test/fc_omp/build-2017-05-18-22-22-53/CMakeFiles/CMakeOutput.log".
milias@adf1:~/Work/programming/autocmake/test/fc_omp/build-2017-05-18-22-22-53/.cmake --version
cmake version 2.8.12.2
bast commented
Thanks Miro - can you try a later CMake version? Not sure which exactly but with latest it should not fail anymore.
miroi commented
Hi,
I installed cmake3 package (CentOS 7), but how to activate it for autocmake without manually introducing links ?
ilias@adf1:~/Work/programming/autocmake/test/fc_omp/.ls -lt /usr/bin/cmake*
-rwxr-xr-x 1 root root 4485608 Feb 9 19:43 /usr/bin/cmake3*
-rwxr-xr-x. 1 root root 4084352 Nov 5 2016 /usr/bin/cmake* # <--- version 2
miroi commented
cmake3 is fine, see:
milias@adf1:~/Work/programming/autocmake/test/fc_omp/build-2017-05-18-22-22-53/.cmake3 ..
-- The Fortran compiler identification is GNU 4.8.5
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
-- Try OpenMP Fortran flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Configuring done
-- Generating done
-- Build files have been written to: /home/milias/Work/programming/autocmake/test/fc_omp/build-2017-05-18-22-22-53
milias@adf1:~/Work/programming/autocmake/test/fc_omp/build-2017-05-18-22-22-53/.
bast commented
OK I think we should bump the minimum version in tests to 3.0 - do you agree?
miroi commented
Fine; let's demand cmake3 for this test.
But how to quickly arrange it on CentOS 7 where cmake2 is the default ?
bast commented
It should be relatively simple to install (download) the latest CMake also on CentOS 7. I am closing this but please re-open in case the issue is difficult to solve.