Skip to content

Add CMAKE install target #988

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

Merged
merged 9 commits into from
Nov 7, 2016
Merged

Add CMAKE install target #988

merged 9 commits into from
Nov 7, 2016

Conversation

martin-frbg
Copy link
Collaborator

Add CMAKE install target (copied from a patch provided by PrimarchOfTheSpaceWolves in #957)

Add CMAKE install target (copied from a patch provided by PrimarchOfTheSpaceWolves in #957)
else()
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_BUILD_TYPE Release)
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMAKE_BUILD_TYPE should control debug/release builds, not the other way around, by the way this needs to be set in the cache before the project command if not already defined

Copy link
Collaborator Author

@martin-frbg martin-frbg Oct 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is xianyi's code from 7ac7e14, the patch only changed the indentation here.
I take it this evaluation of BUILD_DEBUG should be removed completely ?

Copy link
Collaborator Author

@martin-frbg martin-frbg Oct 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More to the point, should this block become something like
if( NOT CMAKE_BUILD_TYPE )
set( CMAKE_BUILD_TYPE Release)
endif()
if (CMAKE_BUILD_TYPE = Debug)
set (DEBUG_POSTFIX "_d")
set(OpenBLAS_LIBNAME "${OpenBLAS_LIBNAME}_d")
else()
set (DEBUG_POSTFIX "")
endif()
which would also consolidate the definitions of DEBUG_POSTFIX as in your other comment ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reworked the PR now to query BUILD_DEBUG only if CMAKE_BUILD_TYPE is not set, and moved the conditional appending of a debug prefix to use the cmake-provided setting.
(Apologies again for the mess of incremental commits to the same file, I was working via the web interface and do not see a means of squashing the commit history there)

set(DEBUG_POSTFIX "_d")
endif()
install (TARGETS ${OpenBLAS_LIBNAME}_static${DEBUG_POSTFIX} DESTINATION lib)
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DEBUG_POSTFIX is already defined earlier, the install could be moved there to avoid duplicate code

@martin-frbg
Copy link
Collaborator Author

I have reworked the PR now to query BUILD_DEBUG only if CMAKE_BUILD_TYPE is not set, and moved the conditional appending of a debug prefix to use the cmake-provided setting.
(Apologies again for the mess of incremental commits to the same file, I was working via the web interface and do not see a means of squashing the commit history there)

@xianyi xianyi merged commit f00baf3 into OpenMathLib:develop Nov 7, 2016
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