-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic support for CMake configuration and build #785
Conversation
@forki The |
@forki I have tried to add a specific unit-test for Here is a brief desciption of what's expected: Requiremed file system at runtimeHere is the file system which should be present at runtime
Required build toolsIn order to execute the routines of
Example testAt best, the test should be something like the following: let sourceDir = "./CMakeTest"
let buildDir = "./CMakeTest-Build"
CleanDir buildDir
ensureDirectory buildDir
CMakeGenerate (fun p ->
{ p with
SourceDirectory = sourceDir
BinaryDirectory = buildDir
Generator = if isUnix then "Unix Makefiles" else "Visual Studio 12 2013"
}
)
CMakeBuild (fun p-> {p with BinaryDirectory = buildDir}) Any opinion about this? |
Hi, thanks for contributing. Integration tests are very hard to do. If you are going to use this stuff in production then I don't think you need to provide such tests. I will always ask you before I merge changes on this. |
@@ -0,0 +1,286 @@ | |||
[<AutoOpen>] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the AutoOpen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I was not aware that some modules are not auto-opened because of their low-usage... As FAKE scripts tends to hide as most F# specifics as possible ("It is using an easy domain-specific language (DSL) so that you can start using it without learning F#."), I believed that removing the need for specifying any module name was a design choice.
As not auto-opening CMakeHelper
forces end-users to explicitly use the module name at each function call, I would like to rename:
CMakeHelper
intoCMake
CMakeGenerate
intoGenerate
CMakeBuild
intoBuild
Usages of the helper would be cleaner because of their <Noun>.<Verb>
form.
Are you OK with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's much better. We try to minimize the autoopens since had name
conflicts.
On May 5, 2015 1:04 PM, "bbenoist" notifications@github.com wrote:
In src/app/FakeLib/CMakeHelper.fs
#785 (comment):@@ -0,0 +1,286 @@
+[]OK, I was not aware that some modules are not auto-opened because of their
low-usage... As FAKE scripts tends to hide as most F# specifics as possible
("It is using an easy domain-specific language (DSL) so that you can
start using it without learning F#."), I believed that removing the need
for specifying any module name was a design choice.As not auto-opening CMakeHelper forces end-users to explicitly use the
module name at each function call, I would like to rename:
- CMakeHelper into CMake
- CMakeGenerate into Generate
- CMakeBuild into Build
Usages of the helper would be cleaner because of their . form.
Are you OK with this?
—
Reply to this email directly or view it on GitHub
https://github.com/fsharp/FAKE/pull/785/files#r29659378.
Yes, I intend to use it on production code but only on Windows as the .NET software I am working on cannot work with Mono. Are you OK with adding a dedicated example in the |
yes |
is this ready to merge? |
Not yet, French May is filled with holydays this year 😅 |
Features: * Configure and build any CMake project with FakeLib's CMakeHelper. * Supports the most used CMake option switches. * Strong CMake variable declaration to avoid conversion issues. * Executable search algorithm working on both Windows and Unix. * Toolchain file support. * Setting unwrapped CMake arguments manually remains possible. * Setting CMake arguments manually remains possible.
@forki I have finished my improvements. You can now merge it if you are OK with its content. |
Add basic support for CMake configuration and build
very cool. thanks a lot |
Description of the wrapped tool:
See the official website for more information about CMake.
Features:
It has been tested on both Windows (with VS 2012 and 2013) and the Ubuntu/Vagrant box (g++) using a simple C++ project.