[CMake] ExternalProject_Add fails with gcc-4.9.3
T.Sariyski
tzsariysk at gmail.com
Sat Jul 29 12:25:10 EDT 2017
cmake version 3.4.3
Hi,
I have ExternalProject_Add (attached), which works with gcc-4.4.7, but fails
with gcc-4.9.3:
...
...
[100%] Performing build step for 'ep_netcdf'
CMake Error at
/scratch/tesari/build/cee/gnu.dbg/netcdf/src/ep_netcdf-stamp/ep_netcdf-build
-DEBUG.cmake:16 (message):
Command failed: 2
'make'
See also
/scratch/tesari/build/cee/gnu.dbg/netcdf/src/ep_netcdf-stamp/ep_netcdf-build
-*.log (attached).
If I execute configure and make, as defined in ${CONFIGURE_COMMAND}, it
works.
What is the meaning of "Command failed: 2 'make'" error message, and how
should I track it down? Any help is highly appreciated.
Thanks in advance,
Ted
ExternalProject_Add( ep_netcdf
URL ${CMAKE_SOURCE_DIR}/src/netcdf/netcdf_distro.tar
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/netcdf
LOG_CONFIGURE 1
LOG_BUILD 1
LOG_INSTALL 1
LOG_DOWNLOAD 0
LOG_UPDATE 0
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND
${CMAKE_CURRENT_BINARY_DIR}/netcdf/src/ep_netcdf/configure
--enable-64bit FC=" " F90=${CMAKE_Fortran_COMPILER}
CXX=${CMAKE_CXX_COMPILER} CC=${CMAKE_C_COMPILER}
BUILD_COMMAND ${MAKE}
)
ep_netcdf-build-DEBUG.cmake
--------------------------------------------------------
set(command "${make}")
execute_process(
COMMAND ${command}
RESULT_VARIABLE result
OUTPUT_FILE
"/scratch/tesari/build/cee/gnu.dbg/netcdf/src/ep_netcdf-stamp/ep_netcdf-buil
d-out.log"
ERROR_FILE
"/scratch/tesari/build/cee/gnu.dbg/netcdf/src/ep_netcdf-stamp/ep_netcdf-buil
d-err.log"
)
if(result)
set(msg "Command failed: ${result}\n")
foreach(arg IN LISTS command)
set(msg "${msg} '${arg}'")
endforeach()
set(msg "${msg}\nSee also\n
/scratch/tesari/build/cee/gnu.dbg/netcdf/src/ep_netcdf-stamp/ep_netcdf-build
-*.log")
message(FATAL_ERROR "${msg}")
else()
set(msg "ep_netcdf build command succeeded. See also
/scratch/tesari/build/cee/gnu.dbg/netcdf/src/ep_netcdf-stamp/ep_netcdf-build
-*.log")
message(STATUS "${msg}")
endif()
More information about the CMake
mailing list