LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-12-2012, 12:09 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
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.
 
Old 07-12-2012, 01:50 PM   #2
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
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")
 
  


Reply

Tags
cmake, hiphop, hphp, php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I need to pass environment variables to emacs CollieJim Programming 1 06-04-2012 07:45 AM
How do I pass variables? Karas Linux - Newbie 2 11-23-2009 11:55 AM
Passing cmake variables in a src2pkg script... Lufbery Slackware 24 08-05-2008 02:21 PM
pass variables through hyperlink in php ALInux Programming 2 12-23-2005 01:27 PM
script (or other) to pass variables to C++ program ngwenyama Programming 9 01-20-2005 09:54 PM


All times are GMT -5. The time now is 01:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration