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

The command order of CMakeLists.txt is wrong, which affects the performance. #11

Open
ZimingYuan opened this issue Mar 18, 2024 · 0 comments

Comments

@ZimingYuan
Copy link

From line 29 of CMakeLists.txt:

# Source codes
add_subdirectory(src)
add_subdirectory(tests)

# Compile flags
add_definitions(-std=c++11 -O3 -lboost -ltcmalloc_minimal -march=native -Wall -DINFO)

The correct order should be:

# Compile flags
add_definitions(-std=c++11 -O3 -lboost -ltcmalloc_minimal -march=native -Wall -DINFO)

# Source codes
add_subdirectory(src)
add_subdirectory(tests)

The original order deactivates the compile parameters in fact, which disables the O3 and AVX optimization.

@ZimingYuan ZimingYuan changed the title The command order of CMakeLists.txt is wrong, which reduces the efficiency. The command order of CMakeLists.txt is wrong, which affects the performance. Mar 19, 2024
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

No branches or pull requests

1 participant