Skip to content

Conversation

@gekowa
Copy link

@gekowa gekowa commented Aug 18, 2022

No description provided.

@gekowa gekowa changed the title Use Fortran build flags in compile options Use CMAKE_Fortran_Flags in compile options Aug 18, 2022
@scivision
Copy link
Member

This variable is used to initialize the compiler options for every target, every source file of that language https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html

I.e. this change shouldn't have any effect as those options are already implemented for all targets by CMake

@gekowa
Copy link
Author

gekowa commented Aug 18, 2022

This variable is used to initialize the compiler options for every target, every source file of that language https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html

I.e. this change shouldn't have any effect as those options are already implemented for all targets by CMake

Oh, that makes sense. I'll improve later.

@scivision scivision marked this pull request as draft August 19, 2022 02:23
@gekowa
Copy link
Author

gekowa commented Aug 23, 2022

The reason that I created this PR is that I'd like to have a place to pass '-fPIC' to the compiler, especially. ifort, or I have to manually modify CMakeLists.txt to add this compiler option each time.
So, if CMAKE_LANG_FLAGS were not appropriate, please let me know if there's a better place.
Thank you!

@scivision scivision force-pushed the main branch 2 times, most recently from f8c9c91 to f74daac Compare October 12, 2022 04:39
@scivision scivision closed this Oct 19, 2022
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.

2 participants