ZJULearning / SSG

code for satellite system graphs
BSD 3-Clause "New" or "Revised" License
106 stars 32 forks source link

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

Open ZimingYuan opened 4 months ago

ZimingYuan commented 4 months ago

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.