[CMake] try_compile failure due to double quotes

Bill Hoffman bill.hoffman at kitware.com
Mon Jul 2 11:15:57 EDT 2012


Can you post the input to cmake that is causing this?


On 7/2/2012 11:07 AM, Kokron, Daniel S. (GSFC-610.1)[Computer Sciences 
Corporation] wrote:
> Seems the "Unix Makefiles" generator under cmake-2.8.8 is erroneously adding double quotes around my list of include directories.  I'm on a Linux-2.6.32 system.
>
> Here is a partial output from cmake invocation.
> cmake -DCMAKE_INSTALL_PREFIX=gmt5 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx --debug-trycompile ..
>
> -- Looking for nc_def_var_deflate
> -- CMAKE_SYMBOL_EXISTS_INCLUDES is -DINCLUDE_DIRECTORIES:STRING=-I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include -DpgiFortran -DMPICH_IGNORE_CXX_SEEK -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/ -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/zlib -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/szlib -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/jpeg -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/hdf5 -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/hdf -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/uuid -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/netcdf
> -- CHECK_SYMBOL_EXISTS_LIBS is -DLINK_LIBRARIES:STRING=-L/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/lib -L/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/lib -lnetcdf -lm /u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/lib/libhdf5_hl.a /u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/lib/libhdf5.a /u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/lib/libz.a /u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/lib/libsz.a /u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/lib/libcurl.a -lsz -ljpeg -lm
> -- Looking for nc_def_var_deflate - not found.
>
> Here is the output from CMakeFiles/CMakeError.log
>
> cat CMakeFiles/CMakeError.log
> Determining if the nc_def_var_deflate exist failed with the following output:
> Change Dir: /u/dkokron/play/GMTdev/gmt5/build/CMakeFiles/CMakeTmp
>
> Run Build Command:/usr/bin/gmake "cmTryCompileExec3166448200/fast"
> /usr/bin/gmake -f CMakeFiles/cmTryCompileExec3166448200.dir/build.make CMakeFiles/cmTryCompileExec3166448200.dir/build
> gmake[1]: Entering directory `/home1/dkokron/play/GMTdev/gmt5/build/CMakeFiles/CMakeTmp'
> /u/dkokron/play/CMAKE/cmake-2.8.8/install/bin/cmake -E cmake_progress_report /u/dkokron/play/GMTdev/gmt5/build/CMakeFiles/CMakeTmp/CMakeFiles 1
> Building C object CMakeFiles/cmTryCompileExec3166448200.dir/CheckSymbolExists.c.o
>
> /nasa/sgi/mpt/2.06a67/bin/mpicc   -std=gnu99    -I"/u/dkokron/play/GMTdev/gmt5/build/CMakeFiles/CMakeTmp/-I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include -DpgiFortran -DMPICH_IGNORE_CXX_SEEK -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/ -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/zlib -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/szlib -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/jpeg -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/hdf5 -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/hdf -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/uuid -I/u/dkokron/Baselibs/Baselibs-4_0_0_UNSTABLE/Intel-12.1.4.319_mpt-2.06r6/Linux/include/netcdf"    -o CMakeFiles/
>   cmTryCompileExec3166448200.dir/CheckSymbolExists.c.o   -c /u/dkokron/play/GMTdev/gmt5/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
>
> /u/dkokron/play/GMTdev/gmt5/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:20: error: netcdf.h: No such file or directory
> /u/dkokron/play/GMTdev/gmt5/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function 'main':
> /u/dkokron/play/GMTdev/gmt5/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: 'nc_def_var_deflate' undeclared (first use in this function)
> /u/dkokron/play/GMTdev/gmt5/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: (Each undeclared identifier is reported only once
> /u/dkokron/play/GMTdev/gmt5/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: for each function it appears in.)
> gmake[1]: *** [CMakeFiles/cmTryCompileExec3166448200.dir/CheckSymbolExists.c.o] Error 1
> gmake[1]: Leaving directory `/home1/dkokron/play/GMTdev/gmt5/build/CMakeFiles/CMakeTmp'
> gmake: *** [cmTryCompileExec3166448200/fast] Error 2
>
> File /u/dkokron/play/GMTdev/gmt5/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
> /* */
> #include <netcdf.h>
>
> int main(int argc, char** argv)
> {
>    (void)argv;
> #ifndef nc_def_var_deflate
>    return ((int*)(&nc_def_var_deflate))[argc];
> #else
>    (void)argc;
>    return 0;
> #endif
> }
>
>
>
> Daniel Kokron
> NASA Ames (ARC-TN)
> SciCon group
> 301-286-3959
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>


-- 
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573




More information about the CMake mailing list