Skip to content
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

Some minor changes in CMake compilation system: #34

Merged
merged 1 commit into from
Sep 2, 2015

Conversation

victorsndvg
Copy link

- Allows to select which targets will compile
- Manage include_directories from the main CMakeLists.txt
- Library names depend on project name

    - Allows to select which targets will compile
    - Manage include_directories from the main CMakeLists.txt
    - Library names depend on project name
@andreww
Copy link
Owner

andreww commented Sep 1, 2015

Any chance you could outline how these features can be used - so this information can be included in the documentation? How would a user select different project names or use different parts of FoX with cmake?

@victorsndvg
Copy link
Author

Hello @andreww ,

I create 5 options in order to enable/disable the compilation of each high-level library and the examples:

  • FoX_ENABLE_WXML
  • FoX_ENABLE_WCML
  • FoX_ENABLE_WKML
  • FoX_ENABLE_DOM
  • FoX_ENABLE_EXAMPLES

This options are enabled by default.

For example, to do a out-of-source build disabling WCML, WKML and examples with the CMake command line interface, you have to write:

cmake -DFoX_ENABLE_WCML=OFF -DFoX_ENABLE_WKML=OFF -DFoX_ENABLE_EXAMPLES=OFF $SOURCE_DIR

Using cmake-gui this options will be shown on the CMake window.

@victorsndvg
Copy link
Author

About the project name:

When you create a project in CMake you use:

PROJECT(FoX Fortran)

The string "FoX" will be automatically stored in the PROJECT_NAME CMake variable.

I used this variable in order to name the libraries (libFoX_dom.a, libFoX_wxml.a, etc.). Now, if you change the name of the project to PROJECT(ASD Fortran), the resultant libraries will be called libASD_dom.a, libASD_xwml.a, etc.

Is not an important feature, only a bit more flexible.

Finally, I want to thank you the work with FoX. I'm going to start using it in my own project and, if you want, I will be glad to collaborate with the project.

Best regards,
Víctor.

@andreww andreww merged commit aed18db into andreww:master Sep 2, 2015
@andreww
Copy link
Owner

andreww commented Sep 2, 2015

Thanks - tested and merged. I really should get around to cutting a new release...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants