Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 9afacf8

Browse files
author
Michael Grauer
committed
BUG: Refs #177. Changed the way the PHP variable is set.
When I ran CMake on the file in the previous version, the PHP interpreter was called and waited for input, which appeared to hang CMake. I've changed the way the PHP interpreter is called.
1 parent 6daf5ea commit 9afacf8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ set( Midas_VERSION_BUILD
1313
set( Midas_VERSION
1414
"${Midas_VERSION_MAJOR}.${Midas_VERSION_MINOR}.${Midas_VERSION_BUILD}" )
1515

16-
set( PHP "php" CACHE STRING "PHP executable.")
17-
18-
EXECUTE_PROCESS( COMMAND ${PHP} RESULT_VARIABLE ret_var)
19-
if(NOT ${ret_var} EQUAL 0)
20-
message(FATAL_ERROR "Please set the PHP executable")
16+
#-----------------------------------------------------------------------------
17+
# Find the php executable
18+
find_program(PHP "php" CACHE STRING "PHP executable.")
19+
if(NOT PHP)
20+
message(FATAL_ERROR "Please set the PHP executable")
2121
endif()
2222

2323

24-
2524
#-----------------------------------------------------------------------------
2625
# This should be at the top level for warning suppression
2726
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/library/CMake/CTestCustom.cmake.in

0 commit comments

Comments
 (0)