Unknown CMake command "ADD_ELMER_TEST"

Discussion about building and installing Elmer
Post Reply
emes
Posts: 1
Joined: 27 Feb 2018, 17:31
Antispam: Yes

Unknown CMake command "ADD_ELMER_TEST"

Post by emes »

Dears,

thanks for the support and for the time devoted to do so. I have just registered to this forum, and I am a new follower of the Elmer activity as well.

I am trying to install elmer with the general instructions suggested here https://www.csc.fi/web/elmer/sources-and-compilation.
My OS is Ubuntu GNOME 16.04.3.
When I come to the cmake -DWITH_ELMERGUI:BOOL=FALSE -DWITH_MPI:BOOL=FALSE -DCMAKE_INSTALL_PREFIX=../install ../elmerfem
I do get the following:
>
-- The Fortran compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working Fortran compiler: /usr/bin/f95
-- Check for working Fortran compiler: /usr/bin/f95 -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/f95 supports Fortran 90
-- Checking whether /usr/bin/f95 supports Fortran 90 -- yes
-- 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 CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking whether GFortran version >= 4.8 -- yes
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- A library with BLAS API found.
-- A library with BLAS API found.
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.
-- Checking whether /usr/bin/f95 supports PROCEDURE POINTER
-- Checking whether /usr/bin/f95 supports PROCEDURE POINTER -- yes
-- Checking whether /usr/bin/f95 supports CONTIGUOUS
-- Checking whether /usr/bin/f95 supports CONTIGUOUS -- yes
-- Checking whether /usr/bin/f95 supports EXECUTE_COMMAND_LINE
-- Checking whether /usr/bin/f95 supports EXECUTE_COMMAND_LINE -- yes
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long
-- Check size of long - done
-- Found 108 modules from /home/scaraggi/elmer/elmerfem/fem/src/modules
CMake Error at fem/tests/circuits_transient_foil/CMakeLists.txt:8 (ADD_ELMER_TEST):
Unknown CMake command "ADD_ELMER_TEST".


-- Configuring incomplete, errors occurred!
See also "/home/scaraggi/elmer/build/CMakeFiles/CMakeOutput.log".
See also "/home/scaraggi/elmer/build/CMakeFiles/CMakeError.log".
<
so the configuration looks not completed.
I searched on the forum but it looks I am experiencing it for the first time. Is there anybody who can suggest me a way to figure out this error?

Thanks in advance for you help.
Best regards
mika
Posts: 230
Joined: 15 Sep 2009, 07:44

Re: Unknown CMake command "ADD_ELMER_TEST"

Post by mika »

Hi,

Unfortunately this reply comes all too late, but eventually I just came across with a similar problem. I found that some of the CMakeLists.txt files located in the test case directories ../fem/tests/* missed a line

INCLUDE(test_macros)

After adding these the problem disappeared. This has now been fixed in the git repository (devel branch).

Best regards,
Mika
Post Reply