Actions
Defect #6349
closedsome problem: wt-3.1.4/CMakeList.txt with cmake 2.8.2
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-09-10
Due date:
% Done:
100%
Estimated time:
Resolution:
Invalid
Affected version:
Description
i use cmake 2.8.2 to build wt-3.1.4 on Windows and Fedora linux
i found some problem:
1. on Windows(vc9):
wt-3.1.4/examples/CMakeLists.txt, see the bold code:
...
MACRO(WT_ADD_EXAMPLE name)
IF(${EXAMPLES_CONNECTOR} STREQUAL "wtisapi")
LIST(INSERT ${ARGV} 1 "SHARED")
ADD_LIBRARY(${ARGV})
SET_TARGET_PROPERTIES(${name}
PROPERTIES LINK_FLAGS
"/EXPORT:HttpExtensionProc /EXPORT:GetExtensionVersion /EXPORT:TerminateExtension")
ELSE(${EXAMPLES_CONNECTOR} STREQUAL "wtisapi")
ADD_EXECUTABLE(${ARGV})
ENDIF(${EXAMPLES_CONNECTOR} STREQUAL "wtisapi")
TARGET_LINK_LIBRARIES(${name} ${EXAMPLES_CONNECTOR})
ENDMACRO(WT_ADD_EXAMPLE)
...
perhaps the ${ARGV} is readonly in cmake 2.8.2
so the "SHARED" can't be inserted into ${ARGV}
the all examples in wt.sln(for vc9) will configured as static lib
change the code
LIST(INSERT ${ARGV} 1 "SHARED")
ADD_LIBRARY(${ARGV})
to this:
SET(TEMPLIST ${ARGV})
LIST(INSERT TEMPLIST 1 "SHARED")
ADD_LIBRARY(${TEMPLIST})
the wt.sln will be OK
2. on Fedora linux(gcc, apache-2.2.16, mod_fcgi, wtfcgi...)
/wt-3.1.4/CMakeLists.txt, find this code:
SET(RUNDIR "/var/run/wt" CACHE PATH
"Default path for wt session management "
"(only used by FCGI connector; not relative to CMAKE_INSTALL_PREFIX)")
this code will cause a VERY long name directory at examples' runtime, such as:
/var/run/wt; CACHE PATH ;Default path for wt session management ;(only used by FCGI connector; not relative to CMAKE_INSTALL_PREFIX)
but NOT expected
/var/run/wt
change the code to
SET(RUNDIR "/var/run/wt" CACHE PATH
"Default path for wt session management (only used by FCGI connector; not relative to CMAKE_INSTALL_PREFIX)")
cause the comment only one pair of "", will solve the problem
Is it cmake-2.8.2's bug?
Actions