LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   hiphop - how to pass CMAKE variables? (http://www.linuxquestions.org/questions/programming-9/hiphop-how-to-pass-cmake-variables-4175416369/)

eantoranz 07-12-2012 12:09 PM

hiphop - how to pass CMAKE variables?
 
In order to build hphp I had to do a lot of hacking with ./configure (plus other things) http://www.linuxquestions.org/questi...-a-4175416201/. Now I need to be able to pass those same parameters to cmake when I run hphp. Is there a way to do it?

Code:

$ CMAKE_LIBRARY_PATH=/usr/local/libmemcached-0.39/lib/ /home/antoranz/hiphop-php/src/hphp/hphp --keep-tempdir=1 --log 6 test.php
running hphp...
creating temporary directory /tmp/hphp_3hWc9X ...
Analyzing Includes
Analyzing All
Corrected function return type Some -> Variant
Analyzing Includes
Analyzing All
Analyzing Includes
Analyzing All
parsing inputs...
parsing test.php ...
Analyzing Includes
Analyzing All
parsing inputs took 0'00" (15 ms) wall time
pre-optimizing...
pre-optimizing took 0'00" (2 ms) wall time
inferring types...
inferring types took 0'00" (1 ms) wall time
post-optimizing...
post-optimizing took 0'00" (4 ms) wall time
creating CPP files...
creating CPP files took 0'00" (93 ms) wall time
compiling and linking CPP files...
Status 1 running command: `/home/antoranz/hiphop-php/bin/run.sh'\n
  arg: `'\n
  arg: `/tmp/hphp_3hWc9X'\n
  arg: `program'\n
  arg: `'\n
-- The C compiler identification is GNU\n-- The CXX compiler identification is GNU\n-- Check for working C compiler: /usr/bin/gcc\n-- Check for working C compiler: /usr/bin/gcc -- works\n-- Detecting C compiler ABI info\n-- Detecting C compiler ABI info - done\n-- Check for working CXX compiler: /usr/bin/c++\n-- Check for working CXX compiler: /usr/bin/c++ -- works\n-- Detecting CXX compiler ABI info\n-- Detecting CXX compiler ABI info - done\n-- CMAKE_PREFIX_PATH was missing, proceeding anyway\n-- Performing Test HAVE_GCC_43\n-- Performing Test HAVE_GCC_43 - Success\n-- Boost version: 1.41.0\n-- Found the following Boost libraries:\n--  system\n--  program_options\n--  filesystem\n-- MySQL Include dir: /usr/include  library dir: /usr/lib64/mysql\n-- MySQL client libraries: mysqlclient_r\n-- Found LIBMEMCACHED: /usr/local/libmemcached-0.39/lib/libmemcached.so\n-- Found PCRE: /usr/lib64/libpcre.so\n-- Configuring incomplete, errors occurred!\n
CMake Error at /home/antoranz/hiphop-php/CMake/FindLibEvent.cmake:29 (message):\n  Could NOT find libevent.\nCall Stack (most recent call first):\n  /home/antoranz/hiphop-php/CMake/HPHPFindLibs.cmake:55 (find_package)\n  /home/antoranz/hiphop-php/CMake/HPHPSetup.cmake:46 (include)\n  CMakeLists.txt:41 (include)\n\n\n
compiling and linking CPP files took 0'03" (3629 ms) wall time
hphp failed
running hphp took 0'04" (4234 ms) wall time

Thanks in advance.

eantoranz 07-12-2012 01:50 PM

I had to manually set the variables in the right place in hiphop's cmake files.

For example, in hiphop-php/CMake/HPHPFindLibs.cmake:
Code:

# tbb libs
set(TBB_INSTALL_DIR "/home/antoranz/tbb22_20090809oss")
set(TBB_INCLUDE_DIR "/home/antoranz/tbb22_20090809oss/include/")
set(TBB_LIBRARY "/home/antoranz/tbb22_20090809oss/build/linux_intel64_gcc_cc4.4.6_libc2.12_kernel2.6.32_release/libtbb.so")
set(TBB_MALLOC_LIBRARY "/home/antoranz/tbb22_20090809oss/build/linux_intel64_gcc_cc4.4.6_libc2.12_kernel2.6.32_release/libtbbmalloc.so")



All times are GMT -5. The time now is 04:33 PM.