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

Set RelWithDebInfo flags #6975

Merged

Conversation

reyoung
Copy link
Collaborator

@reyoung reyoung commented Dec 25, 2017

Fix #6976

@reyoung reyoung requested a review from qingqing01 December 25, 2017 05:35
@@ -201,6 +199,10 @@ if(WITH_GOLANG)
endif(WITH_GOLANG)

set(PADDLE_PYTHON_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/python/build")

SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does it not work when setting these on line 19 and line 20?

Copy link
Collaborator Author

@reyoung reyoung Dec 25, 2017

Choose a reason for hiding this comment

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

I am not sure.

We are setting FLAGS during flags.cmake and other cmake files. CMAKE_CXX_FLAGS_RELWITHDEBINFO could be overwritten if we set it in the beginning of CMakelists.txt.

We can set CMAKE_CXX_FLAGS_RELWITHDEBINFO just before include the paddle directory to avoid overwrites.

Copy link
Contributor

@qingqing01 qingqing01 left a comment

Choose a reason for hiding this comment

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

LGTM.

@reyoung reyoung merged commit ebf0d9e into PaddlePaddle:develop Dec 25, 2017
@reyoung reyoung deleted the feature/fix_relwithdebinfo_flags branch December 26, 2017 09:18
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