I am getting a strange error when trying to use a set variable from a
module.
CMake Error: Key Config is not used yet. For now only $ENV{..} is
allowed
>>>> From MzxFindPerl.cmake
>>>>>>>>>>>>
IF (NOT PERL_EXECUTABLE) SET(PERL_FOUND "NO" ) ELSE (NOT PERL_EXECUTABLE) SET(PERL_FOUND "YES" ) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>> From CmakeLists.txt
>>>>>>>>>>>>
INCLUDE( MzxFindPerl.cmake ) IF(PERL_FOUND)
INCLUDE( MzxFindPerlLibs.cmake ) ....
....
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Should this variable be cached? Otherwise, I have to do a search each time
I guess. Any help would be appreciated.
Ryan Connelly
----- Original Message -----
From: Sylvain Benner
To: cmake@cmake.org
Sent: Wednesday, May 03, 2006 9:53 AM
Subject: [CMake] sub source groups in a vcproj project. Hello,
I'm a new user. I want to use cmake for our
cross-platform software.
I'm trying to generate a vcproj project with
sub source groups but it seems to be impossible with the current
version of cmake.
I coded this, but I can't have sub source groups
with it :
#
-------------------------------------------------------------------------------------
# Global description for the source
files
#
# Note : The source file with no
folder must be put at the top of the list
#
-------------------------------------------------------------------------------------
SET(VKKERNEL_GLOBALS_SOURCES_DESC
"Clock
Management"
vkClock.h
vkClockManager.h
vkSystemTimeSource.h
vkTimeSource.h
source/vkClock.cpp
source/vkClockManager.cpp
source/vkSystemTimeSource.cpp
source/vkTimeSource.cpp
"Containers"
vkArray.h
vkBinaryTree.h
vkDictionary.h
vkHash.h
vkList.h
vkLockFreeQueue.h
)
#
-------------------------------------------------------------------------------------
# This loop will :
# - add the source files to the
source list
# - sort every source file into its
project folder (works only for .vcproj projects)
#
-------------------------------------------------------------------------------------
FOREACH (SOURCE_DESCRIPTION
${VKKERNEL_GLOBALS_SOURCES_DESC})
IF
(${SOURCE_DESCRIPTION} MATCHES "[A-Za-z]*.(h|cpp)$")
# this is a source file
#add it to the source list
SET (VKKERNEL_SOURCES ${VKKERNEL_SOURCES}
${SOURCE_DESCRIPTION})
# add it to the current folder list
IF (NOT CUR_FOLDER_LIST)
# this the first item in the folder list,
so no "|" at the start
SET (CUR_FOLDER_LIST
${SOURCE_DESCRIPTION})
ELSE (NOT CUR_FOLDER_LIST)
SET (CUR_FOLDER_LIST
${CUR_FOLDER_LIST}|${SOURCE_DESCRIPTION})
ENDIF (NOT CUR_FOLDER_LIST)
ELSE
(${SOURCE_DESCRIPTION} MATCHES "[A-Za-z]*.(h|cpp)$")
# this is a source folder
# create the source folder
IF (CURRENT_FOLDER)
# this is the first time we meet a source
folder
SOURCE_GROUP("${CURRENT_FOLDER}"
"${CUR_FOLDER_LIST}")
SET (CUR_FOLDER_LIST "")
ENDIF (CURRENT_FOLDER)
SET
(CURRENT_FOLDER ${SOURCE_DESCRIPTION})
ENDIF(${SOURCE_DESCRIPTION} MATCHES "[A-Za-z]*.(h|cpp)$")
ENDFOREACH(SOURCE_DESCRIPTION
${VKKERNEL_GLOBALS_SOURCES_DESC})
# create the last source
folder
SOURCE_GROUP("${CURRENT_FOLDER}"
"${CUR_FOLDER_LIST}")
ADD_LIBRARY(vkKernel SHARED
${VKKERNEL_SOURCES})
I looked to the sources of cmake and I found
that SourceGroup can have children group but it seems to be not
used. Did I miss something ?
If there is no sub source group support in cmake currently, I plan to
add it myself with this syntax in the config :
SET(VKKERNEL_GLOBALS_SOURCES_DESC
"Source
Files::Clock Management"
vkClock.h
vkClockManager.h
vkSystemTimeSource.h
vkTimeSource.h
source/vkClock.cpp
source/vkClockManager.cpp
source/vkSystemTimeSource.cpp
source/vkTimeSource.cpp
"Source
Files::Containers"
vkArray.h
vkBinaryTree.h
vkDictionary.h
vkHash.h
vkList.h
vkLockFreeQueue.h
) Any help will be
much appreciated.
Thank you.
Sylvain Benner
_______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake |
_______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake