mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-05 02:06:02 -04:00
Adding a build script
- using the generic command "cmake --build ." instead of "make" - using the generic command "ctest" instead of "make test" - updated readme
This commit is contained in:
parent
2b5d66eb25
commit
98e35bddcf
20
README.md
20
README.md
@ -95,24 +95,20 @@ Solutions for Visual Studio 2008 and 2010 are provided in the "msvc/" directory,
|
|||||||
#### CMake and test
|
#### CMake and test
|
||||||
A CMake configuration file is also provided for better multiplatform support and testing.
|
A CMake configuration file is also provided for better multiplatform support and testing.
|
||||||
|
|
||||||
Generating the Visual Studio 2010 Solution (similar for any other VS up to 2013):
|
Typical generic build (see also "build.bat" or "./build.sh"):
|
||||||
cmake . -G "Visual Studio 10"
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. # cmake .. -G "Visual Studio 10" # for Visual Studio 2010
|
||||||
|
cmake --build . # make
|
||||||
|
ctest . # make test
|
||||||
|
|
||||||
Generating the Linux Makefile, building in Debug and executing the tests:
|
Generating the Linux Makefile, building in Debug and executing the tests:
|
||||||
mkdir Debug
|
mkdir Debug
|
||||||
cd Debug
|
cd Debug
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
||||||
make -j
|
cmake --build . # make
|
||||||
ln -s ../examples examples
|
ln -s ../examples examples
|
||||||
make test
|
ctest . # make test
|
||||||
|
|
||||||
And for the Release version:
|
|
||||||
mkdir Release
|
|
||||||
cd Release
|
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
|
||||||
make -j
|
|
||||||
ln -s ../examples examples
|
|
||||||
make test
|
|
||||||
|
|
||||||
### Continuous Integration
|
### Continuous Integration
|
||||||
|
|
||||||
|
17
build.bat
Normal file
17
build.bat
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@REM Copyright (c) 2013 Sébastien Rombauts (sebastien.rombauts@gmail.com)
|
||||||
|
@REM
|
||||||
|
@REM Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
|
||||||
|
@REM or copy at http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
@REM generate solution for Visual Studio 2010, and build it
|
||||||
|
cmake .. -G "Visual Studio 10"
|
||||||
|
cmake --build .
|
||||||
|
|
||||||
|
@REM prepare and launch tests
|
||||||
|
mkdir examples
|
||||||
|
mkdir examples\example1
|
||||||
|
cp ../examples/example1/example.db3 examples/example1/
|
||||||
|
cp ../examples/example1/logo.png examples/example1/
|
||||||
|
ctest .
|
Loading…
x
Reference in New Issue
Block a user