Skip to content

Commit

Permalink
trunk: cmake: added simple build script for building Release & Debug …
Browse files Browse the repository at this point in the history
…version at once
  • Loading branch information
Marian Krivos committed Feb 7, 2012
1 parent 0a33514 commit ac73265
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ ELSE ()
message(STATUS "Building without tests & samples")
ENDIF ()

IF (!POCO_UNBUNDLED)
message(STATUS "Build with using internal copy of sqlite, libz, pcre, expat, ...")
ELSE ()
add_definitions( -DPOCO_UNBUNDLED)
IF (POCO_UNBUNDLED)
add_definitions( -DPOCO_UNBUNDLED)
message(STATUS "Build with using external sqlite, libz, pcre, expat ...")
ELSE ()
message(STATUS "Build with using internal copy of sqlite, libz, pcre, expat, ...")
ENDIF ()

# Set local include path
Expand Down Expand Up @@ -191,6 +191,7 @@ SET(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr/local")
INCLUDE(CPack)

message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
message(STATUS "Installation target path: ${CMAKE_INSTALL_PREFIX}")

message(STATUS "C_FLAGS: =${CMAKE_C_FLAGS}")
message(STATUS "CXX_FLAGS:=${CMAKE_CXX_FLAGS}")
Expand Down
22 changes: 22 additions & 0 deletions build_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# POCO_STATIC=1 - for static build
# POCO_UNBUNDLED - for no built-in version of libs
# CMAKE_INSTALL_PREFIX=path - for install path

rm -rf cmake-build
mkdir cmake-build
cd cmake-build

cmake ../. -DCMAKE_BUILD_TYPE=Debug $1 $2 $3 $4 $5
make -j3
make install

rm -rf CMakeCache.txt

cmake ../. $1 $2 $3 $4 $5
make -j3
make install


cd ..

0 comments on commit ac73265

Please sign in to comment.