build-automation

Conditional Task on exec failure in Ant

旧城冷巷雨未停 提交于 2019-11-26 21:43:44
问题 I have some unit tests running through Ant, and I'd like to be able to run some cleanup code if the unit tests fail. I was looking for some sort of "finally" block, but I had no luck finding one. I've tried using errorproperty and if statements on tasks, but ant only accepts "true", "on" and "yes" as true properties. A successfully executed task (on unix at least) returns 0, so I've had to construct a ridiculously elaborate apparatus: <project name="TestBuild" default="build" basedir=".">

How can I get CMake to find my alternative Boost installation?

与世无争的帅哥 提交于 2019-11-26 21:30:30
I have installed the most recent version of Boost in /usr/local (with includes in /usr/local/include/boost and libraries in /usr/local/lib/boost ) and I am now attempting to install Wt from source, but CMake (version 2.6) can't seem to find the Boost installation. It tries to give helpful suggestions about setting BOOST_DIR and Boost_LIBRARYDIR, but I haven't been able to get it to work by tweaking these variables. The most recent error message that I get is that it can't find the libraries, but it seems to indicate that it is using "/usr/local/include" for the include path, which isn't

Best free resource for learning advanced batch-file usage?

拥有回忆 提交于 2019-11-26 20:03:18
问题 What are the best free resources for learning advanced batch-file usage? 回答1: It's not free, but it's probably the best. "Windows NT Shell Scripting" by Tim Hill. That said, whenever I try to do something 'advanced' in cmd batch files, I always end up regretting it. Always. edit: some explanation of the shortcomings of batch files: math capabilities are pathetic quoting support is an afterthought - if you need to pass a quoted string as an argument to a command that needs to be quoted itself,

How to filter the xcodebuild command line output?

帅比萌擦擦* 提交于 2019-11-26 19:45:10
问题 Running xcodebuild from the console will bring you very verbose output and I wasn't able to locate any options for limit its output in order to display only warnings and errors. I'm looking for a way to capture the xcodebuild output and filter it. It would prefer a Python solution that will work with pipes but I'm open to other approaches as long they are command line based solutions. Are any tools that are already able to do this? 回答1: To only see the error output messages, redirect the

Dump include paths from g++

廉价感情. 提交于 2019-11-26 19:31:11
I'm trying to write a little build script - and want to determine if the includes are system includes or not. So I want g++ to tell me the include path's it's using. cpp -v seems the obvious best shot, but it doesn't give me the C++ paths. So I tried: g++ -Xpreprocessor -v Which doesn't work quite right - g++ captures the -v for it's own verbose output. Thanks, Oliver From Jonathan Wakely a better option (works on clang too): g++ -E -x c++ - -v < /dev/null clang++ -E -x c++ - -v < /dev/null I noticed there's a flag in cpp for specifying language. This works like a charm. cpp -xc++ -v < /dev

How do I force cmake to include “-pthread” option during compilation? [duplicate]

旧时模样 提交于 2019-11-26 19:18:32
问题 This question already has an answer here : How to get CMake to recognize pthread on Ubuntu? (1 answer) Closed 2 years ago . I know there is something like find_package(Threads) but it doesn't seem to make a difference (at least by itself). For now I'm using SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-pthread") , but it doesn't look like a correct solution to me. 回答1: find_package( Threads ) calls a CMake module that first, searches the file system for the appropriate threads package for this

Maven: Non-resolvable parent POM

China☆狼群 提交于 2019-11-26 18:03:03
问题 I have my maven project setup as 1 shell projects and 4 children modules. When I try to build the shell. I get: [INFO] Scanning for projects... [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project module1:1.0_A0 (C:\module1\pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Failure to find shell:pom:1.0_A0 in http://nyhub1.ny.ssmb.com:8081/nexus/content/repositories/JBoss/ was cached in the local repository, resolution will not be reattempted until the

Have Grunt generate index.html for different setups

ⅰ亾dé卋堺 提交于 2019-11-26 17:59:51
I'm trying to use Grunt as a build tool for my webapp. I want to have at least two setups: I. Development setup - load scripts from separate files, without concatenation, so my index.html would look something like: <!DOCTYPE html> <html> <head> <script src="js/module1.js" /> <script src="js/module2.js" /> <script src="js/module3.js" /> ... </head> <body></body> </html> II. Production setup - load my scripts minified & concatenated in one file, with index.html accordingly: <!DOCTYPE html> <html> <head> <script src="js/MyApp-all.min.js" /> </head> <body></body> </html> The question is, how can I

Generate C# project using CMake

筅森魡賤 提交于 2019-11-26 15:43:30
问题 I'm trying to generate a C# project within an existing C++ CMake code base on Windows. After some research, I could find only two projects that built their own CSharp compilers for CMake: gdcm and kde. I tried both of them. Unfortunately, the first one failed to generate a C# project. Instead it created a VS C++ project with cs files in it, and because of C++ flags set for linker, the build always failed with errors. After experimenting with the sample project they provided, I wonder whether

CruiseControl [.Net] vs TeamCity for continuous integration?

邮差的信 提交于 2019-11-26 14:06:45
I would like to ask you which automated build environment you consider better, based on practical experience. I'm planning to do some .Net and some Java development, so I would like to have a tool that supports both these platforms. I've been reading around and found out about CruiseControl.NET , used on stackoverflow development, and TeamCity with its support for build agents on different OS-platforms and based on different programming languages. So, if you have some practical experience on both of those, which one do you prefer and why? Currently, I'm mostly interested in the ease of use and