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

Commit 4dfd67e

Browse files
author
Charles Ma
committed
BUG: fixed bug #177 Added php detection
1 parent a535a3c commit 4dfd67e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +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")
21+
endif()
22+
1623

17-
set( PHP CACHE STRING
18-
"Php executable.")
1924

2025
#-----------------------------------------------------------------------------
2126
# This should be at the top level for warning suppression
@@ -26,6 +31,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/library/CMake/CTestCustom.cmake.in
2631

2732
#----------------------------------------------------------------------------
2833
# Setup testing and required parameters for testing
34+
2935
include(CTest)
3036
set( SERVER_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR} )
3137
add_subdirectory(tests)

0 commit comments

Comments
 (0)