zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #10888
[Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
David Graf has proposed merging lp:~davidagraf/zorba/bug-1013075 into lp:zorba.
Requested reviews:
Dennis Knochenwefel (dennis-knochenwefel)
For more details, see:
https://code.launchpad.net/~davidagraf/zorba/bug-1013075/+merge/110307
Bug #1013075
--
https://code.launchpad.net/~davidagraf/zorba/bug-1013075/+merge/110307
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-05-22 16:55:02 +0000
+++ CMakeLists.txt 2012-06-14 12:20:25 +0000
@@ -148,12 +148,13 @@
ENDIF (WIN32)
################################################################################
-# This section is used for batch script generation. Each executable
-# on Windows needs a bat script in order to set the PATH to the required DLLs.
+# This section is used for batch script and Visual Studio Project file generation.
+# Each executable on Windows needs a bat script and in the Visual Studio build a \
+# pre-generated Visual Studio Project file in order to set the PATH to the required DLLs.
# For this we use CACHE variables to gather all the information generated
# throughout the cmake execution (required DLLs, list of scripts to generate).
# The generation occurs only at the end of CMake execution (through the macro
-# ZORBA_GENERATE_EXE_SCRIPTS_WIN32) when ALL the requirements have been found.
+# ZORBA_GENERATE_EXE_HELPERS_WIN32) when ALL the requirements have been found.
# E.g. zorba.exe needs in PATH all the DLLs of all external modules, etc.
IF (WIN32)
# Clear all the variables because they are used only for this build.
@@ -166,10 +167,19 @@
SET (ZORBA_EXE_SCRIPT_LIST ""
CACHE STRING "List of Windows batch scripts to be generated, one for each executable" FORCE
)
+ IF (MSVC_IDE)
+ SET (ZORBA_VC_PROJECT_FILE_LIST ""
+ CACHE STRING "List of Visual Studio project files to be generated, one for each executable" FORCE
+ )
+ ENDIF(MSVC_IDE)
+
# Moreover, mark it as advanced since the CMake GUI user should not see this.
MARK_AS_ADVANCED (FORCE ZORBA_REQUIRED_DLLS)
MARK_AS_ADVANCED (FORCE ZORBA_REQUIRED_DLL_PATHS)
MARK_AS_ADVANCED (FORCE ZORBA_EXE_SCRIPT_LIST)
+ IF (MSVC_IDE)
+ MARK_AS_ADVANCED (FORCE ZORBA_VC_PROJECT_FILE_LIST)
+ ENDIF(MSVC_IDE)
ENDIF (WIN32)
################################################################################
@@ -415,10 +425,11 @@
IF(WIN32)
SET(requiredlibs ${requiredlibs} wsock32)
- # Clear this variable because this is used only for this build.
+ # Clear those variables because this is used only for this build.
# A cache variable is needed since this must be modified by subdirectories
- # and be visible at this level when ZORBA_GENERATE_EXE_SCRIPTS_WIN32 is called
+ # and be visible at this level when ZORBA_GENERATE_EXE_HELPERS_WIN32 is called
SET(ZORBA_EXE_SCRIPT_LIST "" CACHE STRING "List of bat scripts" FORCE)
+ SET(ZORBA_VC_PROJECT_FILE_LIST "" CACHE STRING "List of VC project files" FORCE)
ENDIF(WIN32)
################################################################################
@@ -568,7 +579,7 @@
ENDIF (APPLE AND UNIVERSAL)
IF (WIN32)
- ZORBA_GENERATE_EXE_SCRIPTS_WIN32 ()
+ ZORBA_GENERATE_EXE_HELPERS_WIN32 ()
ENDIF (WIN32)
# This must be done last! Create the one top-level target which
=== modified file 'cmake_modules/ZorbaGenerateExe.cmake'
--- cmake_modules/ZorbaGenerateExe.cmake 2012-05-03 12:31:51 +0000
+++ cmake_modules/ZorbaGenerateExe.cmake 2012-06-14 12:20:25 +0000
@@ -68,8 +68,8 @@
INSTALL (TARGETS ${EXE_NAME}${SUFFIX} DESTINATION ${INSTALL_DESTINATION})
ENDIF (NOT ${INSTALL_DESTINATION} STREQUAL "")
- # generate list of bat scripts to set the PATH variable for the executables
IF (WIN32)
+ # generate list of bat scripts to set the PATH variable for the executables
IF (NOT ${NEW_NAME} STREQUAL "")
SET (ZORBA_EXE_NAME "${NEW_NAME}${SUFFIX}")
ELSE (NOT ${NEW_NAME} STREQUAL "")
@@ -79,20 +79,18 @@
SET (ZORBA_EXE_SCRIPT_LIST "${ZORBA_EXE_SCRIPT_LIST}${CMAKE_CURRENT_BINARY_DIR}/${ZORBA_EXE_NAME}.bat;"
CACHE STRING "List of Windows batch scripts to be generated, one for each executable" FORCE
)
+
+
+ # generate list of Visual Studio project files to set the PATH variable
+ IF (MSVC_IDE)
+ SET (SYSTEM_NAME $ENV{USERDOMAIN})
+ SET (USER_NAME $ENV{USERNAME})
+ SET (ZORBA_VC_PROJECT_FILE_LIST "${ZORBA_VC_PROJECT_FILE_LIST}${EXE_NAME}.vcproj.${SYSTEM_NAME}.${USER_NAME}.user"
+ CACHE STRING "List of Visual Studio project files to be generated, one for each executable" FORCE
+ )
+ ENDIF (MSVC_IDE)
ENDIF (WIN32)
- # generating initial property file for each executable in visual studio
- # is done to set the PATH variable correctly
- IF (MSVC_IDE)
- SET (SYSTEM_NAME $ENV{USERDOMAIN})
- SET (USER_NAME $ENV{USERNAME})
- SET (ZORBA_VC_PROJECT_CONFIG_FILE "${EXE_NAME}${SUFFIX}.vcproj.${SYSTEM_NAME}.${USER_NAME}.user")
- # Do not overwrite old property files. The user might have adapted something.
- IF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${ZORBA_VC_PROJECT_CONFIG_FILE})
- CONFIGURE_FILE (${CMAKE_SOURCE_DIR}/cmake_modules/VCProject.vcproj.in ${CMAKE_CURRENT_BINARY_DIR}/${ZORBA_VC_PROJECT_CONFIG_FILE})
- ENDIF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${ZORBA_VC_PROJECT_CONFIG_FILE})
- ENDIF (MSVC_IDE)
-
IF (ZORBA_BUILD_STATIC_LIBRARY)
ADD_EXECUTABLE ("${EXE_NAME}${SUFFIX}_static" ${SRCS})
SET_TARGET_PROPERTIES ("${EXE_NAME}${SUFFIX}_static" PROPERTIES COMPILE_DEFINITIONS BUILDING_ZORBA_STATIC)
@@ -112,12 +110,12 @@
ENDMACRO (ZORBA_GENERATE_EXE)
-# This macro will read the ZORBA_EXE_SCRIPT_LIST environments variable and will
-# generate them near each corresponding executable.
+# This macro will read the ZORBA_EXE_SCRIPT_LIST and ZORBA_VC_PROJECT_CONFIG_FILE
+# environment variables and will generate them near each corresponding executable.
# This macro must be invoked AFTER all the required libraries have been searched
# for (both Zorba and external modules) in order to set a correct path in the
# scripts.
-MACRO (ZORBA_GENERATE_EXE_SCRIPTS_WIN32)
+MACRO (ZORBA_GENERATE_EXE_HELPERS_WIN32)
IF (NOT WIN32)
MESSAGE (FATAL_ERROR "This macro is intended only for Windows platforms.")
@@ -141,4 +139,12 @@
ENDFOREACH (SCRIPT)
-ENDMACRO (ZORBA_GENERATE_EXE_SCRIPTS_WIN32)
+ FOREACH (VCFILE ${ZORBA_VC_PROJECT_FILE_LIST})
+ # Do not overwrite old property files. The user might have adapted something.
+ IF (NOT EXISTS ${VCFILE})
+ CONFIGURE_FILE (${CMAKE_SOURCE_DIR}/cmake_modules/VCProject.vcproj.in ${VCFILE})
+ ENDIF (NOT EXISTS ${VCFILE})
+ ENDFOREACH(VCFILE)
+
+
+ENDMACRO (ZORBA_GENERATE_EXE_HELPERS_WIN32)
Follow ups
-
[Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: noreply, 2012-07-06
-
[Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: Zorba Build Bot, 2012-07-06
-
[Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: Zorba Build Bot, 2012-07-06
-
[Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: David Graf, 2012-07-06
-
[Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: David Graf, 2012-07-06
-
Re: [Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: Rodolfo Ochoa, 2012-07-05
-
Re: [Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: Rodolfo Ochoa, 2012-07-05
-
Re: [Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: David Graf, 2012-07-04
-
Re: [Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: Rodolfo Ochoa, 2012-07-03
-
Re: [Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: Rodolfo Ochoa, 2012-07-03
-
Re: [Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: Chris Hillery, 2012-06-27
-
Re: [Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: David Graf, 2012-06-27
-
Re: [Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: Chris Hillery, 2012-06-26
-
Re: [Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: David Graf, 2012-06-26
-
Re: [Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: Dennis Knochenwefel, 2012-06-14
-
Re: [Merge] lp:~davidagraf/zorba/bug-1013075 into lp:zorba
From: David Graf, 2012-06-14