some problem report: wt-3.1.4/CMakeList.txt with cmake 2.8.2
Added by DQ Qin over 14 years ago
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 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?
Replies (4)
RE: some problem report: wt-3.1.4/CMakeList.txt with cmake 2.8.2 - Added by DQ Qin over 14 years ago
i can't edit my post
so, i reply the right thing again:
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 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?
RE: some problem report: wt-3.1.4/CMakeList.txt with cmake 2.8.2 - Added by DQ Qin over 14 years ago
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?
RE: some problem report: wt-3.1.4/CMakeList.txt with cmake 2.8.2 - Added by DQ Qin over 14 years ago
it should be:
LIST(INSERT TEMPLIST 1 SHARED)
not
LIST(INSERT ${TEMPLIST} 1 SHARED)
i don't know the difference. but it really works differently.
RE: some problem report: wt-3.1.4/CMakeList.txt with cmake 2.8.2 - Added by Koen Deforche over 14 years ago
Hey,
Thanks for letting us know and helping us resolve these build annoyances.
i use cmake 2.8.2 to build wt-3.1.4 on Windows and Fedora linux
i found some problem:
- 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})
It appears that this has already been fixed in latest git.
- 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?
It certainly looks like it is changed behaviour, but I guess it makes sense. We will apply your fix. Thanks !
Regards,
koen