summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-10-25 16:30:40 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-10-25 17:53:05 -0300
commit1f7d295c511062f8973a3e9554173752549b0bc6 (patch)
tree866571e38fb42ef00f46fd6887b00fe79c8fff34 /CMakeLists.txt
parent7368a0a533c12ba09e7713695415e1f247763883 (diff)
downloadshiboken-1f7d295c511062f8973a3e9554173752549b0bc6.tar.gz
shiboken-1f7d295c511062f8973a3e9554173752549b0bc6.tar.xz
shiboken-1f7d295c511062f8973a3e9554173752549b0bc6.zip
Updated Shiboken cmake files to provide build type information.
The build type information, contained in the the SHIBOKEN_BUILD_TYPE variable, will tell modules linking with libshiboken if it was built in Release or Debug mode. The SHIBOKEN_PYTHON_INTERPRETER variable was also added to the cmake Shiboken files, to make it known which Python interpreter (normal or debug, in systems where this separation exists). SHIBOKEN_PYTHON_LIBRARIES variable tells which Python library libshiboken was linked against.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dab1888b..dc4c8348 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,7 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS")
else()
if(CMAKE_HOST_UNIX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g")
option(ENABLE_GCC_OPTIMIZATION "Enable specific GCC flags to optimization library size and performance. Only available on Release Mode" 0)
@@ -69,6 +69,7 @@ execute_process(
OUTPUT_VARIABLE PY_DEBUG
OUTPUT_STRIP_TRAILING_WHITESPACE)
+set(SHIBOKEN_BUILD_TYPE "Release")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
if(NOT PYTHON_DEBUG_LIBRARIES)
message(FATAL_ERROR "Python debug library not found. Try compile shiboken with -DCMAKE_BUILD_TYPE=Release")
@@ -79,6 +80,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions("-DPy_DEBUG")
endif()
set(SBK_PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES})
+ set(SHIBOKEN_BUILD_TYPE "Debug")
else()
set(SBK_PYTHON_LIBRARIES ${PYTHON_LIBRARIES})
add_definitions("-DNDEBUG")